Tuesday, January 1, 2013

Day 2 - something shiny

Day two working on SpaceShooter, my OneGameAMonth entry for January.

My goal for today was to get very basic ship movement in. The left analog stick applies acceleration, and the ship responds. It's also locked to a [-1,1] game grid. Pretty straightforward, and it works pretty well. Next up for ship movement is getting it to bounce off of walls - I'll code it up to bounce off of the edge of the game grid first, then I'll see about adding obstacles. It might be easier if the game board is made of square tiles - I'll just keep that in mind and see what happens.

Aside from that I had to do some engine housecleaning. I extended my Component system so it now supports inheritance. This was needed because I now have a PrimitiveMesh and a StaticMesh component, and there was special-case code in the renderer to draw either of these. Now these both inherit from a base Mesh component which has a virtual GetMeshes() function, so the renderer can pick out the meshes to draw from the component. 1990s style programming 101 stuff :)

Then I spent a few hours messing with shaders. You can check them out in the video below. There's no method, it's just madness. Clamp things, rotate things, distort textures, multiply by masks, etc. Jumble it all together and you see what I've got.

So, day 2 success!


No comments:

Post a Comment