So recently I’ve been working on Ninjah 2 again. I last worked on it properly about 18 months ago and while there was a lot that I liked about how it was going, I see now that there are plenty of areas for improvement, which I have now done! As an example I had been storing levels in a weird clunky CSV style format that I made made myself, not because I thought I knew best, more because I didn’t know enough about what was out there. It seems crazy now, but I hadn’t really used JSON at all back then and now with my day job I use it daily so it makes sense that I use it for Ninjah 2.
This will also lend itself well to supplying and sharing levels through the internet. I had hoped to do this through Steamworks, but as I need to have my game Greenlit before I can even test Steamworks, I’m making my own API which I probably intend on making freely available so people can host their own servers if they’re in to that. This then got me thinking about how I could have a master server, that these servers could register with and allow people to connect to (if they wish obviously!). I’m waffling on a bit, but it got me thinking of the days of Quake and Tribes master servers, I never really saw the point back then, but now I’ve stumbled upon it!
The information I was storing within these level files has also been overhauled, I was trying to get a bit too clever and allow for completely unrestricted data and values. On face value this seems like a good thing, but in reflection it could probably lead to issues in the long run. Each level can have it’s own values that manipulate the in game experience, for example, gravity, jump force, shot force etc. Previously I had been storing the exact float value for each of these, but now I’ve just opted for a range of integers between 0-20 that are converted to the relevant values at run time.
I had also been doing some pretty pointless things in relation to how the information was being stored. I had multiple lists, each one consisting of each type of object in the game. Now I just store a 2D array of everything, in the level files and in the editor. This is only converted to the relevant lists during run time, which is much much better and more elegant.
I had mentioned that I intend to add more in game objects other than the rope, gun, colour change and coin mechanics included in the first Ninjah game. I think I intend on staggering this by releasing a new in game item every X weeks, we’ll see!