User Tag List

Results 1 to 8 of 8

Thread: Need help with "Canabalt-Style Infinite Runner From Scratch"

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    wii1mii's Avatar
    Join Date
    Sep 2012
    Location
    Estonia
    Posts
    107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Need help with "Canabalt-Style Infinite Runner From Scratch"

    Hello,

    I followed "http://hub.tutsplus.com/tutorials/build-a-canabalt-style-infinite-runner-from-scratch--gamedev-48" tutorial but i ran into a problem, if the speed goes faster than 33, blocks are started to be generated with realy small gaps in between.

    http://i.imgur.com/fj2C5y7.jpg (here is a picture)

    Can anyone help me fix it ?

    Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,310
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wii1mii View Post
    Hello,

    I followed "http://hub.tutsplus.com/tutorials/build-a-canabalt-style-infinite-runner-from-scratch--gamedev-48" tutorial but i ran into a problem, if the speed goes faster than 33, blocks are started to be generated with realy small gaps in between.

    http://i.imgur.com/fj2C5y7.jpg (here is a picture)

    Can anyone help me fix it ?

    Thanks
    If you use the graphics that the guy who made the tutorial provided, you'll find that this isn't a problem, since the platforms are wider than 32 pixels (have you seen the full thing yet?). You can simply make your platforms the same size, make the same hotspot change, and then you should be set.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    wii1mii's Avatar
    Join Date
    Sep 2012
    Location
    Estonia
    Posts
    107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    But i suppose there should be a way to fix the code aswell right ?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,310
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wii1mii View Post
    But i suppose there should be a way to fix the code aswell right ?
    Nope, I'm pretty sure it's an issue with the way it's done, and, as a result, it will have the tiny gaps in it unless you make the change I mentioned (making the graphics wider).

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,134
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I haven't looked at it but there DEFINITELY would be a way to fix the code... maybe you have to re-do it.. but there's always a way.

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably aren't creating them frequently enough. I imagine you're creating on a timer, and then they move and for the start they're created frequently enough that they overlap and there is no gap. But as the game speeds up, each block is further and further away by the time the new one is created. Eventually there starts to be space between them. Either make your graphics wider or make the blocks more often.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,310
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jacob View Post
    You probably aren't creating them frequently enough. I imagine you're creating on a timer, and then they move and for the start they're created frequently enough that they overlap and there is no gap. But as the game speeds up, each block is further and further away by the time the new one is created. Eventually there starts to be space between them. Either make your graphics wider or make the blocks more often.
    Actually, the tutorial uses the modulus function to create them without the gap. The problem is, however, that it doesn't perfectly create them without a gap at certain speeds (probably due to rounding). This doesn't happen after the graphics have been added due to the fact that the graphics for the platforms are bigger, and, as a result, you won't notice the gaps.

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the graphics are bigger, then you have overlap and the solution remains the same. Either create more often, or use wider graphics. Either increases overlap/decreases gap.

Similar Threads

  1. Petit soucis avec un jeu style "Space invaders"
    By Alkan in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 17th April 2012, 03:27 AM
  2. jeu style "boulder dash"ou"supaplex" aides S.V.P
    By markymoniom in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th December 2010, 07:02 AM
  3. "Brick Breaking" Style of Game Paddle Size Glitch
    By MajorityCA in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th April 2009, 06:05 PM
  4. Phizix - "Super Mario Galaxy"-style gravity
    By Raylax in forum File Archive
    Replies: 10
    Last Post: 7th December 2008, 12:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •