IDE switch, managed code, services, singletons, oh dear!

Recently I changed my development IDE from Project Studio IDE to BLIde. I’m sad to let PSI go, but as development of that IDE has stopped and I experienced weird beta behavior a change was needed. Thanks Matt for your fine IDE; it was awesome while it lasted.

So now I am exploring the world of managed code, which is rather nice. It takes away the burden of imports, includes and file management in general.

Converting my game framework to managed code is underway, and made me realize that my ‘framework’ is not really a framework, but a collection of independent systems. There is nothing wrong with that, but I want to move to a solution which will provide the basis, ready to be extended for each game I am going to make.

So, my various systems are to be converted to Services. Converting the game engine to services is a tip I took from the Retro Remakes Framework. That framework looks really nice (although in some weird way I was already doing a lot of things in a similar manner), and I wanted to start using it but as I want to remain free of where I am going with this game (distribution wise) I do not want to use their code, which is free and meant for freeware remakes. So I took that concept, and shape it to fit how I create games.

The services are implemented as singletons. This is a nice concept which also has the advantage of getting rid of a lot of Global variables and fields in game types. A singleton is a type of which only one instance can be created, and just lives ‘out there’, ready to be used by whatever piece of code.

My game needs total control over what is updated and rendered in every single state, so the concept of services updating and rendering all the time is not used. It is now possible to determine this by game state which is cool. I for instance may not want to update the particle engine when the game is in Attract state or, say, Game Over state. Also, each game state must be able to move through steps in each state. Think of the Play state going through various enter, play, die, play, die steps.

Lots of work to do, but it’s fun even though finishing the game (ah, keep dreaming) will take some more time.

3 Responses to “IDE switch, managed code, services, singletons, oh dear!”


  1. 1 Paul Maskelyne (Muttley) October 13, 2009 at 10:09

    Hi Wiebo,

    Glad you at least found some of the ideas in RRFW useful, even if you’re not using it yourself. It would be great to have a few more talented developers working on or with it though. ;)

    I’ve recently made some changes to the way framework works, as I found the existing TGameState mechanism was a bit limiting. You can still do things in a similar way if you want, but we now have the concept of a assigning renderable objects to render layers, which are then processed accordingly. Of course you can then add/move/remove these renderables at any time. There’s also now a high-level Game Manager class you can override which allows you to have something to manage actual game flow (I borrowed this idea from Angel Engine, which is a C++/OpenGL based 2D game framework developed by some guys at EA: http://code.google.com/p/angel-engine/). This is still a little WIP, but basically works (I need to fix all the examples now however).

    One thing I’d like to point out is that the license for the framework (Artistic License 2.0) was specifically chosen so that people who want to use it for writing a commercial game are free to do so without having to apply the same license to their own code/game (as would be the case with GPL for instance). The only major thing specifically prohibited is taking the Framework itself and then sell/license it, either with or without changes.

    Basically, Artistic License 2.0 protects the source code of the Framework a bit more than, say, MIT would, but doesn’t limit your use of it by forcing you to use the same license as the GPL does. :)

    Oh, and I agree that BLIde is becoming a great editor (I’ve been using it for a couple of years now). It still has a few usability issues, but until Brucey finishes his Eclipse plugin it’s a much nicer option than the default IDE. ;)

    • 2 Wiebo October 13, 2009 at 10:46

      Hi Muttley,

      Interesting. If I can use the RR framework for the developement of my game and be free to do with my game as I choose, then I might reconsider using it for my development…

      I’ll get back to you via email.

  2. 3 Paul Maskelyne (Muttley) October 13, 2009 at 14:26

    Cool. Look forward to hearing from you. :)


Leave a Reply