Please or Register to create posts and topics.

Portal 2 Puzzle Library (Code Library)

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

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



Also, I made a map just for you! Sunset
Click Here to view my Workshop and play my puzzlemaker maps

Thanks for the reply - I updated the readme a bit to make it clearer how it works. =)

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 ;)

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.