Here's the updated version of my demo
https://skydrive.live.com/redir.aspx?ci ... 8A2EC5!182
You'll need the image 'scrollyback.png' to be saved in the same folder as the demo.py file.
My next plan is to add some purple mountains to sit between the grass and sky.
I've added a variable called machine speed. You have to use # to comment out as appropriate, because I've noticed that the speed it runs at varies wildly from one computer to another. This won't be a problem once we all have Raspberries, because we will all have the same hardware.
When you run the program, and it gets past the sunrise, press h for help screen and r to restart. Some other keys are mentioned on the help screen. The position of your mouse at the time you press the keys makes a difference. Put the mouse pointer towards the top for low numbers, and move it lower for high values.
The biggest difference is that now everything has it's own surface, and I've gradient filled the backgrounds with rectangles. I've added a fade in text and a scrolly text at the start, and a randomly generated star field is drawn onto the darkness surface. I've abandoned the years/days and seconds, in favour of a different approach. You place the sun somewhere and then give it a target destination to achieve. I've also introduced a runstage variable as a way of controlling the transition from one section of the demo to the next... IE runstage 0 is the fade in text, runstage 1 for scrolly text, runstage 2 for sunrise and runstage 3 for sunset.
If you've done lessons 1-5 and look through the code, hopefully you can work out what is going on in this latest version.
I'll let you know what's going on with the lessons soon. I'll keep making them as png images. I agree that when you are learning, it's better if you have to type in the code yourself rather than just copy & paste it. That way you might retain some of the knowledge.