I’m going to hold off on tweaking the path finding and smoothing algorithms until later. Instead, this week I decided to take what I learned from last week to create a new application that I’ll be developing along side the game. It will have much of the same code as the game, but it’s main functionality will be a level editor. This will save me a lot of time in creating each room of the game. I’ll be able to quickly layout the room and easily edit them visually instead of the long slow process of doing it in code.
I will be able to drop in a background, click and draw where I want the walk boxes to be and how they connect with each other. I’ll be able to add portals/doors, game objects and other sprites into it. Then when I’m done with the level, I can save the configuration to a json file so the game will be able to easily load it.
I have the file loading, exporting to json, and path finding working with a test mode, but I need to add the tools yet to add other objects, and images. I also need to add the ability to delete points of a polygon or whole polygons.
Here is a demo of it so far.