Mazes, the Dark Side

At the last Creative Coders Code Club, I asked my middle schoolers what they wanted to learn or work on next time. One student said a platformer and another was interested in a MAP (multi-artist-project).  While I’m still investigating how to facilitate a MAP with my group, I thought the easiest form of a platformer game would be to learn to code a maze. Mazes can be simple “navigate to the goal and don’t hit the walls”, or complex with levels, bad guys, goals, timers, scoring, (like platformers).

I found a couple of starter projects for mazes.  I liked the one from the Scratch Team (classic example) and from CSFirst.  I looked through and found a couple of other examples of mazes to include as examples.  I also came across a PacMan starter project from MEStech.  PacMan is a nice example of a classic platformer that’s like a maze. And who wouldn’t want to create their own PacMan game?

I’ve always wanted to make a 3d maze but am not interested in learning 3d rendering and the other way I was thinking to make it required too much planning. My spouse gave me the prompt to make a dark maze where you can’t see the whole path. So I spent a while creating a Sprite to look like darkness around a lighted lantern.

I knew I could use a gradient fill from black to alpha 0, but I had trouble creating the size of the lantern light that wouldn’t reveal too much of the path.  My third try worked well but I’ve decided that I am not a fan of the Scratch 3.0 vector tools.

Screen Shot 2019-12-02 at 9.53.37 PM

Just the right size of light in the darkness.

I had to change the implementation of wall detection.  I couldn’t use “when touching blue” because my Sprite is supersized. So I changed it to “when orange is touching blue”Screen Shot 2019-12-02 at 10.02.33 PM

I still had areas of the map that were visible beyond the edge of my Sprite.  I thought I could increase the size of the Sprite to 200% to cover it but the maximum I could set the Sprite to was 135%.  Instead, I created two blackout Sprites the appear or hide depending on which quadrant I was in.  I’m pleased with the results although it needs a better map and more levels, etc.  It’s basically still a starter maze…

Today was our club meeting but it was also a snowy day.  School wasn’t canceled locally so we held the club but we only had three members attend.  One adapted my blackout maze idea with his own map and bad guy.

Another created his own impossible maze

And the third tried to do both PacMan and a maze and was frustrated with what he could accomplish.  It was his first time and he spent time just playing with Scratch options (which I totally support – you got to know what is possible before you can create).

Sometimes I feel 75 minutes once a month is not adequate time or frequency to facilitate the opportunity to play with Scratch, be creative and produce something to share with the group. It makes it tricky to plan lessons that fit a wide range of skills and inspire middle school students.

4 thoughts on “Mazes, the Dark Side

  1. You may be pushing Scratch beyond its comfortable limits. For the 3D maze you might look at Unity. Some of the easy mazes are well within the capabilities of middle schoolers. Smart middle schoolers can take Unity a long way. It would also have a longer lifespan than Scratch. Many universities use Unity in their graphic arts programs.

    Like

      • I teach a Unity course at the high school level now. The kids love it. I have done it at the middle school level several years ago as an after school club with good success. The quality of tutorials on the Unity website has also gotten incredible for beginners. The kids could work through them on their own if they really get into Unity. Python is great for programming but simply not in the “fun” category unless you are a programming geek. Unity is like a Lego set, a toy that can last many years. I will say at the middle school level the amount of true programming will be minimal, a lot of cut and pasting of magic code, but they do pick up on it. If you want a true programming class with 3D Alice would be a better option but Unity is a lot more fun and has a much longer lifespan.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s