Game Programming

Tile Popup

by Cory on December 25, 2018 9:28 PM (Edited December 25, 2018 9:34 PM)

Progress is once again slow.

I actually spent a few weeks refactoring my scene graph, making it go faster, and fixing memory leaks/slowdowns. I made the scenegraph it's own structure instead of a "Spatial" component because the ECS system is too slow as it is now. Also I was thinking it might be better to promote it to an actual data structure again since it's really an exception to most Component types.

I also fixed a memory leak that I re-introduced where I rebuild the EntitySubscriptions every update. It was a huge struggle to debug this. I filled up all the memory leaks and stuff and everything. I ended up just doing a git bisect to find where the bug came from. What I took away from this is basically every part of my engine I wrote so far needs to be re-examined, updated, and optimized. I don't think I wasted time on this though because things should be much easier to redesign now that I have a working "first draft" going on.

Anyway here's the real meat of this update:

I made this thing I call a "tile popup" that comes up when you right click on a tile. It shows all the overlapping tiles  in the grid space that you clicked in and lets you also individually delete tiles if desired.

The next things to work on are more tile map editor tools like selecting a chunk of map and moving it around. Or cloning a section and stamping it everywhere. I hope this will be satisfactory and I can get to actually designing a map and working on the game mechanics again.

By the way, I also wrote all this really long and complex code all in this one BuilderScene.cpp file. My current strategy is to just dump everything in the BuilderScene file and figure out common patterns and things that can be refactored into actual code structures later. Such is life...

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.

back to the