Category Archives: Level 12

Level 12 – Grid Game Concepts

Many beginning game programmers try their hand at making grid based games.  Some grid based games you might know are Pac-Man and Bomber Man.  The movement of the players is restricted by a maze-like layout in the room.

In this level you will be learn some of the basic concepts needed to help you make a grid based game.

Level 12 Lesson 01 [Basic Grid Concepts]

Introduction
Grid based games are a common type of game that many new game programmers like to create. One of the most popular grid based games of all time is Pac-Man. You can probably think of many others. In this lesson we will introduce you to some concepts that can help you create a grid based game. In Lesson 02 you will use some of your script and list knowledge to simulate some basic ghost movement in a Pac-Man type grid.

Part A – Sprite Sizes, Collision Boxes, Keyboard
There are many ways to set up a grid based game. In this video you will take a look at some simple ways to help setup your grid based game and get the player moving around the grid smoothly.

Watch the video: 12-01-A
Done File: L12-01-A-Done.gmk

Challenge 1 – Your Own Grid Based Game
For this challenge, start a new project.
Select sprites for your own grid based game that will consists of a player moving around with enemies chasing.
Use the concepts presented in the video to make sure that your sprites, room, and player movement will work properly.

Level 12 Lesson 02 [Guided Challenge]

Introduction
Lets get the ghosts moving around the grid using the concepts of collision detection, scripts, and lists.

Guided Challenge
For the three parts of the lesson that follow: watch the video and take notes on the basic ideas so that you will be able to apply them to your grid game that you set up in the last lesson.

Part A – Ghosts Moving Forward
Watch the video: 12-02-A
This part demonstrates creating a script to check if it is OK for a ghost to continue moving forward in the grid.


Part B – Detecting Intersections

Watch the video: 12-02-B
When game pieces are at an intersection, they might decided to turn or continue going straight. In this part we take a look at writing a script that will determine whether or not we are at an intersection.


Part C – Pick New Direction

Watch the video: 12-02-C
Our ghosts turn under two conditions: they can’t move forward or they detect they are at an intersection. We have written scripts to realize both of these situations. Now lets write a script that will pick a good, valid, new direction for movement!

Guided Challenge Solution
The video solution is basically Part A, B, and C together.
Solution File: 12-02-C-Done.gmk (contains A, B, and C done)