Engine Design – Debug Console

I’m currently working on my own game engine and while it’s no where near from being finished, I’ve applied a couple of design patterns when creating the different systems. In the coming weeks I’ll go through a system each at a time and write about how I have implemented them and what problems I might have stumbled upon.


This week’s system is the debug console which I regularly use when debugging or changing stuff on the fly in-engine.

The debug console is one of the first systems which I created in the development of the engine. As such the debug console haven’t been planned out as well or optimized as other systems. But since it’s mostly used during the development process I think that optimization can be focused on other areas of the engine instead.

Now, this is how I have it set up currently.

Continue reading

Advertisements

Engine Design – Input Commands

Command

I’m currently working on my own game engine and while it’s no where near from being finished, I’ve applied a couple of design patterns when creating the different systems. In the coming weeks I’ll go through a system each at a time and write about how I have implemented them and what problems I might have stumbled upon.


This week’s system is the input system which enables the player, may it be everything from a tank to a warrior with an axe, to move and perform all their desired actions.

When first starting on the development of the input system i set out two goals which needed to be met in order for it to be a successful implementation.

  • First, all actions needed to be rebindable, players should not be forced to use a specific layout. Forced mapping layouts cause trouble when users don’t have that particular region layout on their keyboard and it certainly makes it difficult for physically disabled persons to enjoy a great game.
  • Second, when checking whether an action should be called there should be a simple way of doing so. An easy to use interface which is as simple as an if statement.

The current solution works like this.
Continue reading