Howdy, Stranger!

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

In this Discussion

Little Jumping Thing
  • pepinganospepinganos
    Posts: 81

    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.

    https://github.com/pepinganos/Little-Jumping-Thing
  • toadkicktoadkick
    Posts: 579

    That's awesome, nice work!

  • Bri_GBri_G
    Posts: 309

    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.

    Thanks,

    Bri_G

    :)

  • MarkMark
    Posts: 1,042

    That's lovely. Very nicely done.

  • KeeboKeebo
    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.

  • pepinganospepinganos
    Posts: 81

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

  • pepinganospepinganos
    Posts: 81

    @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.

  • Bri_GBri_G
    Posts: 309

    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.

    Try https://gist.github.com/3004619

    Thanks,

    Bri_G

    :)

  • KeeboKeebo
    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.

  • Connorbot999Connorbot999
    Posts: 154

    Wow

  • juaxixjuaxix
    Posts: 435

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

    http://twolivesleft.com/Codea/Talk/discussion/1040/real-time-terrain-generation

    Thank you so much :-)

  • SimeonSimeon
    Posts: 3,477

    Great work, @pepinganos!

  • juaxixjuaxix
    Posts: 435

    I have an error


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

    http://db.tt/H15zDBw3

    Variables

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

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

  • pepinganospepinganos
    Posts: 81

    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.

  • juaxixjuaxix
    Posts: 435

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