Portal 2 Puzzle Library (Code Library)

Avatar
Kyle0654
5 Posts
Posted Jul 10, 2012

Puzzle Library is a C# code library for interacting with Portal 2's P2C puzzle file format. It lets you read, write, create, and modify puzzle files. I built it with the aim of making it easy to build tools to modify puzzle files - abstracting away some of the confusing things like rotation angle order, providing bulk voxel editing capabilities, and simplifying connection management.

This code library also documents (through code) the full P2C file format. Every item is supported - I spent considerable time determining how each item worked (there are some crazy things in there), and when I couldn't determine what a property was for, I documented it in the library as such.

Please check it out and let me know what you think! It includes a sample program that can generate a puzzle file with demonstrations of how to create and use each item.

https://github.com/Kyle0654/Portal2.Puzzle

Advertisement
Registered users don't see ads! Register now!
Avatar
BenVlodgi
633 Posts
Posted Jul 10, 2012
Replied 2 hours later
most people here aren't going to be able to compile this... but I did, it looks interesting
however I didn't get it up and running, there wasn't a how to use in the readme
but its nice to see some C# again

EDIT:
haha, I just opened up my puzzlemaker and saw the generated chamber
I think I understand a bit better now, I like this

Avatar
Kyle0654
5 Posts
Posted Jul 11, 2012
Replied 2 hours later
Thanks for the reply - I updated the readme a bit to make it clearer how it works. =)
Avatar
lukeme99
7 Posts
Posted Aug 02, 2012
Replied 22 days later
Does this come with the source code, I can't check right now (on holiday in cyprus). If it does include source, I (if you don't mind) would like to dissect the little program and see how it handles the p2c files, I need some inspiration for a custom chamber creation toolset. I promise I won't steal any code, mainly because of the fact my tools will be in C++, I avoid C# as much as i can
Advertisement
Registered users don't see ads! Register now!
Avatar
Mevious
205 Posts
Posted Aug 02, 2012
Replied 1 hour later

lukeme99 wrote:
Does this come with the source code, I can't check right now (on holiday in cyprus). If it does include source, I (if you don't mind) would like to dissect the little program and see how it handles the p2c files, I need some inspiration for a custom chamber creation toolset. I promise I won't steal any code, mainly because of the fact my tools will be in C++, I avoid C# as much as i can

Yes, it's the source code. Actually, thanks for bumping this. I missed it the first time around and it looks pretty useful.