I spent some time today tinkering with my low-poly tank models, which I had drawn out on graph paper, and laboriously entered in one vertex, one triangle at a time, and as fun as that was (well, it was fun in its way, for a time), I decided to screw around in Blender and see if I could output something that might be a little less dorky.
That sort of looks a little bit like a small car with a large gun. Yeah, that's good enough.
Blender has a number of built-in exporters. I used X3D, because it has an X in it, and I wrote a small Python script to dig through the output and return the vertex coordinates, and the indices. I even made it do a fake coloring of the vertices, based on their z position:
One thing (more as a reminder to myself, than anything else) - the X3D output from Blender contains a couple transformations. I understand that there may be a transformation above the geometry, and you'll want to "Apply" the location, scale, and rotation to bake that information into the actual vertices (or, you know, make your exporter smarter), but there's another rotation above that that rotates 180 degrees around the [0 1 1] axis. I guess that flips left-handed vs right-handed coordinate systems, but I'm sad that we live in a world where we'd have to do such a thing.
TODO:
- matrices - I'm still faking the model->camera matrices. I really gotta build a smarter matrix stack.
- jaws.js - it's time to rip this stuff out of the html file that I've been hacking all this time. The car/tank model, above, is now in its own JS file (more because I got tired of copying it around than anything else).
- tank movement - these guys ought to move around
- "skycube" - maybe not a cube, but a cylinder. Or maybe a box. I hear cubical textures are fancy. Something to make the background more interesting.
- mouse input for steering - I heard that the guy who invented the mouse (and a bunch of other stuff) died recently. Here's to http://en.wikipedia.org/wiki/Douglas_Engelbart
- mouse clicks for shooting - do I want a shooting game? I guess so. Maybe I'll make a cross-country racing game, where you shoot mischievous stuff at your enemies (a la Kart racing games)
- player projectiles effect enemies - whatever projectiles do, they should do it
- tanks shoot back - I spent all that time on that gun barrel
- enemy projectiles effect the player - you'd hope.
- obstacles - depending on the kind of game I end up making, this could be simple stuff to hide behind, or it could be more involved. So, maybe markers for the track.
- better shading - Here's what I think I want right now - a directional light source, maybe from overhead somewhere. Maybe a couple of point light sources (projectiles?). The combination of these things, multiplied by the tank's color (which will be different from tank to tank) should be simple to do. Shininess costs extra.
No comments:
Post a Comment