Got these in the game. They ended up being really easy to fight against — I guess that will work well for early in the game though? For future work I’d like to make more difficult variants, maybe that have a sword and shield, or move faster or something.
I’m starting to figure out how I’m going to define the enemies separately from each other, with different walking speed, attack distance, etc.
I made a skeleton and then I put a skeleton in the skeleton.
Right now this is just a new model and animations on top of the same logic that drives the spider. I need to go give it its own logic, maybe make it move around more often so you can see more of its flying animation.
There is now a second way to open a door in a dungeon — you can step on a switch on the floor!
I decided not to use Unity’s physics system, and instead I wrote my own 2D physics stuff. Checking bodies against each other was starting to get expensive so I wrote a quadtree.
Each world chunk has its own quadtree. When a unit crosses from one chunk to the next it get moved into the other quadtree. You can see that happening in the clip below.
Right now I have a separate system for keeping track of the list of items that live in each world chunk, so that when a chunk is destroyed those items get cleaned up. I have a big TODO on that system to notice when an item moves to another chunk and transfer ownership accordingly — currently the item always stays in the list of the chunk it was spawned into. Now that the quadtree system is already looking at when an item crosses a chunk border hopefully I can leverage that system to take care of that TODO.