On the other hand, ODE doesn't do prisms (oh, I'm taking it 3D btw, but you probably already realized that). ODE does meshes, but only badly. So I'll try to build physical prism shapes this way:
Thin green lines = 3D physics mesh, thick red lines = cuboids. Four physics shapes per triangle - some CPU-intensive shit! Nonetheless.
That settled, I started thinking about the editor again. This would be my first editor since I was a kid. I used Maya for my past games. Maya is not perfect, but on the other hand home-brews seldom are either. I saw a couple of different options:
- 2D editor written in Python, like a simple version of mspaint... like a version of mspaint, but only placing triangles. Editing each layer individually. The editor would export my native format, so nothing much would be required by the game engine itself.
- Make a generic viewer/editor written in C++, but which through stdin/stdout or sockets interface with a python script. I'd leave the logic in the python code, then I'd hopefully be able to reuse much of the viewer/editor for further games down the line. This editor would also export game engine native format.
- Make the editor in C++ and sort of part of the game itself. This way each level can be played while developing it.
I wasn't content with either solution, but both number two and three included longer iterations as I had to wait for the C++ linker a few hundred times. The first one seemed least bad so far, but even using tcl/tk would mean many days before the editor was ready to roll.
So in the car home from work today I thought to myself: can't I make it simpler than that? What is simpler than mspaint? ASCII art of course! In retrospect it's the perfect choice. The editor will be written in Python, but I'll keep the ASCII-import in C++, effectively making it a level loader. The idea is still a bit unclear, but I think I'll make four different applications:
- One for generating shapes. Think of it as the outline of the puzzle object.
- One for splitting the total shape into pieces, like jigsaw puzzle pieces.
- One for generating a level, loading the pieces, moving them about, then saving the final level.
- One for timing each level separately. The time will be used for setting level difficulty. And making sure that each level can be completed without bzguz.z
What a relief! I'm not too keen on this game in general, as it's a puzzle game. But most of the code will be a breeze to write, and pretty fun too. But best of all is I'll still have a little energy left when the game is ready for polish.