Friday, March 14, 2008

First archetypes

So, I completed the first archetypes a week ago. Blank game, editor test, and pong. It's kinda neat having something up on screen, with some real, movable shapes up. I added some vector-graphics shapes, because many simple archetypes (pong, brickbats) use plain old colored rectangles or circles for sprites, and even more complicated ones (shooters, etc.) may use circles for bullets and such.

We also needed shapes for collisions - I got halfway through Pong and then realized it was unplayable without some sort of radial collision detection; otherwise the ball just bounces back and forth in a straight line. So that's what I'm working on now, and it's fairly slow going - just having rectangles, ovals, and arcs means 6 different cases to test against, each of which has several different cases depending on which axis, which direction the shape is facing, relative positions, etc.

Been avoiding it by watching basically all of Medium Season 1 & 2. Unfortunately, it's not that great a TV show, so I've run out of worthwhile things to watch (if any of them were really worthwhile to begin with). Guess it's back to coding.

I'm curious what other problems having real, working archetypes will turn up. I'm very glad we did a minimal "game" and then did the half the editor, because many of our assumptions for data structures were very much wrong, and if we'd done the full game compiler we would've had to rewrite it all. But now that we're returning to the compiler & runtime, we get to see how many of our assumptions in the editor were wrong, and I'm guessing there are quite a few. We've already had to add shapes, shape arguments (eg. arc direction), vector graphics, and more complicated collision detection, and likely will need to change how we handle bounce & friction (making them parameters of the collision and not separate actions, for instance). And some aspects - like victory conditions - need a lot more attention.

Sometime I should write a post about all our assumptions and how they've been proven wrong and how we've kinda "spiraled" up into understanding, but I think we need a bit more understanding before I can write about it.