Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi

I've written code for the same game in a different language. I'm impressed how you got the discs to all explode together. That is, there's no delay between one disc disappearing and the next one's after that. Just wondering if you'd be willing to let me know the logic you used to check which discs are going to disappear and how you get them to do that all together. Mine go one at a time with a small delay in between while it calculates the next disk to get rid of. Thanks for any feedback.

Hi bazzasherlock, that's cool!

Sure, I made the code for this game open source some time ago. You can find it on my Github repo.

In particular, have a look at the checkMatches function, line 91 of the drop7.es6 file (here). As you can see, I first iterate through the whole grid and push into a list all the discs that are supposed to explode. Then, I call explosionAnimStart (line 115) passing all the discs that should explode as an argument in one single call.

The other files contain the rest of the code, such as the specifics on the explosion animation.

Hope this helps, good luck with your game development!