Unfortunately this and next week I won’t have enough time to make any progress so instead, I have decided to show you some of the tools I have created for debugging the game.
![5d0af9c6e0b7c.gif 5d0af9c6e0b7c.gif](https://i.gjcdn.net/public-data/fireside/posts/4/1/266501/media/5d0af9c6e0b7c-rrjzwvkh.gif)
First of all, I am developing this game in javascript with the use of some new functionalities like generators classes. For the base of my game engine, I am using Phaser JS mainly for drawing tilemaps and playing sounds and music. I have integrated it with React JS with I use for drawing UI elements like buttons that you see on top and bottom of the screen and for drawing overlay panels like debug panel you can see on screen. For managing data flow in the application, I have chosen to use Redux it’s not a fully valid use of it immutable state philosophy but it’s great for command pattern engine where every operation that deserves to be preserved in some save file will be present in Redux store.
I am also using Lodash for some data and functions manipulation and some minor other libraries for some other smaller task but that about everything about external libraries.
On top of them, I have created a framework where every aspect of the game has its own system which describes what to do with all that data stored in Redux store and what parts of Phaser to use. They all can be activated and deactivated so I can check which one causes bottleneck while playing the game. All those systems have at least one logger which state also persist inside of Redux data store. Loggers have access to Phaser drawing layers so when they are active they can draw some debug information after each frame processing. They also log some info to console when they are active the amount of info depends on their logging level. In the screen, above I have shown for example AI logger which shows the current state of AI on different characters, or Physique logger that shows collision box for characters, and entity logger that shows what area of the map is revealed by character and what tiles are taken by it.
0 comments