Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I am working on exactly that right now! That is, using local variables to keep a counter. 

Hmmm. I didn’t think about position. I am glad you brought it up. Thank you!

Yes, I am using the stack save/load functions but for some reason it doesn’t maintain the actors’ status. I haven’t drilled deep enough to understand why, yet. Time is my enemy here. 🙃

I wonder if the stack save preserves position. I will try to sort this out during the weekend.

I wonder if the stack save preserves position.

For what it's worth, when I transition from overworld scene to my battle UI scene, I have to store the actor's position and then restore it when I load back to the overworld map.  I'm not sure if there's another / better way to handle it, but that's what I'm doing when I restore the stack.  I'd imagine that for a platformer / metroidvania it's a much bigger challenge since you could have a lot of enemies per scene to keep track of.

I will need to think through the positions piece of it. I can for certain say that the player position is preserved when saving/loading to/from the stack. I just need to verify all of the other actors. My initial thought was to rely on variable flags for enemy status. That way, I have 16 bits to work with and can limit everything to a single local variable. I don’t ever intend on exceeding that number of enemies per scene. And during scene load, it would check against each flag to determine whether to activate the actor or not.