As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

How to teach game programming to kids

Space PickleSpace Pickle Registered User regular
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.

Posts

  • CelestialBadgerCelestialBadger Registered User regular
    Roblox really gets kids that age enthusiastic about creating games. However Roblox Studio isn't easy to get working on Chromebooks (MacBooks are fine)

  • ceresceres When the last moon is cast over the last star of morning And the future has past without even a last desperate warningRegistered User, Moderator mod
    edited April 1
    Roblox really gets kids that age enthusiastic about creating games. However Roblox Studio isn't easy to get working on Chromebooks (MacBooks are fine)

    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.

    ceres on
    And it seems like all is dying, and would leave the world to mourn
  • CelestialBadgerCelestialBadger Registered User regular
    You don't need to pay for Roblox Studio. However, Chromebooks can't install it without a lot of hacking (and as you have noted, they usually run the main game slowly too). Roblox Studio is really for Windows or Mac.

    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.

    djmitchellaElvenshae
  • IncenjucarIncenjucar Not a Fictional Character Seattle, WARegistered User regular
    While it's a bit left-field, programming with voice assistants (especially Alexa, but also Google) is pretty easy, and being able to spend an hour working on something and getting a game to talk back to you can be pretty exciting. There are simple game templates (flash cards and quizzes) for each. I literally taught myself Javascript while building my first game on it, and Python is an option, and you don't need to buy anything. Great for simple turn-based stuff with minimal effort.

  • LorekLorek Registered User regular
    While not quite the same, you can also look at CodeCombat or Ozaria as actual games that teach you to code Javascript and python.

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    on a Chromebook... your options are limited but not hopeless I suppose...

    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"

  • Space PickleSpace Pickle Registered User regular
    edited April 2
    We've done scratch at school, but it seems more geared towards younger kids. Like Grade 4/5.

    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.

    Space Pickle on
  • djmitchelladjmitchella Registered User regular
    Honestly, if you want to teach them graphics/sound creation then Scratch is probably your best bet -- one of my kids has spent a lot of time drawing things within the scratch editor / finding audio for sound effects / etc to make the start of a lucasarts-style puzzle game, a _lot_ of prescripted animations, some work on a platformer, and while he's not typing he's still learning about how programming works, just without needing to worry about syntax errors / whitespace as much.

    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.

    Elvenshae
  • BlindZenDriverBlindZenDriver Registered User regular
    There is a programming language made very much with the idea of learning kids about programming, it is called LOGO and there is a Linux version of it available.
    Here is a video with a quick intro:
    [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

    Bones heal, glory is forever.
    ceres
  • CelestialBadgerCelestialBadger Registered User regular
    Processing is a good learners language if you want something a step above Scratch.

    https://processing.org/

    It’s a simplified version of Java, very graphical, with an integrated IDE.

    It is not available for Chromebook.

  • KamiroKamiro Registered User regular
    There is a programming language made very much with the idea of learning kids about programming, it is called LOGO and there is a Linux version of it available.
    Here is a video with a quick intro:
    [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

    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.

  • NamrokNamrok Registered User regular
    This is tough, IMHO, and honestly a lot of the suggestions I've seen kind of horrify me. But I donno, maybe I'm out of step. I guess it depends on what your goals are. To teach programming? Teach asset creation? Teach game design? All of the above?

    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.

  • CelestialBadgerCelestialBadger Registered User regular
    All the “scaffolding” you need to get something like C and SDL working is the big issue for learning code these days. If you need to copy/paste a big gob of code you don’t understand it’s very easy to feel lost and helpless. That’s the idea behind Processing, I think: you just type code in and it does stuff, like back in the ‘80s when I was learning with Spectrum BASIC.

    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.”

  • NamrokNamrok Registered User regular
    All the “scaffolding” you need to get something like C and SDL working is the big issue for learning code these days. If you need to copy/paste a big gob of code you don’t understand it’s very easy to feel lost and helpless. That’s the idea behind Processing, I think: you just type code in and it does stuff, like back in the ‘80s when I was learning with Spectrum BASIC.

    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.

  • CelestialBadgerCelestialBadger Registered User regular
    edited April 2
    I think it's best to save the pain for later once people have caught the programming bug and have some confidence that they aren't complete morons with code.

    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!

    CelestialBadger on
    ThroElvenshaeRanlinIncenjucardjmitchella
  • RamiusRamius Joined: July 19, 2000 Administrator, ClubPA admin
    Take a look at https://playcanvas.com/

    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.

Sign In or Register to comment.