Programming with an 8-year-old

edited July 2014 in Development
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
«1

Comments

  • edited April 2014
    Gamemaker let you make programs without coding though it has a programming language, there are many tutorials and code available.
    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
  • edited April 2014
    I'd say that if you're most experienced in BASIC then start with a really small BASIC game.

    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).
  • edited April 2014
    Boriels ZX Basic Compiler is a very powerful Crosscompiler that produces good results fast. If you know Sinclair Basic, just forget the line numbers and learn some additional things (like END IF) and you can write games with it. There are a lot of new games written in ZX Basic. LCD made with Boride a excellent IDE for it.
    I'm not sure if there is Python available for Spectrum.
  • edited April 2014
    I wouldn't program on a Spectrum. And another +1 for either gamemaker or Python (on PC of course).

    Although Scratch was designed for teaching kids to program: http://wiki.scratch.mit.edu/wiki/Scratch
  • edited April 2014
    I'd recommend Scratch too. I experimented with it a few years ago, and it was relatively easy to get a shooter and a simple platform game off the ground.

    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.
  • edited April 2014
    Id go for zx basic as it is extending you current skills, once you are happy with the game port it over to python.

    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
  • edited April 2014
    I started off with 48K BASIC at 11yo and have used the concepts I learnt to harness other variations over the years including Visual Basic (plus VBA and VBScript and .NET) and PHP for application/web stuff, however, I particularly liked working with Blitz Basic on the PC (www.blitzbasic.com) finding it easy to work with for games.

    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-)
    Myke-P
  • HZJHZJ
    edited April 2014
    Hello Rorthron,
    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
  • edited April 2014
    All very Microsoft bias :), I teach kids computer games programming....

    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.
  • edited April 2014
    SpecBAS. It's ZXBasic on a PC. And it's really, really powerful.

    D.
  • edited April 2014
    Thank you all so much for the suggestions. I need to try a few of these out and will let you know how it goes.
    spectrumcomputing.co.uk/forums
  • edited April 2014
    (This is probably a bit OT from the original post talking about writing a game with an eight year old but since quite a few people have mentioned Scratch..)

    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

    ITSBOT.jpg

    http://www.tts-group.co.uk/shops/tts/Products/PD1723538/
  • edited April 2014
    Bee-bot? Reminds me of George, the programmable robot I got for Xmas '83.

    Axlon-Compurobot.jpg

    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...
  • edited April 2014
    Hehe.. yeah.. Bee-bot, George, Big Trak - these things have been around for a while. No idea how long they've been used so extensively in the classroom though
  • LCDLCD
    edited April 2014
    I wouldn't start learn to code on PC. Its like learning to drive: if you start learning and only drive cars with automatic gear, you can not learn that easy to drive a car with manual shift.
  • edited April 2014
    Thanks for all the help. We've started by using Scratch, which so far seems to be going well.
    spectrumcomputing.co.uk/forums
  • edited May 2014
    I know this is not Sinclair related, but we have hit a major problem with Scratch. We have almost completed our project (for a school competition) and for some reason previously valid scripts have just stopped working. For example:

    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.
    spectrumcomputing.co.uk/forums
  • edited May 2014
    Can you share the project file? I can take a look if you like
  • edited May 2014
    That is very kind of you. I've shared it. It is called Percy Jackson and the Lightning Thief by rlg1000. It is a very simple chase game. It was working fine till we added collision detection with the Minotaur sprite. I have now removed the collision detection scripts, but the problems remain. I think variables have stopped working properly. The Minotaur no longer chases and you cannot pick the sword up any more, for example.
    spectrumcomputing.co.uk/forums
  • edited May 2014
    Hmmm.. can't find the shared project. Any chance you could send the project file?

    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 ;(
  • edited May 2014
    ...just had fun with my nearly 5-yr old son, crafting some simple colorful demos in SpecBAS with him... I haven't coded anything in BASIC of worth in a while... Obviously, Daddy did the coding, and he directed as to what he wanted... He appreciated how easy it was to get almost immediate results that were colorful and noisy (beep command and for/next loops work wonders, as long as the duration isn't anything below 0.029 on my machine)...

    +1 for SpecBAS recommendation...

    :)
  • edited May 2014
    evilpaul wrote: »
    Hmmm.. can't find the shared project. Any chance you could send the project file?

    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 ;(

    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!
    spectrumcomputing.co.uk/forums
  • edited May 2014
    I use the offline version, which saves to the "Scratch Projects" in your documents folder. In the online version you can "Download to your computer" under the File menu.

    I guess you can then attach it to a post here or PM it?
  • edited May 2014
    evilpaul wrote: »
    I use the offline version, which saves to the "Scratch Projects" in your documents folder. In the online version you can "Download to your computer" under the File menu.

    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.
    spectrumcomputing.co.uk/forums
  • edited May 2014
    Can I just say that WoSsers are awesome? Not only did I get loads of good suggestions for how to go about this project, but I even got my dim-witted, buggy code fixed.

    I like this place.:grin:
    spectrumcomputing.co.uk/forums
  • edited May 2014
    I just wanted to make a couple more suggestions, though you've got a lot of good ones already.


    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.
  • edited May 2014
    Thanks for the suggestions.

    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.
    spectrumcomputing.co.uk/forums
  • edited May 2014
    As quick Ps, it looks like schools are going to be using a lot of python in the new curriculum in september, so maybe check that out at some point when you are ready to take a look at pure code.
  • edited May 2014
    I think any type of BASIC is your best pick, since programming is basically about thinking logically and it doesn't really matter what programming language you are using. Because we are talking about teaching a kid, BASIC is probably the easiest.

    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. :)
  • edited June 2014
    I've just run into this other project funded by means of kickstarter, a board game to introduce programming concepts called Code Monkey island
    http://codemonkeyplanet.com
Sign In or Register to comment.