Jump to content
  • Advertisement
  • entries
  • comments
  • views

Snake - Map and level loaders



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. 😀


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!