Lachlan's misadventures in games programming

Monday, 18 July 2011

Platform Progress - Consoles

7/18/2011 01:56:00 pm Posted by Lachlan , , No comments

I've spent the last few days getting the console up and running. And it does.

Thus far, it can now access and manipulate things in classes which are exposed to it. For instance, the Game class is exposed to the 'Puppetmaster' (as I've dubbed it). If I load the console (Quake 1 style - by pushing ~), I can check what the cameras x value is by typing
Game camera_x
which will then return something along the lines of
I can also set camera_x in much the same way
Game camera_x = 30
This is advantageous because it is laying the foundation for me to be able to change the game without having to recompile. If I want new types of platforms etc, I may need to add them in C++ code. However, I'll be able to place them and modify them within the game itself (or in the editor of the game - which is currently (and will stay) in the same source as the game). The program is also going to use the triggers and console itself - in what may not be particularly efficient, but is going to make my job easier. For instance, I will add a Trigger underneath a block which tells the PuppetMaster that it's time for the block to the fall.

And so far it works!

Part of this has been learning to use the boost library - which I'm impressed with. I'm impressed with how consistent it is with the C++ STL itself - accessing regex results is done exactly the same way with iterators as any of the STL containers. I'm also finding boost::lexicalcast<> an absolute lifesaver.

I'm thinking next will be a very basic GUI for accessing code and using triggers that will operate through the PuppetMaster to make my life easier. Either that or just adding the template dude to make him jump around...

Wednesday, 13 July 2011

(Yet to be determined) Platform Game

7/13/2011 03:41:00 pm Posted by Lachlan No comments

You might be prone to ask 'What has Lachlan been doing since we saw the release of The (lite) night the Martians Came?' 'What masterful example of gaming is coming next?'

For a while, it looked like it might be soccer. But it's not. I've started programming a platform game of some form. I'm not sure whether this is the start of the codebase of 'The War of the Apocalypse Samurai' or not yet - but it is a platform game. I'm writing the level editor in the same engine as actual game to hopefully make it easier to keep making the game.

So far, it does a grand total of render platforms (ie. plain, red rectangles bordered by a slighter lighter red). The editor also allows you to add platforms by switching into editor mode (e) and placing a platform (p). I've started work on a console as well - which will be fairly important 'cause all scripted events, and most properties of platforms/moving things/actors etc will be changable by the console and the so-called GUI of the editor will mostly be links to the console.

At the moment, everything is going to be simply rendered as boxes until the game is playable and maybe even a little fun. Then I'll start worrying about looks.

I've no idea where or how this will finish. But the goal is set: A platform game - of some kind. Even if I do use it for War, it is likely a more simple game will be made first.