Very minor Lander tutorial fix

A huge thanks to Neil McEwan for finding a glitch in the Lander tutorial! I honestly can't believe I never noticed this in the months of testing, but there it is! Basically, when you play the Lander tutorial and win or lose, you can press X to play again, but if you play again more than twice, the ground stops randomly generating and just stays the same from that point forward.

The problem had to do with the draw_stars() function. That function sets the random number generator to always generate the same pattern of random stars. However, the random number generator doesn't get reset after it's done being used to draw stars. As a result, new random terrain was set to always generate the same random terrain.

Suffice to say the PDFs have all been updated as well as the sample code.


Gamedev_with_PICO-8_1.pdf 797 kB
Nov 13, 2017
Gamedev_with_PICO-8_1_spreads.pdf 770 kB
Nov 13, 2017 86 kB
Nov 13, 2017

Get Game Development with PICO-8 - Issue 1

Download NowName your own price

Leave a comment

Log in with to leave a comment.