FLOSS Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Learn JavaScript with Phaser

Choose your Own Adventure

There are different ways you can use this book to learn to make your own games. Normally books encourage you to start at the beginning and keep reading until you get to the end but this book isn't like that. The reason is that different people learn how to code and make games in different ways. Also different people have different inspirations that keep them interested and motivated.

This is also true of the way that people play games. There's a well known model of different play style types by Richard Bartle. This model, which was based on observing and analyzing the behaviors people playing together in a multi-user game, holds that there are four different kinds of play style interests, each of which is given a descriptive name: Griefers, Achievers, Explorers, and Socializers.1

  • Griefers: interfere with the functioning of the game world or the play experience of other players
  • Achievers: accumulate status tokens by beating the rules-based challenges of the game world
  • Explorers: discover the systems governing the operation of the game world
  • Socializers: form relationships with other players by telling stories within the game world

Different kinds of games suit different play styles. One of the notable sucesses of recent years have been open world games that allow you to choose how you play the game. If you want to stick to the main missions you can follow guidance to do that but if you just want to explore or be social or mess around you have the chance to to do that too.

In the same way there are different styles for making games. We are not quite sure on the best way to explain them yet but it is likely that they may be something similar to the below.

  • Social makers: form relationships with other game makers and players by finding out more about their work and telling stories in their game
  • Planners: like to study to get a full knowledge of the tools and what is possible before they build up their game step-by-step
  • Magpie makers: like trying out lots of different things and happy to borrow code, images and sound from anywhere for quick results
  • Glitchers: mess around with the code trying to see if they can break it interesting ways and cause a bit of havoc

Open World vs On Rails Learning

A lot of learning and guides suit the planners of this world. They start with a blank canvas and allows you build up your game step by step explaining just about everyline of code that you add. This book does just that in the following handful of chapters, they take a structured approach to getting to a minimal platform game and give details of coding concepts (objects, functions, variables, loops and conditionals) in a logical order using concrete examples from our emerging game. However this book also asks the question if you wanted to support a more Open World approach to learning how can we do that?

To do this the later sections of this book take a different approach to helping you make games. You are encouraged to various different game features in what ever order you like. The chapters are much shorter and designed to be self-contained. Almost like little side or social missions that you get in great open world games. If you like experimenting you can skip the next set of chapters and user the starting Simple Game to Edit2 as your jumping off point. You can Mod or Remix this game to add in new features and looks right away.

But to help get an overview of what's there let's look in a bit more depth about what a game mechanic is.

What makes up a Game?

We play them all the time but did you ever ask - What exactly is a game? How is it different from just playing around?

The Institue of play list key components that make up a game, be it video or non-digital game. They are as follows.

  • Goal: The overall goal of the game, what do you have to do to win
  • Parts: What parts make up the mechanisms of playing, this could be physical, like dice or cards, or digitial like our enemies, player and other hazards
  • Rules: Relationships that define what a player can and cannot do in the game. If...then...or you may...you may not...  are good sentence starters for rule making
  • Challenge: Obstacles might you put in the player’s way to make reaching the goal fun and interesting
  • Space: Where the game take place and how that space affects the game
  • Mechanics: The core actions or moves does the player has to do to power the play of the game
 The Institue of Play encourage you to think about these different elements of a game to allow you to start to make your own game or to start modding an existing game. Modding is modifying a game that already exists. This is exactly what we can do to our basic game. We can mod it to come up with a new playing experience.
However, there is much more to a game than the elements listed above. Much more than we have time to look at here. But we have to think about one extra dimension, that of Game Aesthetics. Game Aesthetics are one of the four pillars of game design mentioned by game theorist Jesse Schell 4. In this analysis he makes a distinction between the mechanics of the game, system elements that effect the core functioning of how the players interact with the game and that of the game aesthetics.

Aesthetics here are the wrapping of the game, the flavour of the graphics, the sound design, the artistic effect of the game on the emotions and state of mind of the player. For simplicity, in this book we also call Aesthetics, Game Polish.

Adding Game Mechanics

There are different ways of describing a game mechanic. At times writers and designers may describe just about any element of their game as a game mechanic.

There are different definitions of game mechanics. For example the Institue of Play makes a difference between components and core mechanics. Game components are nouns and core mechanics are verbs. So for our platform core mechanics would be jumping and collecting. When we look at the list of 'mechanics' we can add to our game below, we can see that some of them are actually more like extra challenges, like adding a timer and some are more to do with changing game rules. This means, for the purposes of this book, we are using a fairly wide definition of game mechanic which incorporates elements of rules and challenges. That's ok, we are in good company here with this broader definition from Sicart 3.  
What game mechanics can we add to our platform game? You can choose from some of the following.
  • Add a Countdown timer: this can increase the challenge of your levels, players must complete them before time runs out
  • Jumping on Enemies: to make them dissapear
  • Variable Jumping Heights: if you press down longer you jump higher
  • Adding Player Health: if you touch a hazard you lose health instead of losing a life
  • Smaller Collision Boxes: If your game is too hard, you can set smaller hit boxes, lots of platform games do this
  • Extending the Game Size: Making our levels larger and world scroll so we can adventure further
  • Adding More Levels: This can increase the challenge of our game greatly
  • Keys and Doors: collect keys to open previously closed doors can add as sense of adventure to your platformer
  • Extra Lives: if you touch a hazard you lose a life and have to restart with one less life (to come)

What about Polishing in the Game Aesthetics?

As mentioned aesthetics are not core to how the game works as a system but the are key to how our player reacts to our game. We want things that happen to affect them. This is quite an aim for us on our humble starting platform game but the following changes can help.
  • Resizing Game Elements via Scaling: this may be for aesthetic effect or could affect game mechanics too
  • Animation when Dying: Here an animation is played when a player or character gets zapped
  • Explosion on Dying: This uses particles to mimic an explosion when a character dies
  • Screen Shake: Mimicing a shaking screen gives a dramatic ending
  • Add Soundtrack Music: have some music on a loop when game play is happening
  • More Fun with Tweens: use tweens to emphasise actions
  1. https://www.gamasutra.com/view/feature/134842/personality_and_play_styles_a_.php ^
  2. https://simple-game-to-edit.glitch.me/ ^
  3. http://gamestudies.org/0802/articles/sicart ^
  4. Here's the book https://www.oreilly.com/library/view/the-art-of/9781466598645/ and here's a summary http://www.gamification.co/2013/09/24/adapt-gamification-designs-with-jesse-schells-four-pillars/ ^

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.