interesting algoritm..
look at Dynomite!/Popcap game(1:00-1:10):
http://www.youtube.com/watch?v=D10Tbisq9VM
How to define what blocks from balls have to fall?
http://www.youtube.com/watch?v=D10Tbisq9VM
How to define what blocks from balls have to fall?
Post edited by g0blinish on
Comments
http://www.arcade-museum.com/game_detail.php?game_id=9169
By the way there is already a Spectrum version of this game called Cannon Bubble:
http://www.worldofspectrum.org/infoseekid.cgi?id=0017573
never seen this game. Thank you!
Yes, Cannon Bubble is an excellent game, you can even buy it in cassette format still from Retroworks ;)
Heh, yeah, at last count there were 16384000 versions of this game in existence.
But it's always nice to discover a game(type) you like but didn't know of before. :)
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
Twitter: Sokurah
- IONIAN-GAMES.com -
if ball fired touches 3 or more of the same colour in a group (flood fill algorithm): remove these balls
then remove any isolated groups (flood fill from all balls on topmost row) - any balls not connected won't be flood filled - remove those too.
I've never played this game or any like it though ;)
this is obviously, my code works for remove cells with the same colour neighbours
how to detect 'GGG'-area?
G, B, D and F won't be touched by the flood fill.
Maybe you want to keep the balls touching the sides of the screen as well? In which case D & F will be touched by the flood fill as well.
Remove all balls not touched by the flood fill afterwards.
guess, better is to manipulate with memory, not with the screen.
Presumably you use a circular buffer for scrolling the screen? That's how I'd do it (a regular hex grid 1 screen or so rows in size that wraps around every time a line would scroll off the bottom of the screen). Much easier to deal with than just a list/array of the ball positions.
I planned to use color rectangles that will help to avoid hexgrid use
An algo doesn't fit to last row in this case better to determine an empty row.
EDIT: If you use a circular buffer probably best to have blank rows above and below the "real" top and bottom rows, means there are no special cases in the flood fill algorithm to cope with. Always use a power of 2 for your total number of rows then you can wrap the circular buffer around with only logical AND rather than modulo arithmetic (remainder).
Not understanding the last paragraph...
I was mistaken with calculations. it is necessary to remake floodfill:mad: