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

Pong with Flair

This week in Code Club we worked on a Scratch game project that was simple in design but could be creatively enhanced quite easily.  We used Simon Haughton’s Pong game directions.  That’s right, the old Pong game.  Of course, these 10 year olds had never heard of Pong.

When considering what project to try this week I took a look at the new Code Club Scratch projects that have just become available.  I have no doubt my students would love them all, especially Dodgeball.  I’m considering that for next time.

After their struggles with Paint Box, though,  I wanted to introduce a simpler project and Pong fit the bill.  My high school volunteers were excited about it, too.  One said he had written a Pong game before.

I started our code club meeting by talking about the independent project that is coming up. I want them to start thinking about what game or animation they want to design.  My goal, I explained, was to introduce a variety of projects to them so they could get an idea of what was possible to make using Scratch. They could even take a project they have already started and enhance it to make it their own.

With that in mind we started Pong.

Screen Shot 2015-02-13 at 9.46.39 PM

a new coders’ Pong game

I also put the original 2-person Pong game on screen and a break-out style game to give them ideas of where this kind of game could go.  It didn’t take them long to code their game so there was plenty of time for their creativity to come out.

Screen Shot 2015-02-13 at 9.47.11 PM

A code club girl’s take on Pong

Some students added extra objects on the screen to interact with and get or lose points.  Others spent extra time with the background and sounds.

There was even time at the end to look at or work on previous projects and think about their independent project that is coming up.  I saw one student adding more to his ChatBot project, another looking online at last sessions’ Showcase #1 projects.

A couple of students have asked if they could work in groups of three for the individual project.  I have my reservations about this.  Pair programming is hard enough. Some groups worked well together last time, others…. I have to come to a decision about this soon.