Sunday, May 3, 2015

Spaceship instrument doodles and a lazy space diner

Another day of slow but steady progress (mostly slow though). Did some refactoring of the hodge podge classes I made for managing objects, read up a bit on gimbal locking, quarterions, ecliptic coordinate system and a bunch of other stuff I still do not understand at all.

On the actual programming side, got the mouse/camera to work by switching from a camera orbiting in a sphere to one orbiting in a ribbon/open topped cylinder (spins around the XZ axis, and ascends/descends perpendicularly on the Y. Managed to get the player's object moving, and last but not least (especially not least) managed to load a mesh from an .x file, despite some minor speedbumps along the way.

Next up: choosing a method of representing the bearing of objects. So far I've only been storing their location (x, y, z), but not their orientation (heading, elevation and banking). Then I need to figure out the (probably simple) math to get the ship to move in the direction it's pointing, i.e. if it's pointing 45° up and 15° to the right and the player presses forward, it needs to move in that direction.

Anyway, enough rambling, have some scribbles and "concept" art. I think this particular ship is growing on me (although the cockpit is too high). I'll probably regain my criticalness and hate it in the morning though.