Technical Design Document - GameDesign/Zero GitHub Wiki

Table of Contents

Game Overview

Game
 Summary

As a chef running a restaurant during the zombie apocalypse, players must arrange ingredients together to create meals for their discerning clients. Players will swap locations of different body parts laid about the play area to make chains of four or more of the same kind to feed their zombie customers.

Platform

While consoles and handhelds are the common target platform for many games, they typically have a audience of traditional or hardcore gamers. As a casual game the platform must be accessible to as many people as possible. The game's simple point and click controls means that the gameplay is able to function with a mouse or touch interface. Initially, the game will be developed to be play over web browsers to reach the greatest possible customer base. However, if time permits, we will also make the game for mobile devices.

Development Overview

Development Team

Brandon Kerr

Zombies and chef movement, animation, actions, attributes, etc.

Nick Schudlo

Overall design and implementation; ensuring that all parts work together as a whole.

Spencer Baynton

Tiled play area; loading new tiles, moving player swaps, checking for chains, etc.

Taylor Jackson

Shop and main menu; design of layout and implementation.

Development Environment

The game will be developed using the Flixel library. Flixel is an Actionscript 3 library written by Adam "Atomic" Saltsman that is open source, free for commercial use, and designed to be easy to learn, extend, and customize.

Development Hardware

The hardware being used to develop the game includes both Mac and Windows computers. FlashDevelop requires a minimum of Windows 2000 with the .NET 2.0 runtime as well as Java 1.6 runtime or higher with at least 512 MB of RAM.

Development Software

Windows users will be using the FlashDevelop IDE and Mac users will be using Xcode to develop ActionScript 3 programs with the Flixel library. Version control will be handled by Git with the repository hosted by GitHub. Git Extensions provides Windows with a graphical interface for Git.

External Code

We will be using the Flixel library for ActionScript 3 written by Adam Saltsman. Art will be made by Holly Bu'Lock. Sound will be made by Tyler Baynton.

Game Mechanics

Main Technical Requirements

The main technical requirement for this game is the algorithm for finding chains of connected body parts. Most other aspects of the game are not as intensive: calculating points, drawing animations, moving zombies closer to the player, etc. Also, as the game progresses we will have to make sure that the levels become more difficult without creating balance issues. We will have to make sure the game gets harder at the same pace that you are able to purchase more upgrades and weapons, without allowing the player access to powerful upgrades too quickly.

Architecture

There are three modules in the system. These are: home menu/local leader board, gameplay and the shop. The home module houses the main menu for the game, local leader board and settings. The gameplay module hosts everything to do with a gameplay session. Lastly, the shop is where players may upgrade items found in the game. The interactions between these modules are very straight forward. The home module is used to start a gameplay session. During or after a game play session, the player will have the option to visit the shop and upgrade game items. After a visit to the shop, they will return to the game or main menu depending on whether their session was over. Here is a diagram depicting their interaction:

Game Flow

Main Game

The game will begin at a title screen where players can play story mode, arcade mode, view high scores, and adjust options. From the Options screen, players can view credits, turn on or off music, and turn on or off sound effects. When players start a new game, they will be shown an opening cinematic which can be skipped by tapping the screen. Once players begin the game, the upper-most part of the screen will display the player's current ammunition, status of zombies for the level, and score. Next, the 7x7 play area filling the upper portion of the screen and the chef and zombies along the bottom portion. Zombies will appear starting from the left side of the screen at random intervals which will be closer together as levels progress. The zombies will be randomly chosen before being loaded on the left side of the screen. There will be different types of zombies that what different kinds of body parts, which will be displayed in a speech bubble. The zombies will walk towards the chef on the right side of the screen. As levels progress, the zombies will walk faster. If a zombie reaches the chef, the player will lose and will be shown results of how many points they had and have options to exit to the main menu or to retry.

Players will swap locations of different body parts in the play area, and upon making a chain of four or more of the same type, the chain will be removed from the play area, any pieces left above the empty space will drop down, and new pieces will be randomly chosen to fill the empty spaces above. If players make a chain of the same type that a zombie wants, the the player is awarded additional points and the zombie leaves. If the chain is not one of the desired types, the front-most zombie will be momentarily stopped and the player will receive only the base points for completing the chain. The chef also has a double-barreled shotgun to kill the front-most zombie. If the player has any shotgun shells left, the player may click on the chef to make him use the shotgun. The player may only hold two shells at a time, and can gather more to replace the used shells. Ammunition will appear in the game board with a random, low-probability chance. These icons will act as wild cards, and so can be used to complete any chain. If a chain is completed with the ammunition, it will be added to the player's stock if there's room. Ammunition can also be purchased from the store, which will be outlined below. Levels will be completed by surviving a predetermined number of zombies, and the player's progress will be displayed at the top of the screen. Players need to either feed or kill each of the zombies to successfully complete the level. The number of zombies required to survive will increase in higher levels. As well, some levels will have bosses which require multiple types of body parts to be satisfied. Upon completing a level, the player will be shown how much money was made and their new total. They will then have the option to go to the shop to purchase upgrades or move on to the next level. Once players finish the final level, they will view a cutscene to complete the story and will be returned to the main menu.

Shop

After completing a level, and before starting a new one, players will have the opportunity to enter a shop. Using the money that they have acquired, players may purchase ammunition for their weapon, upgrade their current weapon, purchase new weapons, purchase defensive upgrades, or purchase bonuses like costumes for the chef and zombies. Players will click on an item to view a description and will have the option to purchase or go back to the main shop. Items that require more money than the player has will have the price written in red to indicate that it is not a valid option. At any time, the player may leave the shop and begin the next level by clicking the exit icon.

Endless Mode

Players will also have the option to play an endless mode. There are no levels, just endless waves of zombies, which will come faster and have more requirements as time progresses. The goal is to survive the longest time possible, satisfy and/or kill the most zombies possible, and collect the most money possible. Upon the player loss, the results will be stored to the leaderboard. Players may choose to play continuously to acquire more money to buy better upgrades and go for a new high score.

Graphics

As we would like to eventually release this game for iOS devices the gameplay is being designed to fit within the iPhone's original resolution of 320 by 480 pixels. Newer models of the iPhone have resolutions of 640 by 960 pixels and thus sprites with eventually need to be made to accomodate both possible screen resolutions. The board of tiles will be 7 by 7 and stretch the width of the play screen (320 by 320 pixels). Thus each tile will be 44 x 44 pixels leaving a 2 pixel gap between tiles. With the board being 320 pixels high, there is a 160 by 320 pixel area for the characters and their animations.

Audio

The audio for the game will be developed by Tyler Baynton. Throughout the game there will be both music playback and sound effect playback. There will be background music playing throughout gameplay, as well there will be special music playback will occur when the user is at the main menu and when they have lost the game. Other sound effects will be played when a players successfully makes a chain of food for a particular zombie. This will be quickly followed by the sound of a zombie crunching down on their new feast. If a zombie gets too close and the chef is required to shoot them, a gun shot sound will be played appropriate to the type of gun the chef is using. As the zombie are walking towards the chef, they will be moaning the type of body part they would like. For example, one zombie will moan for "braaaaaaaainz".

Artificial Intelligence

Zombies are to enter the screen at random intervals. Furthermore, they will have different paces at which they travel. Zombies will simply move across the screen at the pace which is randomly assigned. The second part of the game that artificial intelligence is to handle is the game board. Initially it will be populated with random items to feed the zombies. These items are determined based on a probability for each given item. Once a chain has been completed, those items will be cleared and replaced with new ones. This is again based on probability of given item. Once players perform a swap of tiles in the play area, the program will perform a search algorithm to determine any chains. To do this, the grid will also be represented by a 2D array. From one of the swapped tiles, we will get the type, and go up the column that it's in, looking for any chains. When a chain is found, the tiles will be added to a temporary list. Upon completion of the column, the algorithm will move to the next column on the left. Referencing the list, the algorithm will check the x (or row) position and compare types. If there is a match, then check the entire column to see if there is also a chain with any of the matched tiles. Any new tiles in the chain will be added to the temporary list, and the algorithm will continue left and repeat. Once the left-most column has been searched, or the search for a match in the rows fails, the left side is complete, and will move to the column to the right of the swapped tile location. Working in the same manner, the algorithm will check for chains and add them to the list. Once the right-most column has been checked, or the search in the rows fails, the search is complete. If the list contains at least four elements, they are removed from the board and the player is awarded points accordingly. This process is then repeated for the second swapped tile.

Physics

The zombies have collision detection with the chef to determine the fail condition. Once a collision has been detected between a zombie and the Chef the round/game will end. There is also collision detection between the Chef's bullets and the zombies. At any point, the player can choose to shoot at the oncoming zombies, and a detection has to be made between the bullet and the first zombie it hits.

Game Objects and Logic

Tiles

The tiles of the play area will be the following body parts: brains, hearts, intestines, arms, legs, eyes, and stomach. The player interacts with the tiles by clicking on one, and then another, causing their locations to be swapped.

Chef

If the player has any ammunition for their weapon, upon clicking on the chef, he will fire his weapon. Players will be able to upgrade their weapon, increasing the amount of ammunition stored as well as how many zombies it will kill.

Zombies

There will be several different types of zombies, wanting different types of food. As time progresses, the zombies will move towards the chef according to their speed. If the player makes a chain of the type that the zombie wants, it will award the player with points and leave.

Data Management and Flow

There are a few places throughout the game where a player will need to save and load data. These are where a player wishes to view/record their high score, view the local leader board, load/save their story mode progress, and load items purchased for the game shop. At the end of a gameplay session, if the player has received a top score, they will be presented with the option to add it to the local leader board. This will be a saving action. At any time, from the main menu, players may view the local leader board which hosts the top 10 scores for players. This will be a loading action. If a player wishes to continue their story mode, their previously save game will be loaded. Lastly, throughout story mode, players will be able to buy items from the shop. If a user quits their game, they should still be able to use those items. Since this material is not sensitive or big there is no need for encryption or compression. As far as the procedure goes to do the saving a loading, Flixel has a built in functionality to handle this.

User Interface

Game Shell

There are four non gameplay centred screens that the user interacts with. These screens are: main menu, options, high scores and credits. To view each of these screens, with exception of the main menu screen, the user will select a button. This will cause the view to appear. The main menu is an exception because it will load on the start of the game or after a game session has been completed. When a button is clicked, a short sound effect will be played notifying the user of their selection. After the sound effect has been played, the selected screen will be displayed.

The main menu will house buttons to view the options, high scores and credits. When the options button is clicked, a view will be displayed with the ability to view credits, turn on or off game sound effects and turn on or off game music. The player will press buttons to toggle the sound and music on or off. When the credits button is selected, the credits view will be displayed showing who made the game. A conformation sound effect will be played when the button is selected. Lastly on the main menu, is the ability to view the high scores. Once clicked, a view will pop up showing the top 5 high scores for local users.

Play Screen

The screen resolution will be 480px tall and 320px wide. The reason for this resolution is so that the game has the right dimensions to be ported to smart phone or portable device. The game will have three major screens: Main Menu, Main Game, and Shop. There will also be an in game Pause Menu with in game options.

Main Menu

The main menu contains the title of the game and instructions on how to start the game (i.e. click to play). The main menu will also consist of 4 options:

  • Story Mode
Story mode will consist of the ability to continue to play the story, which is broken into different levels. The different levels are unlocked as you play, and each level gets progressively harder. The different levels of story mode can be replayed, which can help to increase funds to purchase better upgrades. This makes it easier to pass harder levels further into the game.
  • Arcade Mode
Arcade mode will be a continuous mode, which will not be broken into different levels. Arcade mode will be very high score oriented, and will have special bonuses such as score multipliers, as well as the unlockable ammunition.
  • Options
The options section will allow the user to turn on and off the music and sound effects, as well as display the credits.
  • High Score
The high score section will show the local high scores of the arcade mode. There is also the possibility of including an online high score section which would display daily, weekly, and all time high scores.

Main Game

The main game screen will consist of the top portion being game board, while the lower portion as the zombie soup line. The lower right side will have an image of the Chef preparing and serving dishes, with zombies walking in towards the Chef from the left side of the screen. At any point if the player has weapons stocked up, they can select the Chef and use these weapons to attack the zombies moving towards him. The game board will consist of 7 rows by 7 columns of tiles. Each tile is 44x44 pixels, and has an image of a body part on it, or a bullet. The user switches tiles by first selecting the tile they wish to move, and then the tile they would like to switch with.

A pause button will also be located on screen at the lower left side of the screen. At any point the player can press the pause button to bring up the pause screen.

Pause Menu

The Pause Menu will appear when the player presses the pause button. The menu will have a Resume button, Sound Options, as well as an Exit option.

Shop

The Shop screen will appear at the end of a round. Here the player can choose to purchase upgrades and weapons, or bullets for weapons already purchased.

Technical Risk

The technical risk for this project is quite low and there are only two things that may hinder our project. The first thing is that some of our group members are unfamiliar with the development platform. We can overcome this be ensuring we leave enough time for us to develop the system and tackle any problems early and quickly. Secondly, the algorithm to determine a chain of items on the game board can be quite complicated depending on what we decide to accept as a chain. This would include whether it must be 3 or 4 pieces in a row, if diagonals are allowed and whether shapes like an "L" are acceptable. We can overcome this challenging aspect of our project by designing a good algorithm together and then test it throughout our development process. We will have to make sure that the game doesn't have any balance issues when it comes to how quickly it gets difficult, and how quickly the player is able to purchase powerful upgrades. If the player can buy unbeatable defence too quickly, the game becomes too easy and not worth playing. However, if the upgrades take too long to buy the game is too difficult and frustrating.

⚠️ **GitHub.com Fallback** ⚠️