Fun and Game Wrappers (Maintenance coding...)


Spent the whole day so far on the OLPCGames wrapper. Lots of code clean up and documentation. Created a stupid-simple script that punts out the boilerplate "sugar" code for a simple Pygame project with icon, setup file, activity definition and the like. Mostly because I was getting annoyed having to do all that junk every time I wanted to try a new effect without trashing an existing activity. I'm pretty sure that barrier to coding a new activity is why TicTacToe has so much extra cruft in it.

I added the ability to auto-size the window to the screen when running as an activity, so that activities which can handle a large screen can work full-screen. I also factored all of the camera operations into the one class, though we still use the (unsafe) sync operation for the "snap" method. Got rid of the tubeconn module (it's in sugar already). Provided a global pointer to the running activity. Made the camera store it's temporary files in a Bitfrost-accessible directory.

Now that it's cleaned up, and the documentation is pretty much readable for the sprint, I should be looking at making some spikes for network operation with separation of model and view. I also tried running a few Pygame games (non-trivial). No success there as of yet, but I haven't spent a lot of time on it.

Strangely, even some projects in the games-misc project don't seem to run at the moment. We may have some bit-rot showing up there. I'll get write access to the repository and can upload my changes at some point. Probably won't have time to fix all the games which don't run at the moment, though.

Anyway, for today that's got to be the end of the OLPC hacking. Have other clients who need work done. (Oh, and at some point in the next 2 days I need to put together a proposal for a talk and a tutorial at PyCon).

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.