Game State – Game Loop

This week we tried out Code Club World’s Desert Race project.  One Code Club member used this for his independent project last round, so we had one expert.  We used his final project to demo the game. Screen Shot 2017-03-12 at 11.20.11 AM

Desert Race is a fairly simple 2-person race to the finish.  The main concept in this game is setting a game state variable to control the action. In event driven games is important to control the allowable events – like when to start. And we don’t want anyone to cheat by starting before the start signal.  Setting up a game state variable, ‘racing’, like a Boolean with 0 (not racing) and 1 (racing) is the concept I was hoping they would take in while making a cool two person game.

Defining a Boolean for game state is the first step to building a Game Loop that programmers use when creating more complex games.

Scratch Wiki also refers to it here: https://wiki.scratch.mit.edu/wiki/Game_Loop.

My fourth graders may not ever get to that level of programming here in Code Club, but it is a powerful idea. I have used this programming technique in (non-Scratch) games I’ve created in the past and found it useful.

I also made a quick version of the project adding a bit of 3D perspective with my Space Race project.  The racers (cat and dog) get smaller as they head to be the first to reach the planet.

Screen Shot 2017-03-12 at 11.26.57 AM

The students made some nice games. Many customized their Sprites and a couple recorded their own “win” sounds.

This one below has some almost imperceivable pitfalls that send you backwards (the opposite of a booster).

At the end of the day a few students asked to be able to keep working on the Desert Race project for next week -they needed more time and were enjoying the project.  I think I’ll let them, but I’ll need another project for those who finished or want to move on.  So I asked one of the two girls in the Club what she would like to work on and she said, how about making an ebook.  I asked if she meant like an animated story?  I’d love to focus on animation more – there are some great techniques to making things look like they are moving – I love Tumbling Santa.  Also, I’m thinking I need to show her Bubble103’s Scratch projects.  Maybe she wants to make a tutorial (nonfiction ebook).  There are a lot of How To projects on the Scratch site.  I’m considering these two options for next week.

Also awesome this week was this project:

Screen Shot 2017-03-12 at 12.18.11 PM.png

This student’s race project was lost when Scratch 2.0 offline editor crashed. He was mostly done and he lost all his code. Instead of recreating it, he made this cool project. (It is a bit glitchy, but neat.)

A New Plan

(I know, 3 blogs in one week.  Bear with me. This one is short)

I spent some time over the weekend hashing out the project plan and learning objectives for my two code clubs.  I feel better with a plan and ideas in mind and on paper.

I also revised my expectations for last week.  My learning objective for the students last week was to get to know Scratch and the code blocks that include Events, Motion, Looks and Sound.  I have to remember there’s also a new costume editor they will have to get a feel for as well as the notion of the Stage and Sprites and how they are different.  That’s actually a lot. I think the majority of the students have got a grasp on some of those concepts. (If they haven’t forgotten them in the meantime)

One student came up to me today and said, “I wish Code Club was everyday!!” What an awesome sentiment.

This week I’d like to focus on Initial Conditions, Conditionals and Sensing blocks. To that end, I’ve updated the maze project to use for Scratch 2.0. And we will try it out tomorrow.

Screen Shot 2015-10-12 at 8.39.24 AM Screen Shot 2015-10-12 at 8.57.42 AM

Scratch 2 Maze Project – Google Docs

I wonder if I’ll have time to mention the “Think like a Programmer” ideas of make one change, test it, make another change, test it?

Then next week both clubs can work on the same project.