So yes, Infiltrator hasn't died out again yet. ;)
A major change this time around is the switch to SFML. There are a few things I really hate about the style, but it has the features I need.
I've picked out a camera/motion interface which I'll probably stick with at least through v0.1. It's a top-view fixed-rotation camera, meaning only the player rotates. It rotates to face the cursor specifically. FPS style WASD keys move you forward and backward, and allow strafing. The ship always moves relative to where it's facing.
Let's talk about that. You see, SFML doesn't come with the junk to do local translation, forcing me to set it up myself. Thus, I developed "Lazer's theorem." Basically, you start by assuming first quadrant rotation. Then you simply create a vector containing the rotation and how far that rotation is from 90 degrees. Then all you have to do is flip the vector or negate different parts of it depending on which quadrant it's actually in. This gives you a vector which you can multiply by standard translation in order to make it local. Really simple, right?
So basically this milestone gives you a blue grid to fly around on, and lets you spew missiles out everywhere. They don't always come from the right part of your ship, but they ALWAYS fly in the right direction. :P
What do we see happening next? Well I obviously need to get shooting fixed. After that I'll probably rough out the enemy base class. I'll want to start with really simple yet working versions of everything, and then build on that. The grid is even based on the level base-code.
Incidentally, I'm trying to make as much of the gameplay as possible be based on variables rather than constants. This way I can load these from config files later on, making the game extremely flexible and mod-friendly.
--LazerBlade
No comments:
Post a Comment