Loading Map Files
by Cory on October 10, 2018 8:05 PM
I made some more code to create a flash notification that goes away when you click off of it and a textbox that you can type things into. I'm revealing a lot of rough edges of the codebase that I have right now which is kind of demotivating but also a good thing because I can see where improvements are needed.
I have a textbox where you can type in most alphanumeric ASCII characters with a working backspace. Next I can use the textbox string to load scene data. This is all so I can edit multiple tilemaps with the same code and then finally put a nicer tilemap behind the megaman physics scene.
Of course, this reveals an issue with my input system. I have the "G", "D", "R", and "S" keys bound to special actions that do things like serialize data back to the file, hide/show the grid, hide/show debug boxes, and reset the camera. When you're typing into the textbox, you'll activate these functions if you press the right key. I think I"m going to temporarily make it so that you need to hit "Ctrl" and then the character to do the actions so they don't interfere with typing.
The real solution I think is to modify my input handling infrastructure to allow for "input mapping contexts" that I can enable or disable at will. I found this sweet article that talks about it in a high level way:
I'm kind of excited about refactoring it because I'm not really happy with how the current version turned out. Time to do some well needed editing. I'll save it for after finishing this map file loading "story" though.
This Thought is part of Game Programming
Game programming general topic. I eventually hope to split this into separate ideas exclusively about specific games that I make.