Snake - Map and level loaders

Published September 08, 2019
Advertisement

Not a particularly exciting update, but since it's been a week since my last post I felt the need to check in.  I've completed the initial version of the JSON loaders for map files and campaign / level files.  I wanted it to be easy for myself (and anyone else looking to create their own levels) to diagnose problems in their map / campaign files.  So I spent a fair bit of time writing code to validate that a map or level is defined properly.  Inside the game itself, if you try loading a level that isn't correctly defined, it'll just show a general loading error but refer you to a log file.  The log file will have all the details about what properties are missing, are of the wrong type, or have values that are out of bounds, etc.

One thing I keep messing up when writing *.json files is forgetting to enclose property names in quote characters.  I'm so used to coding in JavaScript / TypeScript in my day job, where you don't have to!

Having these loaders in place may not make for a particularly exciting update, but it was certainly necessary for getting an easily modifiable story mode going in the game!  This upcoming week, I'll finally be able to get started on the game engine for the story mode. ?

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement