I’m working away on my un-named project, which is starting to take shape nicely. When it’s eventually finished it’ll be some sort of game engine-thing for making 2D style sprite based games – shooters, platformers, and so on. I have no idea what to call it though – a framework seems to be something like XNA where you have a collection of classes and libraries that can be bolted together and compiled up to make a program. An engine seems to be something similar, or the part of a game you get when all the assets and levels are stripped out – imagine Doom without its WAD files.
The thing I’m making will read an XML control file, all the game’s assets and some (probably) LUA scripts that will control sprite behaviour. The XML control file will tell the engine/framework/environment-thing that we are making a specific type of game, where to find all the assets, what the menu screens will look like and how they link, and how each level is defined.
So I could create a game that was a sprite-based, horizontally scrolling game that used a tilemap to create a platformer. By altering the XML I could create a vertically scrolling sprite-based game where enemy sprites moved down the screen, and the player sprite was welded to the bottom of the screen. And so on. All the various attributes of simple 2D games will be programmed into the engine and the XML will turn on the required features to make the game.
So I suppose it’s a bit like one of those point-and-click game making programs, only without the pointing and clicking, and more of the editing files and remembering to close XML tags. And then there’s the scriptable sprite AI I want to add too, so that the person making the game is free to control how the enemies move about the screen.
So far I have correctly parsed the XML file, and can create a correctly functioning screen sequence. So it’s possible to define a splash screen that is shown for three seconds, then show the game’s logo for one second, before going into the main menu. All the menu structure is contained in the XML file, none of it is pre-programmed. The menus are fairly simple Doom-like lists of things to select, it is a game after all, not Powerpoint.
Hopefully I should have a working menu system completed soon, with the user able to navigate the menu tree, exit the game cleanly, and start a game – at which point the system will go “huh?” and show a black screen. However then it’s my aim to add other important things like a pause screen, and a quit-game system.
Eventually I’ll then have something worth showing pictures of. It’s not that thrilling showing a page of XML which is in development and subject to change as I find better ways of representing the ideas I have.
Ultimately I should be able to produce certain styles of gameplay by editing the control file, providing the graphics and sounds, defining the levels and writing enemy AI. All the important stuff (handling the game loop, user inputs, playing sounds, drawing on the screen, keeping score, etc…) will be already done for me.
It’s all good fun and interesting stuff. The LUA bit could get interesting, I’ve never used it before.