O'Reilly logo

HTML5 Game Development from the Ground Up with Construct 2 by Roberto Dillon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

137
Chapter 9
Turky on the Run,
a Puzzle Game
P
  have always been a staple of gaming, and masterpieces
like Tetris are there to remind us of how popular and long lasting a
simple yet perfectly designed puzzle can be.
A centuries old puzzle concept we are all familiar with is the so-called
game of 15,” where a 5 × 5 grid is lled with 14 tiles leaving only one space
empty, thus allowing the player to maneuver the existing tiles around and
ultimately reach a specic conguration. is could be, for example, an
orderly sequence of numbers or a picture. Perhaps surprisingly, not many
video games used this concept despite a pioneering attempt by Konami
with Loco-Motion, a 1982 arcade game that also served as an inspiration
for Turky on the Run, a small game recently released on iOS and BB10
devices. is is the game we are going to discuss here and then proceed in
developing it step-by-step throughout the next chapter.
9.1 LOCO-MOTION: ANALYSIS
In Loco-Motion the player is presented with a grid and a set of railroad
tiles that have to be moved to form a proper railway system, thus allowing
a small locomotive to pick up all passengers waiting at the stations just
outside the map (Figure9.1).
e locomotive cant be stopped and cant be controlled directly: it will
simply follow the trail it is on, so we have to herd it around by shiing tiles
accordingly. If it gets in a dead end, falls into the empty square, or gets
138  ◾    HTML5 Game Development from the Ground Up
caught by any crazy trains or loop sweepers that pop up if the player takes
too long in reaching the commuters, it will crash, and the player loses one
of the three available lives.
e railroads could also be manipulated to make the crazy trains and
sweepers crash into each other, scoring bonus points. is feature is actu-
ally very important to enhance the playing experience further by engaging
players’ revenge instinct against the bad trains that keep chasing aer the
small locomotive, henceforth complementing the collecting instinct (i.e.,
picking up all the waiting passengers), which is at the core of the game
appeal as exemplied by the AGE framework analysis in Figure9.2.
9.2 TURKY ON THE RUN: DESIGN
Like any other sliding tile puzzle, our game will rely on players’ spatial
reasoning skills, but its theme and settings are going to be much dierent
from Loco-Motion. Instead of a locomotive going to pick up passengers,
here we are going to have a little turkey, aptly named Turky, who needs to
reach his peacock sweetheart for a date across the tile-based maze. Lady’s
patience is limited though, so our game will be time based and not lives
based like most other games: if Turky is unable to reach his girlfriend
in time, the game will be over. Also, Turky, while by no means a very
smart guy, wont be moving around crashing in dead ends if no paths are
available: if the path ends abruptly, he will try to go back looking for an
FIGURE 9.1 Can we manage to drive the locomotive toward the waiting pas-
sengers on the edges of the map and pick them up without crashing somewhere?

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required