11/2/07

Working for the weekend

Well I'm trying to push a project to the "beta" milestone here at work, so I've been putting all my time into that. I really want to get to the next tutorial because I've got some neat stuff I want to demonstrate. I think I'm going to take some anti-burnout time away from work pretty soon as well, which will let me play with the XNA stuff. Never the less, I should have time this weekend to put together tutorial 5.

I have a 2D sprite scripting interface coming along that I'm just about ready to use in the next tutorail. The scripting engine is lacking a couple features, but it's got more than enough functionality to demonstrate it as a system that works, so we'll step through building it from the ground up and learn how we can control sprite movement over time. So far the scripting interface can perform movement along a linear vector, movement over a bezier curve, rotate, scale, change texture, change origin, change tint, and just recently I added the ability to repeat arbitrary subsets of script, allowing you to create animation loops from any of those features. Later on down the road, it will be reasonably trivial to add just about anything, even post-processing effects like bloom or Gaussian blur (something I have in late stages development at the moment, but it's not quite ready).

The scripting engine works in tandem with a parent/child sprite class that implements a "cascading matrix" scheme. That means if you have a screen with a bunch of sprites on it, the screen is the "parent" and the sprites are the "children". You can use the scripting engine to rotate just one individual child on the screen, or, you could rotate the entire screen which would effectively rotate all the sprites. Like rotating a dinner plate, all the stuff on the plate goes along for the ride. I'll show you how it all works in the next tutorial, it's not too complicated and it gives you enough flexibility to start doing meaningful stuff on the screen.

0 comments: