Programming with an 8-year-old
I have promised to write a game with my 8-year-old son and was wondering what languages or tools to use. Does anyone have any suggestions? My own coding experience is limited to Sinclair BASIC and a theoretical understanding of Z80 assembly and C++. I was thinking of using one of the enhanced versions of Sinclair BASIC with an emulator on a PC. I know BASIC isn't the best language, but it would teach him some programming and has the advantage of familiarity for me. It does not need to be an especially complex game, but be something he can get involved with.
Post edited by Rorthron on
spectrumcomputing.co.uk/forums

Comments
https://www.yoyogames.com/studio
Scratch seems cool to me, it's like coding putting together lego pieces.
http://scratch.mit.edu/
Python is also used to teach kids programming by making games. There is a book called "invent with python" that looks interesting.
oh and I run into this this cool toy to programming a robot
http://vimeo.com/82620072
JSpeccy-win32-portable
Actually the language doesn't really matter but BASIC is probably the most expressive.
And start small. If the game source is larger than 1 screen than it's probably too long for a kid (for an introduction, that is). Perhaps you could try those zx81/zx80 basic examples as well, they seem to be smaller than regular basic stuff (i don't know it they exist though).
Games List 2016 - Games List 2015 - Games List 2014
I'm not sure if there is Python available for Spectrum.
Although Scratch was designed for teaching kids to program: http://wiki.scratch.mit.edu/wiki/Scratch
It uses programming syntax, but the code is represented as pieces of a jigsaw puzzle that you drag and drop in to place. This gets rid of the learner's problem of typos and having to remember all the exact commands.
It's certainly very good for writing a program that's reliant on graphics, as there is a window displaying the graphics alongside your code.
Python is pretty simple once you have the libraries you need. I think the RPI site did a basic game tutorial for python, which would be easy to adapapt.
Try these:
http://www.pygame.org/docs/tut/chimp/ChimpLineByLine.html
http://pygame.org/tags/example
I also recently came across Microsoft's Small Basic which, although I haven't had a chance to play yet, looks like it might be well suited to the junior audience.
I'd heartily recommend 48K BASIC, however, would probably look to BASin as a working environment.
Alternatively there's Boriel (as already mentioned) or Dunny's SpecBAS.
I'd (re)familiarise yourself with your language of choice and write the game completely before involving the little fella and then dissect into 'lessons' beginning with PRINT, IF, FOR and GOTO/GOSUB and then on from there. 8-)
I would recommend for an eight years old boy to try the language LOGO which was desigened for children by Papert in the 60ties. Your son can use the so-called turtle graphic and he will fast come to short and nice programs. By the way, since LOGO is based on the very powerful language LISP it is also good for much more programs beside graphic applications.
Here is a short program how to draw a triangle:
TO TRIANGLE :L
FD :L RT 120
FD :L RT 120
FD :L RT 120
END
After saving you can run TRIANGLE 80 and a triangle of side length 80 will appear. LOGO is very good to write programs with recursions! For the first you can also try directly in execute mode some of the commands FD 10 or RT 30 FD 10 or LT 60 FD 10
Have fun,
HZJ
I can recommend Microsoft Small Basic, I used to teach Games Programming at a local secondary school (11-12) and it's what we started the kids on. Loads of games and samples and teaching material: http://smallbasic.com/ It has all the Logo stuff too :)
For the more advanced kids we moved them to .Net Gadgeteer although for that you'd need some hardware http://proto-pic.co.uk/categories/development-boards/net/net-gadgeteer.html but it's way way way better than the Raspberry Pi & Python at any IO stuff. http://www.netmf.com/gadgeteer/ using either Visual Basic or C# and it's all Open Source.
After that we then moved to C# & XNA (the same technology I used to create all my Spectrum Emulator Ultimate phone apps) http://msdn.microsoft.com/en-us/centrum-xna.aspx or you can use the Open Source version: http://www.monogame.net/ which is what I used for the Windows 8 versions of my apps.
There's also Kudo a nice easy UI to make simple games: http://www.kodugamelab.com/
Then there's Project Spark which is related to Kudo, where there's some programming via a intuitive UI to make "brains", http://projectspark.com/ You can develop gorgeous games very quickly, but it's a game about making games, it's MineCraft on steroids.
D.
I've tried teaching my son programming with Scratch a few times over the past year or so (he's five now) and had some limited success. The problem I find is that he can follow the introductory tutorial and then it all goes a bit wrong. Focus is the main problem. You can do anything with programming, right? The potential for things to do is massive so where do you start? Setting a sensible goal is hard. He also finds it far too tempting to just drag *every* block onto the sketch without really knowing what they do or how to link them it. In short.. it can be overwhelming.
We changed our approach slightly and starting using Lego blocks. Different coloured blocks represented different commands (RED = forward, WHITE = turn left, etc.). We laid out the program, used a pointer (a program counter if you like..) to step through the program and moved a minifig around a base board. This worked really well for us. We set little challenges - move the minifig from the start to the steering wheel of the spaceship. Next we added loops and a command that dropped a coloured block on the board. Now we could make patterns. He loves this :) We're never going to write a big program with this (a set of traffic lights was the furthest we got) and there are fundamental limitations in our "language" but it's helping him get the basics down.
http://instagram.com/p/lXxfMWO6Tn/
So I think it depends on the kid and the teacher but I reckon Logo can be better than Scratch for younger kids. Limitations can be good and they help you focus. Of course you *can* use Scratch as a sort of super-set of Logo to draw patterns.
Oh.. I also found out that, the week after we started our Lego programming, his maths class started using Bee-bots. I was quite impressed :D
http://www.tts-group.co.uk/shops/tts/Products/PD1723538/
http://www.handheldmuseum.com/Misc/AxlonCompurobot.htm
Nothing new under the sun, eh? Unfortunately for George, he was superceded by a ZX Spectrum shortly afterwards...
When green flag is clicked/
forever/
set Percyx to x position
set Percyy to y position
This used to record the position of the Percy sprite with two variables Percyx and Percyy. It has stopped working. The values of the variables now no longer update as the sprite moves. Other "When green flag is clicked/forever/" scripts have also stopped working. They all seem valid to me and were previously working fine. I am at quite a loss what to do. It is particularly frustrating as we are at the end of the project and getting near the submission deadline.
Does anyone with experience of Scratch know what could be the source of the problems?
The whole project looks like it's turned into a complete write-off.
On the bright side.. I guess you've learned how important version control is. It's never a nice thing to learn though because you always learn the hard way ;(
+1 for SpecBAS recommendation...
:)
Many thanks. How do I send the file?
I'm usually pretty diligent about version control, but I haven't worked out how to do it with Scratch. It just seems to save every change I make automatically!
I guess you can then attach it to a post here or PM it?
I have downloaded the file, but I don't think it's possible to attach it like that. I could email it to you, if you don't mind PMing me an email address.
I think I understand what has caused the problem. The Green Flag has stopped working. Most of the scripts start with "When Green Flag is clicked". I added an endgame script which ended with "Stop (all)". Since then the Green Flag has not worked. I have removed the endgame script, so there are no more "Stop ()" commands. But clicking on the Green Flag still doesn't work. It lights up for a fraction of a second and then goes dark. It does not stay lit and the "When Green Flag is clicked" scripts do not work.
I don't have any idea how to fix the problem.
I like this place.:grin:
If starting with BASIC teach him GOSUBs before GOTOs
I taught myself from about 11 years old for the most part, I don't think I would have grasped it at all at 8 years of age. It took a while to understand the construct of READ and DATA (or see its usefulness) until I understood ARRAYS and FOR / NEXT Loops.
Whatever the language some programming concepts are best learnt before others.
After a bit maybe a version of Pascal for learning structured programming.
And some copies of INPUT magazine from the 1980s.
In the end we used Scratch for the whole project. It worked well enough and was probably the right level of complexity, especially as his six-year-old brother joined in. I found it a little quirky at first, but we completed the project successfully in the end and are about to start a follow-up.
What's most important - is how much your son is *actually* interested in programming. I learned to code when I was 12, and it was Apple IIe BASIC. But no one taught me, I'd just spent countless hours LISTing other people's programs to figure out the meaning of commands, because manuals were too hard for me to understand. And I learned a lot like that. My parents had to pull me away from computer and force-put me to bed. :)
http://codemonkeyplanet.com
JSpeccy-win32-portable