Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Aw thank you! I've been enjoying playing people's games in the jam during my free time and I like trying to help other people with some of their game design as well. Speaking of free time, I tried to see if I could come up with a solution to the enemies colliding based on a previous grid-based puzzle game I made a while ago. I'm not 100% sure if this will end up working  however.

One way I can think of to prevent the enemies from colliding together after rewinding is that if an enemy rewinds into a spot that another enemy is in, it would cause a chain reaction of that enemy to also rewind back into its previous spot.

As for the enemies' normal movement, during a turn where enemies are about to move, an array will iterate through each enemy to determine their movement.

When the array iterates to the first enemy, they will determine the spot they want to move to and "claim" the location of the spot.


When the array iterates to the next enemy, they will check and see if the spot they want to move to is claimed or not. If the spot IS claimed, the area will be treated like a wall and will try to claim an area around it. Either that or they will just claim the spot they're already in if there's
absolutely no way around the previous enemy's claimed spot.


If the enemy finds a spot to move to then they will claim that spot, and the array will continue to iterate until there are no enemies left.



Once the array is done iterating, the enemies will move to their claimed spots all at once.


(+1)

Thanks for the reply, not gonna lie, I basically already thought of what you mentioned except for claiming spots (because i didnt have a movement animation before so it wasnt needed) but I will try to fix it some time. I just found out that you can do yield return StartCoroutine() which will really help with getting this to work properly. I will use your idea and have an foreach loop claiming positions for all the enemies and then another one moving them all. Anyway, I might not do this straight away but I am thinking about uploading a better version of the game on a new itch page so feel free to look out for that some time soon!

(+1)

Alright, I have fixed all of the bugs that I have found in the game and posted it at https://break1.itch.io/rewinder . Feel free to check it out if you want and thanks again for your comments!