interesting algoritm..

edited June 2013 in New game ideas
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?
Post edited by g0blinish on

Comments

  • edited June 2013
    Oh, I've thought that you discovered something fresh and it's only another variant of Puzzle Bobble :)

    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
  • edited June 2013
    Ralf wrote: »
    Oh, I've thought that you discovered something fresh and it's only another variant of Puzzle Bobble :)

    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:

    never seen this game. Thank you!
  • edited June 2013
    g0blinish wrote: »
    never seen this game. Thank you!

    Yes, Cannon Bubble is an excellent game, you can even buy it in cassette format still from Retroworks ;)
  • edited June 2013
    Ivanzx wrote: »
    Yes, Cannon Bubble is an excellent game, you can even buy it in cassette format still from Retroworks ;)
    I haven't real Spectrum:sad:
  • edited June 2013
    Ralf wrote: »
    Oh, I've thought that you discovered something fresh and it's only another variant of Puzzle Bobble :)

    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. :)
    Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
    My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
    Twitter: Sokurah
  • edited June 2013
    I find it both hilarious and tragic how these old games that you can play a million different ways for free keep turning up lately as pay-to-play apps.
    Joefish
    - IONIAN-GAMES.com -
  • edited June 2013
    Sokurah wrote: »
    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. :)
    16384000 versions but not with algo.
  • edited June 2013
    Is it not -

    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 ;)
  • edited June 2013
    Is it not -

    if ball fired touches 3 or more of the same colour in a group (flood fill algorithm): remove these balls

    this is obviously, my code works for remove cells with the same colour neighbours
    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 ;)
    XXXYYYAAABBBCCCDDDEEE
    YYY                          DDD
    AAA        GGG             FFF
    BBB    GGGGGGGGG      BBB
    
    how to detect 'GGG'-area?
  • edited June 2013
    Flood fill from the balls at the top of the screen.

    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.
  • edited June 2013
    Flood fill from the balls at the top of the screen.

    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.

    guess, better is to manipulate with memory, not with the screen.
  • edited June 2013
    Yes, do it in memory not the screen. You can easily tell which balls touch the edge of the screen I presume. You need to know which row is at the top of the screen as well.

    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.
  • edited June 2013
    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
    AAA    AAABBB   CCCDDD
    
    in this case better to determine an empty row.
  • edited June 2013
    Yeah, use square tiles in a regular brick pattern (offset each alternate row by half tile width), same as a hex grid. You just need to modify the flood fill algorithm to check 6 neighbours rather than 8 (not difficult though).

    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...
  • edited June 2013
    ouch
    I was mistaken with calculations. it is necessary to remake floodfill:mad:
Sign In or Register to comment.