Zuma clone Ball Movement

Discussion in 'Game Development (Technical)' started by joran420, May 29, 2006.

  1. joran420

    Original Member

    Joined:
    Apr 30, 2006
    Messages:
    2
    Likes Received:
    0
    whats the best way to handel moving the balls along a point array?

    when i use 1 interval and do a for loop to move all the balls currently on screen it seems like it slows down as more balls are added to the screen

    So I put the movement code in the onEnterFrame...I could also do a seperate interval for each ball(but that doesnt seem like it would lighten the load any)

    so just looking for input on ways to move Several objects along an array of (x,y) points that isnt very processor intensive and keeps them moving at a constant rate(unless theres interaction)

    this is in Flash 8 by the way
     
  2. zoombapup

    Moderator Original Member

    Joined:
    Nov 25, 2004
    Messages:
    2,890
    Likes Received:
    0
    I'd expect that zuma uses a spline and simply solves the position along the spline at time X, then each ball has its time value which determines where in the chain it is.

    Then all of the game is reduced to basically pushing around these floating point time values for the ball. Essentially down to a 1 dimensional issue.

    I could of course be wrong, but I studied it at some lenght and noticed that on sharp angles the path of the balls definitely has spline like continuity and the balls overlap (i.e. the balls arent physically based).
     
  3. Bmc

    Bmc New Member

    Joined:
    Dec 12, 2004
    Messages:
    1,088
    Likes Received:
    2
    search the forum, it's been talked about before in great detail.

    you will find all the info you need
     
  4. ggambett

    Moderator Original Member Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    1,982
    Likes Received:
    6
    I used bezier curves in Pirate Poppers. I experimented with physically based balls (ie moving the balls further in the curve until they don't overlap) and it feels horrible... having balls moving at a different speed along the curve it's very distracting, almost dizzying.
     
  5. spellcaster

    Original Member

    Joined:
    Mar 27, 2006
    Messages:
    259
    Likes Received:
    0
    I cheated. I had the problem that using the bezier curve function resulted in different speeds of the balls. So, I simply used a bitmap with the movement path drawn onto it. To ensure I get thr ight pixel, I changed the bezier drawing function so it draws the pixels in colors 1-15. So, if my current position is color index 1 I just need to find the pixel with color index 2. Done.
    Since you can create the path bitmaps on the fly you don't waste any space on the HD (Just make sure you create the bitmap in ram and not in VRam ;))

    Edit:
    Regarding Pirate Poppers: Great game, esp. the music. You already had me on the buy page but the price spoiled it for me ;)
     
    #5 spellcaster, May 30, 2006
    Last edited: May 30, 2006
  6. Emmanuel

    Moderator Original Member

    Joined:
    Nov 23, 2004
    Messages:
    859
    Likes Received:
    0
    That's a little violent.. It might cause you some grief if you have sharp turns, as well.

    What you need to do is to normalize your curve according to the arc length, so that a constant increase of the weight amounts to a constant increase in pixel distance. If you're using Flash you probably want to do it ahead of time instead of have the game do it.

    Best regards,
    Emmanuel
     
  7. spellcaster

    Original Member

    Joined:
    Mar 27, 2006
    Messages:
    259
    Likes Received:
    0
    Yes, but it was for a 72h compo, and the lib I was using just returned a fixed amount of points. I was lazy and wanted a fast and working solution. So, in stead of writing my own bezier solver I cheated.
     
  8. ggambett

    Moderator Original Member Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    1,982
    Likes Received:
    6
    Did you really expect anything different to $20? :)
     
  9. jmc

    jmc
    Original Member

    Joined:
    Apr 9, 2006
    Messages:
    80
    Likes Received:
    0
    Yeah, i would expect new things, like tracks that split, or change ( like train tracks that change routes when you hit the handle ). Not a simple clone.

    Jmc.
     
  10. Savant

    Original Member

    Joined:
    Feb 8, 2005
    Messages:
    1,674
    Likes Received:
    0
    Daaaaaaamn...
     
  11. ggambett

    Moderator Original Member Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    1,982
    Likes Received:
    6
    Please read what I wrote again. No, I'll make it easier : I meant "does a $20 price point really look surprising for a casual game?".

    We thought about train tracks and detours. We couldn't find a way to make it work and be fun. BTW, regarding "simple clone", where did we clone the Puzzle Mode from? Where did we clone the Arcade Mode from? Where did we clone the living map from?
     
  12. Emmanuel

    Moderator Original Member

    Joined:
    Nov 23, 2004
    Messages:
    859
    Likes Received:
    0
    Well as you know, jmc/patrox, the train tracks and railway switches got cut from Atlantis since it was complex and not provably fun at the time. Maybe someday.

    Best regards,
    Emmanuel
     
  13. spellcaster

    Original Member

    Joined:
    Mar 27, 2006
    Messages:
    259
    Likes Received:
    0
    Yep. I was expecting a 9.99 or 14.99 price. 9.99 would have made me click buy directly. 14.99 would have taken longer, but I guess I would have bought it. But 19.99 is a total show-stopper for me.
     
  14. Sakura Games

    Original Member

    Joined:
    Feb 28, 2006
    Messages:
    239
    Likes Received:
    0
    Well just use one of the portals gamepass and you can get it for $6.99 without hurting developer's gain and everyone is happy.
     
  15. iopred

    Indie Author

    Joined:
    Apr 2, 2005
    Messages:
    42
    Likes Received:
    0
    You win the thread, I was a little sad until this cheered me up.
     
  16. spellcaster

    Original Member

    Joined:
    Mar 27, 2006
    Messages:
    259
    Likes Received:
    0
    Would be an option, but right now "not buying" is also ok for me ;)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer