Design Document - Murdoch University

Design Document for:
Ninja Gai.
A comic-like spin on the traditional ninja platformer.
“Its Ninja-Tastic”
All work Copyright ©2010 by Gasm Productions
Written by Grace Beven, Adam Britto, Seth Vlietstra Michael Veloso
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Table of Contents
DESIGN HISTORY __________________________________________________________________ 4
VERSION 1.00 _______________________________________________________________________ 4
VERSION 2.00 _______________________________________________________________________ 4
VERSION 2.10 _______________________________________________________________________ 4
VERSION 3 _________________________________________________________________________ 4
GAME OVERVIEW __________________________________________________________________ 5
COMMON QUESTIONS _________________________________________________________________ 5
What is the game? _________________________________________________________________ 5
Why create this game? ______________________________________________________________ 5
What’s different? __________________________________________________________________ 5
FEATURE SET ______________________________________________________________________ 6
GENERAL FEATURES _________________________________________________________________ 6
MULTIPLAYER FEATURES _____________________________________________________________ 6
GAMEPLAY _________________________________________________________________________ 6
THE GAME WORLD _________________________________________________________________ 7
OVERVIEW _________________________________________________________________________ 7
@#!BAM!#@ ______________________________________________________________________ 7
CELL SHADING ______________________________________________________________________ 7
THE PHYSICAL WORLD _______________________________________________________________ 7
Overview ________________________________________________________________________ 7
Objects __________________________________________________________________________ 7
RENDERING SYSTEM _________________________________________________________________ 7
CAMERA ___________________________________________________________________________ 7
USER INTERFACE _________________________________________________________________ 11
OVERVIEW ________________________________________________________________________ 11
UI _______________________________________________________________________________ 11
WEAPONS _________________________________________________________________________ 12
OVERVIEW ________________________________________________________________________
KATANA __________________________________________________________________________
SHURIKEN ________________________________________________________________________
BOMBS ___________________________________________________________________________
3D SOUND ________________________________________________________________________
12
12
12
12
13
MULTIPLAYER GAME _____________________________________________________________ 15
OVERVIEW ________________________________________________________________________ 15
MAX PLAYERS _____________________________________________________________________ 15
STUFF WE WOULD LIKE TO ADD... _________________________________________________ 16
ROOM FOR IMPROVEMENT… ______________________________________________________ 17
LEVEL OBJECTS ____________________________________________________________________ 17
COLLISION DETECTION _______________________________________________________________ 17
AI _______________________________________________________________________________ 17
ISSUES DURING CODING… _________________________________________________________ 18
Confidential
2/15/2016
Page - 2 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
COLLISION DETECTION _______________________________________________________________
BOMB AREA OF EFFECT ______________________________________________________________
AI _______________________________________________________________________________
SCREEN RESOLUTIONS _______________________________________________________________
Confidential
2/15/2016
18
18
18
19
Page - 3 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Design History
Version 1.00
The original version of this document was somewhat scattered and disorganized. Each member has written
their own sections with not much flow or cohesion. It was decided that the game would be set in a
construction site in a modern day city (location unknown). Models were designed and transitions
conceptualized. Storyboard was drawn.
Version 2.00
For version 2 all documentation was properly collated and formatted. The team made a lot of
changes to the design and storyline.
Included in the changes are:
1. Change of setting from modern construction site to feudal Japan. We decided that the
construction setting did not make much sense. Unfortunately, that made many of our models
useless.
2. The transition was finalized. A camera lock focused on a narrated comic strip painted on one of
the walls contained within the world. The character walks out of the last frame and the game
starts.
3. The details of the storyline were finally filled out.
4. The design for Shay's World's extension was finalized.
5. Storyboard was partially redrawn.
Version 2.10
There were several changes between version 2.00 and 2.10.
Included in the changes are:
1. Concept for transition was changed and design for an extra addition to Shay's world was added.
2. Again, storyboard was partially redrawn.
Version 3
Final version of documentation. Previous version was altered to include new features and reflect the final
state of the project.
Confidential
2/15/2016
Page - 4 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Game Overview
Common Questions
What is the game?
This game is a side-scrolling platformer set in feudal Japan. You play the part of a ninja trying to rescue his
princess from an evil lord. In the game levels there will be many traps and enemies that you, as a true ninja,
must overcome with your trusty katana and shuriken.
Why create this game?
We wanted to make a game that didn't take itself too seriously. This game is based on traditional sidescrollers but uses 3D models and cell shading to achieve a comic book like appearance. The appearance
and the comic-like aspects of the game will hopefully allows us to make a final product that is fun and
appealing without getting tied down by serious storylines or complex gameplay.
What’s different?
While a lot of modern games are concentrating on new storylines and experimenting with evolved gameplay, this game tries to revisit the origins of video gaming to remind us why we liked them so much in the
first place.
Confidential
2/15/2016
Page - 5 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Feature Set
General Features
3D Graphics
Cell Shading Art Style
Challenging trap filled maps
A Stunning Original Score
Easy to understand Controls and Objectives
NINJAS!!!!
Multiplayer Features
Fight to the death with your friends! Each of you take control of a ninja and let the battle of ninja
commence!
Gameplay
The game is in essence a Platformer with parts of other genres to give it some spice. If you were to give it
an accurate genre, it would be more like Action Puzzle Platformer. Using parts of these genres allows for a
much more enjoyable experience through many different gameplay elements.
As an action game, Ninja Gai packs a punch. Players take control of our Ninja and are to use whatever
tools they have at their disposal to eliminate the enemy. Whether it be a swing of the katana or deadly aim
with a shuriken, the player can become immersed in the action as different enemies attack.
Deadly traps, hidden objects, a maze of levels, all of these give our game the classic puzzle element that
keeps players intrigued. Splitting action with mind boggling puzzles gives Ninja Gai the perfect balance of
entertainment and challenge from start to end.
Confidential
2/15/2016
Page - 6 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
The Game World
Overview
The game world is presented in a comic book style using cell shading and sprites to help us achieve the desired
effects. The actual world itself is created using axis aligned blocks, this will help make our collision detection
simple and fits in with the platformer genre.
@#!BAM!#@
To help with the comic book appearance we are trying to achieve we will make liberal use of sprites in our
special effects. Sprites with words like POW!, BAM! and OUCH! will help convey the feeling of the game while
giving feedback about whether an attack hit, the status of your character etc. Also, for the explosive tags on the
kunai, sprites will be used to express the explosion with fire and smoke that will gradually fade away, and the
same would be done with smoke bombs.
Cell Shading
The cell Shading effect was achieve by applying a 2d texture of grey scale onto the model. The darkness of
the value was determined by an vector. Applying a colour on top of this texture gives the cell shading
effect.
Special Thanks to Jeff Molofee (Nehe) from http://nehe.gamedev.net for making the tutorial on cell
shading without it the cell shading would have been a lot more difficult.
The Physical World
Overview
The physical world will made up of blocks with some complex models placed to add aesthetic appeal. The
objects are all cell shaded and the textures have been edited to fit in with the cartoon-like theme. The camera will
travel sideways along the game world to keep up with the character's movements. As the character moves around
the player will need to keep an eye out for possible traps and avoid them.
Objects
Objects in our game world are designed based on the kinds of objects that might be found in feudal Japan.
However, some objects may or may not be out of place as our aim is to provide an enjoyable environment and
not to accurately represent history.
To see a full list and thumbnails of all the objects in the world please see the Object Appendix.
Rendering System
Camera
The camera will be in first person perspective while roaming through shay's world. When you have entered into
the Japanese Pagoda on the opposite side of the Japanese area you will lose control of the camera as it pans
around to zoom in on the comics appearing on the wall. After the comics are finished the camera will be locked
to the character and move sideways with him. As you move in either one direction or the other the camera will
angle slightly so that you can see more of the world in the direction you are moving
Confidential
2/15/2016
Page - 7 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Game Engine
Overview
The game engine currently in production for the game is getting coded from scratch. For loading of static models
the game engine supports .OBJ format. Models loaded in this way can either be displayed with a texture or cell
shaded. The model loader is designed in such a way that adding new models and changing existing models can
be done easily with minimal amount of coding.
The animation for the game will be done using multiple .OBJ files which will form the key frames. These key
frames then get interpolated between to form the animation. This approach is relatively simple to implement and
the result is a smooth good looking animation.
Level Creation
The level is built from a csv (comma separated values) file that contains numbers (and colons) denoting what
object is to be stored in that location. The use of csv file type makes level creation and editing very easy,
especially when using excel as the different objects can be highlighted different colours (see figure 1.0). The
Level class reads in the csv file and creates the objects in the required places based on the stored start x and y
positions and the scale, this is then stored in a map.
Figure 1.0 .csv file in Excel
Collision Detection
Our game will be using axis aligned bounding boxes for collision detection. The reason why we chose this form
of collision detection is because, as a side-scroller, we can make everything in our world axis aligned. By using
(primarily) boxes for our level design it makes collision detection very easy. Also, because we will only be
drawing a set amount of each level either side of the camera, we can just use collision detection on that section
and cut back on complexity.
The World Layout
Overview
The world is set out in 4 sections. First, there is Shay's world which is a 3D model of a courtyard in Murdoch
university. This part of the world is designed as a first person, free-roam walkthrough. The second area is our
extension to Shay's world which continues along the physical sciences building, however when you walk down
this path you will discover a Japanese gateway covering the path with a set of wooden stairs leading up into the
third area. The third area introduces the cell shading effect, japanese architecture and more complex models. This
area will act as an introduction to our world and is the stage for the transition. Once the transition point has been
passed the fourth area is reached.
Confidential
2/15/2016
Page - 8 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
The fourth area is the actual game area where the camera is locked to a plane and follows the movements of the
character. The game world will be divided up into different rooms, all connected together, which the character
will have to safely traverse in order to meet up with the final boss and save the princess.
Confidential
2/15/2016
Page - 9 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Game Characters
1.
Player Character: Hanzo
a. A ninja armed with tools of the trade (including katana, shuriken and the occasional bomb)
b. He makes his way through trap filled dungeons and pagoda levels in order to save the princess
c. Decked out in full ninja gear, including face mask, sash and tabi (Traditional Japanese socks)
d. A mute character, (he's the strong and silent type)
2.
Non-Player Character: Tokugawa Ieyasu
a. A Shogun of Japan
b. Boss of Ninja Gai
c. Only plays a minor role in the game, is a big part of the story however.
3.
Non-Player Character: Toku Hime
a. Daughter of Tokugawa Ieyasu
b. Love interest of Ninja Gai
c. Fragile, gentle princess.
d. Is kidnapped and must be rescued.
4.
Non-Player Character: Toyotomi Ninja
a. Enemy to Ninja Gai, scouting the castle to eliminate him.
b. Dressed similar to Hattori but different colours.
c. Some are smarter and more talented than others. Colours can indicate the types of tactics they
will employ.
5.
Non-Player Character: Toyotomi Leader
a. Not much is known about the Toyotomi Leader.
b. Ruler of the Toyotomi clan
c. Enemy to Shogun Tokugawa Ieyasu
d. Final Boss
e. The smartest and toughest opponent Ninja Gai has ever faced.
Confidential
2/15/2016
Page - 10 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
User Interface
Overview
The game is controlled exclusively through the keyboard to simplify the controls. The ninja can move,
jump, fight with a katana and throw shuriken/bombs.
UI
The User interface is drawn in 2D using simple polygons. Each polygon has two textures applied to it, one
for the Texture and one for the mask to get the transparency. On the single player display there are
indicators for the amount of bombs you have, a key indicator, current weapon display, and a health bar.
Confidential
2/15/2016
Page - 11 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Weapons
Overview
The weapons used in the game in include katana, shuriken and bombs. The player character has
access to all three, though bombs are in limited supply, while the AI uses only the katana and shuriken. All
weapons have sounds attached and will play different sound effects depending on what they hit and even if
they hit nothing at all.
Katana
The katana is a short range weapon limited to hitting only what is directly in front of the character. It deals
an average amount of damage but is also capable of blocking shuriken.
Shuriken
The shuriken is a long range weapon that moves in a straight line until it collides with something. It deals
an average amount of damage, the same as the katana.
Bombs
The bombs in the game are in (relatively) short supply with the character starting with the max amount of 3
in his inventory. When you use your bombs you can pick up some more by walking through bomb pick-ups
which will restore your bombs by 1 to a max of 3. The bomb is a mid range weapon quickly falling to the
ground after being thrown, that deals a high amount of damage,
Confidential
2/15/2016
Page - 12 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Musical Scores and Sound Effects
Overview
Every great video game requires great audio. Through music and sound effects a player can become immersed in
the storyline and grow emotional attachment with the characters. Audio can be the driving force in a fight or the
cause of the first tear shed. Ninja-Gasm will follow in the footsteps of many great games through its completely
custom audio recordings.
Music
The music of Ninja-Gasm is all composed specifically for the game. It was written to capture all the elements
within the game: Feudal Japan, the 8 Bit Era, Stealth and Action. In places the music will be fast paced and
action packed, boosting adrenalin and getting the heart pumping, perfect for those action packed scenes with
swords cutting through the air. In others the music will ease, relaxing the player and letting them focus on a
tactical approach to a problem. All of the music is composed with heavy influences of older games, adopting a
somewhat 8 Bit sound but mixing it with real instruments to allow for a perfect combination of modern day and
old school sound.
3D Sound
A narrator will set the scene to the game as the story is explained, enemies will have unique voice sets
and important characters will each have their own dialogue written and recorded to perfection. Authentic sound
effects can add a lot to a game; Ninja Gai will not make any mistakes when it comes to the sound effects to be
used. All the sound effects will be realistic recordings: weapons clanging, water splashing, footsteps on concrete,
attention to detail will take the players mind away from the audio and allow for complete immersion of the game.
Confidential
2/15/2016
Page - 13 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Single-Player Game
Overview
In the single player campaign the player takes on the role of a ninja in feudal Japan who has just been betrayed
by a supposed ally. He arrives back at his masters castle only to discover that the princess has been captured and
the entire castle is under the control of the betrayer. The player must then traverse various trap filled levels in
order to reach the end of the game and duel with the evil lord in order to save the princess and live happily ever
after.
Traps
The traps in the levels (such as the spike trap) will be triggered by the player crossing their path. In the case of
the spike trap, when the player walks on top of it the spike will come up and skewer him. However, in order to
remove the need for trial and error gameplay there will be visual cues that allude to the presence of traps, such as
a blood stain on the floor or holes in the wall. This will mean that the player must keep an eye on his
environment and cannot just blindly run through the levels.
Story
A game without a story will often become dull and players will lose interest. But a game with too complex a
story can often take away from the gameplay and become less like a game. GASM Productions has taken this
into consideration when writing the story for Ninja Gai, and have found a nice balance between story and
gameplay to give the players a reason to play while keeping them focused on the actual playing.
The game is based in feudal Japan to give an authentic feel to a comic style game. Ninja Gai, the protagonist of
the story, is a Ninja under the command of the great Shogun of Japan, Tokugawa Ieyasu. A bodyguard mission
goes horribly wrong when the Shoguns castle is invaded and his family captured, including the beautiful Toku
Hime, the lady who stole Ninja's heart. Vengeance must be had.
Hours of Gameplay
The game is designed to have a simple storyline and simple gameplay, aiming to be fun rather than challenging.
Because of this, the hours of gameplay are limited. At the moment, the demo level can be completed easily in 15
minutes. Given extra time, more levels and objects would be added increasing the game time.
Victory Conditions
To win this game is simple, make it through the traps, kill all the enemies and then face the boss. Once the final
boss has been defeated, the ninja and his princess are re-united once more and it is happily ever after.
Confidential
2/15/2016
Page - 14 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Multiplayer Game
Overview
The multiplayer is very simple. Two ninjas, one v/s one, with the aim of destroying your opponent
before he/she can do the same to you. The multiplayer is on one computer using the same keyboard with
different key sets.
Max Players
Max of 2 players.
Confidential
2/15/2016
Page - 15 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Stuff we would like to add...


More pick-ups! If given time we would have developed size altering pick-ups with appropriately
designed levels to take advantage of the size differences. For example, a section of the level where
a key is located that you can only get to by becoming smaller and going through the tiny opening
in the wall.
Creating a group of classes to deal with all the display, movement, and animations of the AI. If
this feature were to be implemented, it would have saved us a lot of time.
Confidential
2/15/2016
Page - 16 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Room for Improvement…
There were a lot of things in this game that we’ve coded and now realize could have been done better. This
section is a rundown of exactly what we would do better if we had the chance.
Level Objects
Because of the way that the level objects are treated and passed around they needed to be stored as
Level_Object pointers so they could be treated polymorphically. This led to a lot of additions to the base
classes Game_Object and Level_Object, which really should not have been there. Whenever I needed to
add a new functionality to a class I added it to the base class so that it could actually be used so
Level_Object and Game_Object have ended up with a lot of empty virtual functions that are really only
implemented by one or two classes.
Collision detection
Originally I added the isVisible variable to the Game_Object class so that objects could be rendered
invisible of they are too far away from the camera to matter and so that collision detection could be turned
off on everything that is not visible. However, I forgot about this functionality when collision detection was
implemented in main. The test for isVisible is still there, and has some functionality as power-ups become
invisible once used, but results in collision detection on the entire level. If I had time I would recode this so
that the if statement used to determine if a level should be drawn is instead used to set the visibility of
objects which would result in less collision calls.
AI
In AI I would change the way that the class was implemented, I would insert a middle layer, that would
communicated between the state machine and the actions. This way the same AI could be implemented in
other games, with some minor modifications.
Confidential
2/15/2016
Page - 17 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Issues during coding…
Collision detection
The collision detection itself (luckily) worked first try, however the resolution and determining of the
direction was riddled with issues. Primarily, the resolution was failing because the direction being returned
was not always accurate. A lot of time was wasted on this trying to fix the Character’s collide function
instead of dealing with the actual direction function. In the end all that was needed was to make 2 values
absolute and the whole problem was fixed.
Bomb Area of effect
The bomb’s area of effect code, although easy to implement was inhibited by a minor logic error. The first
test done for the area of effect resulted in an explosion that just grew exponentially and never stopped.
Consequently the entire game world became scorched and the AI character died every time it respawned
while the explosion noise never stopped. This problem was solved after the logic in the if statements used
in the draw function were fixed so that it actually changed the Boolean flag rather than keeping it at
constantly exploding. Here is a screen shot of the mega-explosion after effect. The background is white
because it is the same Box class used for the platforms and it swaps textures on explosion collision but
doesn’t actually have a second texture.
AI
The AI is producing some unexpected results and due to time constraints (and sleep deprivation) we are
currently unable to fix it. These are the problems;
1.
2.
Confidential
The AI follows the character even though
a. It should not be able to see the character, and
b. Should not be able to move past its patrol area
De-spawing the AI is also buggy but we can’t figure out why. The suspicion is that there is a
logic error in the if statements controlling it.
2/15/2016
Page - 18 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Screen resolutions
Although the screen resolution options work (for the most part anyway, and the minor errors are fixable)
we were unable to properly implement the return to window mode. For some reason everything just goes
black and although there are sound effects and the game logic is still going nothing gets draw or displayed
at all. For the other resolutions, the textures are a little off and the UI’s blending and transparency has some
issues. Also, for some reason the bounding box of the player character magically doubled in size when you
changed resolution however this was fixed.
Confidential
2/15/2016
Page - 19 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Objects Appendix (not all of these were used)
Dungeon Door
Team Logo
Japanese Gate
Japanese Lamp
Full Pagoda
Half Pagoda
Confidential
2/15/2016
Page - 20 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Spike Trap
Straw Target
Torture table
Wooden Training Dummy
Confidential
2/15/2016
Page - 21 -
Copyright (C) 2010 GASM Productions – All rights reserved – NINJAS!
Story Appendix
The game is set in ancient feudal Japan around the 1600s. Story concepts for the
game are mostly fictional with a few ideas and names from historical people and
places of the time. You play the role of Hattori Hanzo, a great samurai of the time
and personal bodyguard of Tokugawa Ieyasu, Shogun of Japan. Due to both your
honour and loyalty to the Tokugawa Shogunate and your extensive training in ways
of the samurai and the ninja, you are given the responsibility of protecting the
Tokugawa family, one major benefit of this being the shoguns daughter, Toku Hime
who you have fallen in love with.
You are given the order to protect Tokugawa Ieyasu during a treaty signing in Kyoto,
3 days travel from Castle Osaka. However before arriving you find the corpses of
your own men. Upon closer inspection you find a warning note to be delivered to the
Shogun, explaining how the treaty was just a diversion to infiltrate Castle Osaka.
Your return to the castle is too late, as you find it overrun by Clan Toyotomi, rebellion
to the Shogunate. To stay loyal to the Tokugawa family and to protect the one you
love you plan to infiltrate the now overrun castle through the dungeon. Samurai
honour will simply get you killed in a mission such as this so instead you choose to
use the arts of stealth and cunning and the special technique of Ninjutsu.
Confidential
2/15/2016
Page - 22 -