How to teach game programming to kids
I'm an elementary school teacher in Ontario and coding was recently added to our curriculum. I don't teach math (I'm actually the music teacher) but I'd like to make some kind of extra-curricular game programming club for the Grade 7 and 8 students at my school. When I was around that age I had Qbasic in DOS, then Visual Basic and Borland C++, and then a couple years later in high school I took a course in Turbo Pascal and then Delphi. I hacked around in these and made some small games, so I believe with good teaching my students could accomplish even more.
However, we're limited by the fact that most schools in my area are going to chrome books, so we don't have access to Windows laptops. I think we have some older MacBooks. What I'm looking for is ideas/software to streamline things so that we can focus on the code and asset creation, instead of getting bogged down in the technical details (for example, I fired up the latest version of Visual Studio and tried some C++, and it's way too complicated for the amount of time that I have to work with). I'd like the kids to start with simple text-based games in the terminal or command prompt or whatever it's called now, and then maybe move on to doing stuff with simple graphics.
Any suggestions? So far I'm looking into Python and SDL/Pygame, although getting that to work on the chrome books seems like a big problem.
0
Posts
Heh, I was just going to tack this question onto this thread. You need to pay for this feature, right? We got it working on his chromebook but it's really slow, and he haaaaaaaaaates playing on a touch screen.
Kids these days probably won't be content learning text-based games. Scratch is the kid's programming language for elementary schools. It's very visual.
I would recommend taking a long hard look at https://createjs.com/
This was made by a group run by Grant Skinner who is one of the forefathers of Flash development... which is what I would recommend if you had access to Windows computers...
The benefit of CreateJS is, apart from working on Chrome.. it's relatively short startup to get to "fun things"
I'm really hoping for something free, not something that the school needs to pay for. Also it's possible we might have old MacBooks now that I think about it.
Also, you can do some genuinely impressive stuff in Scratch if you put the effort in -- there's a user called "griffpatch" who has a lot of good examples of this:
Getting Over It
Terraria
Minecraft (okay, in 2d, but it has the same basic mine/craft/build/etc gameplay loop)
Geometry Dash
Turrican II
The last two are basically identical to the original games, he's reusing the sound effects / graphics; terraria feels very much like real terraria but I suspect will end up being smaller in the long run, though again sounds and looks identical.
The other big win with Scratch is that everything is automatically open source, you can take anyone's existing project and you have the assets and source code available to play with, which I've my kids have found a lot more attractive than the "learn to code games in python/javascript/unity" books/videos/courses that I've tried.
Here is a video with a quick intro:
[url="https://www.youtube.com/watch?v=GfD8Br0Ihhc"[/url]
And a article:
https://linuxjournal.com/content/teaching-programing-skills-children-logo
And finally a link to where you can get the LOGO software - it's free.
https://xlogo.tuxfamily.org/en/presentation-en.html
https://processing.org/
It’s a simplified version of Java, very graphical, with an integrated IDE.
It is not available for Chromebook.
Can confirm, I learned LOGO as a kid at a summer camp and used it to make little games.
Also, we had a physical robotic turtle that we could control with a program.
Assuming the programming is emphasized at all, my goto suggestion would be straight C with SDL. I'd even suggest, as the teacher, doing any of the heavy lift code and letting your students fill in low hanging blank spaces. Template out the main loop, reading input, loading some resources, and let them use it as a scaffold to work on their own ideas. Hell, I'm almost positive there are template projects for C/SDL for almost every game genre. And I suggest regular old C because it has a fairly constrained and predictable design space, with a rather humble variety of types.
There is no multithreaded virtual machine. No garbage collection. You aren't wrestling with opaque default assumption about what gets passed as a reference and what gets passed as a value. Scope is much clearer in C too, IMHO. These are all things that a lot of more modern, "easy", development environment try to keep in the background. And at first, none of it matters. Until it matters so fucking much, because you've ignorantly stumbled onto a use case that forces you to peek behind the curtain. And then the pain truly starts.
Think of all the bad Unity games where the dev was ignorant of garbage collection, and now their game hitches and stutters constantly.
I'm also really not a fan of this trend of "visual programming". I think it's a cargo cult mentality, that lets adults pretend the kids learning things. When in reality, nobody is learning anything, and the kids are miming out an approximation that pleases the adults. Almost a "Clever Hanse" effect. Especially the really gamified versions of "visual programming".
I've had severe issues with a lot of less syntax strict scripting languages like Python or Javascript. Their ability to turn simple typos into brand new variables that just cause your program to behave wildly erratic frustrate me to no end. I definitely lean towards a stricter compiled language that will pro-actively let you know when something isn't right. I'm really not sure how these loser languages got a reputation for being more beginning friendly. Maybe because they put off the first frustration point past getting something to actually execute, to wondering why it's not behaving correctly.
You may be noticing an overarching trend to my complaints. As the development environment gets "easier", the "learning debt" grows and grows and grows. Eventually the bill comes due, and my fear is that when you reach that point, fewer students will be able to pay it than if you'd just gone with a more rigorous approach up front.
As for the IDE, I do see Visual Studio Code is available on Chromebook. This may seem like an odd suggestion given how you've already dismissed Visual Studio C++. I want to assure you Visual Studio Code is different. The key feature I'm thinking of for you, is that all the settings for it are contained in the project folder. Including how to execute the compiler, run the debugger, etc. You can just copy a project folder to a new machine, open the folder in Visual Studio Code, and assuming the paths on that machine are the same, pick up right where you left off. A perfect solution for a teacher that needs to get his students up and running quickly. Have them install GCC, SDL, Visual Studio Code, and then copy the project template you scaffolded out for them. Should work every time.
Another issue with things like C and Visual Studio is that they are prone to spitting out incomprehensible error messages if you put one letter/click out of place. It’s hard to put yourself in the place of a nervous beginner and see how tremendously intimidating it is if you do the exercise the teacher sets and it tells you some sort of gibberish like “Package missing or corrupt. Error 3697. Reinstall kernel with integration 7.4b or better.”
I guess that's the rub isn't it?
I mean, you can see all the scaffolding, in the form of the template your teacher gave you. Or you can't, because it's "visual programming" or some sort of "unity for kids" thing. But it's still there. It hasn't gone anywhere. It's just hiding. But one day it shall reveal itself. Often in the rudest way imaginable.
Same thing for those error messages. I hear you. Linking errors in C can be rather opaque if you don't understand what linking even is. My suggestion of a scaffold was to mitigate that. On the other hand, the "silent" errors your average scripting language lets pass are IMHO even more frustrating. They'll have you going over every line of code with a fine toothed comb until you realize you misspelled a variable, or had a comma instead of a period, or forgot to end a line with a semicolon, etc. Assuming you even realize there is an error in the first place. I mean, you might infer there is one, because it's not doing what you thought you told it. But the computer isn't complaining about it either.
Sure, if I'm sitting down with a project, totally ignorant of coding, for the first time, it might be more initially validating to have it actually run on the first go, even if it's not doing what I want. On the other hand, once I'm hours into it, and I can't figure out why it's not doing what I want, because it's not telling me there are any errors, I may just decide programming is stupid and random and makes no sense.
Where do you want the pain to be? Spaced out during the learning process up front? Or saved up for one massive pain bomb later? One might get people through the door. But I question if they'll stick around.
I started with code like
10 PRINT "HELLO"
20 GOTO 10
and it was fun because it did something instantly and you could make it print rude things too. It didn't make me give up and cry 4 years later at my first C++ compiler error!
It's a web-based editor, so should work on Chrome Books.
The programming language is JavaScript.
There are demo projects available to fork either as a starting point, or to use as a learning tool by figuring out how others solved a problem. The site has tutorials and decent documentation.
Seeing the scaffolding is super intimidating for beginners. You don't know what any of it means anyway, and your teacher doesn't have time to explain it all, so what you learn upfront is that this programming thing is way too complicated for you.
You don't try to teach kids formal grammar until after they can read at least some, and you shouldn't try to teach them scaffolding until they get a chance to see what programming even is.
My daughter has been learning formal grammar since 1st grade despite being a slow reader and it really annoys me as it doesn't make the slightest sense to her, in fact it confuses her even more. I have no idea who thought it was a good idea to teach students advanced stuff before the basics.
But when they learn coding they learn Scratch rather than suffering trying to set up a dev environment.