Monday 14 September 2009

Development diary #1

So here it is : my first development diary.

If you are here for the first time, and wonder what the hell that picture is about, I suggest you start reading the previous article, explaining what Biosphere is all about ;).

Preliminary work and prototype ?

For the last couple of months, I have spent my time mostly thinking about the game, and writing up various documents, be it a game design document, UML class chart, concept art, or just random ideas on a piece of paper.

The first prototype I managed to put in place featured a simplistic view of a solar system, with rotating planets, as well as a randomly generated planet with varying LODs, and a zooming feature allowing the user to look at the planet's landscape closely, as well as admiring the planets' rotations. I made this prototype in order to solve a few technical issues (notably the varying LOD), get a general feel of game ( if the sliced 2D view really worked ), and basically whether I thought the game would work.

Expanding from this small prototype, I messed around with the code, adding new features and testing out bits and bobs to see what else I could add to the game.

What about now ?

From there, following my various charts and notes, With the word "modular" in mind, I have started from scratch, programming the lower layer classes that will handle vital information, external components, and provide the game with dynamic information. These components include configuration files, to defines various engine variables, such as screen resolution, level of detail, language, keyboard mapping, etc., but also custom localization files, that enable the game to handle different languages, but also allow new languages to be added later on (I only intend to release it in english and french for now, but it is still nice to know it is possible).

Finally, the last two days, I have been linking all these handlers together, as well as other minor classes, under one main component : the game engine.

I'm not a pro (yet... ^^), I don't know what is the best way to make a game, or if my way is a good one, but here is how I went:

The game will be split into two parts, the engine, and game states. Basically, the engine is a huge controller, which handles the window, input and output, reads and write from/to external files, and plays the game state (can be a level, a menu, or just a cut scene), forwarding all the necessary info (mouse input, external data) to the current game, and then outputs what is necessary (console information, picture, sound, saved game, etc.).

I won't go too much into detail in this first development diary, but I might describe the structure in detail if people are interested ;) .

Anyway, for the moment, the brand new engine is working and running, and this is pretty much all it can do for the moment:
  • Can read external files such as configuration files and localization files.
  • Implements a console which incorporates a graphical display as well as a log (for debugging purposes).
  • Can play game states, and also has a nice fade in/out effect when switching between screens.

What next?

Missing from the list, and which will be next are :

  • Input/Output handling of the keyboard and mouse ( I use SFML for the input, but it does not provide all the control I need).
  • A modular graphical handler ( considering the game uses both SFML and OpenGL).

Here, done with the first development diary, hope you enjoyed reading it, and please leave a few words, questions, advice, or just a constructive comment, and look forward to the following development diary in a couple of weeks.