Warming Up with a silly little flight sim

I've got a bunch of code that I don't care to write again, so I've documented it and called it a library:

In part to test out the library, in part because it's been an idea I've wanted to experiment with, I wrote a silly little flight sim today.

Collide with the boxes in the shortest amount of time. The flight dynamics are pretty cheesy, but they kind of feel like a glider - the higher you go, the slower you get. There's no collision with the ground or with the hilariously festive sombreros.

There's quite a lot that's not in here, like a graceful entrance/exit, and OpenGL display lists. By my reading of the PyWeek rules, this amounts to published code over a month ahead of the contest, so I think you're free to reuse (and improve on) anything you find interesting.

(log in to comment)


Looks nice!

Though to be fair an API document isn't a user's guide :)

Yeah, the documentation is much closer to an API Reference than a User's Guide, but I do include several test scripts that illustrate how the module would get used in a game. Are you saying that I should write a more narrative document in order for this to be a valid source for PyWeek games?
At a minimum some sort of overview, with some simple samples of usage. Example scripts are not a substitute for real documentation :)
BTW, for a good model to follow, have a look at the pyglet documentation. That project is still missing the higher-level programming guide, but it does have quite good docstrings which give more information than the usual "pass a string as the argument or it'll break".
Ok, I've got an overview on the site now. The overview document contains some simplified versions of the sample scripts.