Ventures of an ex indie game developer

Editor FTW!

I had a couple of bugs in my mesh-generating (or rather the mesh-optimizing) code, and wasn't able to resolve it with simple printouts (vertex-merging and corner-keeping wasn't thought-through properly). Actually overviewing even a trivial 3D shape made up 20 triangles takes forever, and usually involves reproducing the whole thing on paper. Then multiply by each step in the mesh optimization process. So I decided to build a general-purpose viewer, that could view each step of the optimization. Another thought I had was that the viewer possibly could be extended into a simple editor in the future.

The viewer, called "tv3d", is controlled via a TCP port, and I built a higher-level interface for it in Python. I had built some unit tests for the mesh-generating code, and for these tests I just strapped on the viewer as a debugger. I'm really satisfied with the way the python code is totally unobtrusive: I neither had to change the mesh-generating code nor the test code, I merely had to extend it with 12 lines of code:


The result after I fixed my optimization code:



(The flickering comes from me removing the whole object, and "reloading" it though the resource system. That's what releaseobjects() and createmeshobject() in the test code above does.) With some small extensions I believe this could actually be a fantastic application if I evolve it into a simple editor. You see I'm betting a gazillion developers have similar problems, and also want to prototype functionality and game mechanics before taking their game to a more advanced development stage. There probably is a plethora of possible ways to do this, but I think this might fly if I make something super-simple in the 3D niche which is portable across PC, Mac and iOS. My engine already comes with a super-simple command-line interface in which you can manually (or through the TCP port) change solid/wireframe/coloring/shading/shadows/particles when rendering, sound parameters, physics simulation parameters, and debug stuff. With some simple input handling and ray-picking support this becomes a neat programmable editor. If I add a python "IDE" on iOS, this becomes a fantastic portable 3D prototyping tool.

Dogfooding is the name of the game, but I can't allow myself to drift off to do this now. When my current game is done though...

As usual game dev progress has been slow. I've doubted the controls further, and even started thinking of a similar gaming idea which I could dive into instead. Spending my energy unwisely, you might say. But the pendulum has swung back, and I hope I'll be able to follow through soon.

About the author

Mitt foto
Gothenburg, Sweden