HiveMindStudios

Creating great software, one line at a time

Blog

Grouping in PopPopRush has some complications, as the amount of "gels" in a group and the layout of those gels has a massive number of different combinations, so instead of hard-coding a method that looks at all the ways they could end up in a big enough group, I wrote an algorithm to handle group-searching through all the gels.

The first step is to simply select a gel to consider, in my case I just start with one closest to the bottom left that hasn't allready been checked. This gel is considered "Grouped" and is set "To be checked"

The second is very simple but works elegantly, for the tiles horizontally and vertically connected to the inital gel on our list "To be checked", which in this case is just the first gel we selected, the algorithm checks if the gel it's looking to add is in the group allready, if it's not it adds them to the current group if they are the same colour or if one of the gels is a "Rainbow" gel. If the gel is a "Grey" gel, it's added to a different group called "Grey group" where it can be cleared along with the rest of the gels, but doesn't add to the amount of gels in the group, which is important. These new tiles are added to a group called "To be checked" then finally marks the added tiles as "Grouped".

This second stage is repeated untill the number of gels added to the group last time it tried to expand the group is zero, at which point the algorithm checks if the group size is larger than 4 it removes the group and any greys that were adjacent, ready for the next group to be looked at and for the game to drop any floating gels down.

Today i rewrote the wave function, so the various different enemies come in pre-determined waves, including the new 'fast' variant.

I've done some small improvements to the map art and added animations for the AOE turret. all the turrets have had their art improved slightly and been defined by a colour scheme for each. information hover-overs have been added and the following turrets have all been added; AOE,AOEII, AOESlow, AOEBurst, FlameTwin, NormalII.

today i've chaged the somtimes-visible textbox's to actual healthbars now, rewrote the UI system so it handles a lot better, less work for me & better for the player. I've added a higher DPS flamethrower (it's purple!) as well as a 'next wave' information box. New flags have been added to make adding new content easier and less of a mess and a new AoE turret is now in.