I’ve been focusing mostly on my scene serialization lately.
First, I refactored the maps to remove the hardcoded TileTypes enum, which used to map 0 to grass and 1 to sand.
Instead, I implemented a system where this is defined in the grid section of the scene’s json file. The “id” property is now a generic unsigned integer for the tile type, and the “texture” property references a specific asset loaded in the scene.
I also added a “properties” section for the scene’s name and a “clear_color” array. This lets you dynamically change the window’s background color on the fly instead of always defaulting to a hardcoded black.
Writing the new methods and sorting out the custom serialization logic took a bit of work, but it is working great now.
also bumped the map file “version” to 2, even though the reading/writing of map files didn’t change at all, the usage of some bytes did kind of change (for the tiletype) so i felt it was fitting
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.