Sunday, March 9

SimCity 4's Graphics Engine

I found this discussion of SimCity 4's graphics engine very interesting. Apparently SC4 is the first version to go with a truly 3D polygonal geometry, though for a variety of reasons discussed in the article they limit the view angles for highest quality and speed. I also found their analysis on the last page that current graphics technology is far better suited to first-person games than god-games like SimCity pretty interesting. Makes sense especially since an FP perspective naturally limits the amount of geometry that must be rendered in high detail.

Saturday, March 8

Taking Flight


Here is a screenshot from my latest pet-project, a helicopter flight sim. It's written using Python (of course) and Pyglet . This is my first foray into 3D graphics, and I'm having a lot of fun learning OpenGL and training my brain to think in 4x4 transformation matrices ;^)

Writing a semi-realistic simulation (I don't think I can do better having never flown a real helicopter) is a bit humbling and gives me a a lot respect for aerospace engineers who have to make real heavier-than-air objects fly in a controllable fashion. The latter part is the crucial detail and I have spent many an hour trying to figure out why my poor virtual bird (note real pilots don't call them "choppers") would starting flipping out of control seemingly of its own volition.

The terrain is randomly generated by a little python script I wrote last weekend. If you want to play with that part, you can get it from a page I made for it in the Pyglet google group. It's kinda fun and can generate a variety of different terrain types.

Both the terrain script and the prototype heli.py script shown above are available via svn from my code repository. Note the word prototype above. The script is very basic, slightly better than a proof-of-concept and not well factored yet. That said I find it fun to fly around. You'll need Python, Pyglet (1.1) and PyODE to run it.