Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Little Jumping Thing

edited June 2012 in Code Sharing Posts: 85

I've done this little animation inspired on a Cocos tutorial that I found. The mountains and sky are procedural and it runs at 60 FPS.

I hope you enjoy.


  • Posts: 580

    That's awesome, nice work!

  • Posts: 2,728

    Hi @pepinganos,

    Got to agree with @toadkick here - awesome, superb - I will go through your code to see if I can understand it (unlikely). Hope I can learn a lot from it.




  • Posts: 1,255

    That's lovely. Very nicely done.

  • Posts: 115

    Very nice looking video. Thanks for posting it and the code.

    However, copying and pasting from github creates an error in each class tab. A couple errors were formatting issues via email I suppose but some errors are a little over my head.

    I'll keep trying to figure them out but wanted to know if anyone else had any errors.

    Thanks again.

  • Posts: 85

    @Keebo, I don't know what can be causing that. Maybe you could try to transfer the code with iExplorer.

  • Posts: 85

    @Bri_G, I've tried to comment the code as clearly as possible and to keep it as simple as possible in order to be "pedagogical".

    I also think it's optimized enough to allow to construct a true game without losing the 60 FPS.

  • edited June 2012 Posts: 2,728

    Hi @pepinganos and @Keebo,

    Thanks for the code, too tied up with other things at the moment to digest it fully, but will no doubt be back for advice later.

    On the github front, I think there is a download link, there certainly is when I out the code in on my gists.





  • Posts: 115

    I got it working with iExplorer. Thanks for the tip.

    @pepinganos, this is a very nice project. Looking forward to learning from it.

    Thank you for sharing.

  • Posts: 154


  • edited June 2012 Posts: 437

    Absolute amazing,I was looking for a good way to do this long time ago in this post

    Thank you so much :-)

  • SimeonSimeon Admin Mod
    Posts: 5,782

    Great work, @pepinganos!

  • edited July 2012 Posts: 437

    I have an error

    error: error: [string "Hills = class()..."]:77: attempt to index field '?' (a nil value)


    • position.x = -1939952
    • hero.ball.x = 395.409
    • hero.speed = 940

    Looks like self.keyPoints[self.toKeyPoint] is nil, i am investigating O:)

  • Posts: 85

    Hola @juaxix,

    It's not an error, it's a feature...

    Now seriously, that error arises when you get to the end of keyPoints[], then the program stops. Remember it's not a finished game, only an engine. You have to test for the end of the points in the array.

  • edited July 2012 Posts: 437

    Ah, it is more simple than I was thinking :-)
    Thanks you so much for the code, i am preparing a new game with this :-)

  • Posts: 421

    @pepinganos Your lovely demo has now been resurrected on the Codea Community Repo for everyone to enjoy once again :smile:

Sign In or Register to comment.