Howdy, Stranger!

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

Simple endless runner game - example code

in Code Sharing Posts: 742

Was playing around with trying to create backdrop effects similar to Alto's adventures and it grew legs into a simple side scrolling endless runner. Nowhere near as pretty as Alto but reasoably happy with the mountains as a first go.

https://gist.github.com/Westenburg/713b824a7bea4d67e3c8

Comments

  • Posts: 300

    Pretty sweet background!

  • Posts: 742

    Thanks

  • Posts: 2,020

    Nice! This kind of parallax scrolling reminds me of the 16 bit days, "Shadow of the Beast" and so on. The code is one long draw loop, and that also reminds me of the 16 bit days!

  • Posts: 418

    @West Cool backgrounds. Is it making new mountains that come from the right and deleting the mountains the leave?

  • Posts: 212

    is your pushMatrix and PopMatrix() flipped? you gotta push before you can pop.

    How might this be optimized to run faster?

  • Posts: 289

    cute runner game

  • Posts: 742

    @Goatboy76 yes pretty much. Don't actual delete the mountains just reposition them to the far right once they've passed out the left of the screen

    @matkatmusic probably - I always get muddled between the two. There's more than likely plenty that could be done to optimise but it's fine for my purposes as a simple game

  • Posts: 398

    Good work @West - nice to see you back on here again ;-)

  • Posts: 127

    Hey i like it, it actually reminds me of alto :)

  • Very nice. Thank you.

  • I’m going to try to use this code to learn how to do parralax scrolling in Lua at this game jame I’m at

Sign In or Register to comment.