I achieved a big step in my game yesterday! I am now able to change the current map in the game. Before doing the real code, i have modified the MapContext object with all the initialization process inside one method. The RuntimeContext object can call this method during map switch. It is now possible also to reload a MapContext, updating only what is necessary when the map is used as the current one. The RuntimeContext object is able to load multiple MapContexts and switch between them when the player move to another room.
The current result is pretty rough but it is working !

map change demo

Continue reading

So what is a bitmap font?

Simple bitmap font image

Simple font image

Every game developer has face it during the development: Display a text in the game to show damages or a conversation between two characters. For performance reason, standard fonts (understand TTF ) are not used directly. The preferred way is to use a bitmap font: it is a big image containing all characters used to display a text for a predefined size. The image (a png  file) is linked with a text file with the extension fnt  describing where each character is located in the image and give all necessary information to display the text. (base height, interline, …).

Continue reading

Just finished to implement a new hostile arc vision detection for my monsters. The new algorithm is more realistic because it takes care of where the monster is looking and if there is no solid objects between him and the hostile. It is now possible to hide behind a wall and attack the monster on his back without being detected.

I used LibGDX intersect utilities and some angle computations.