Technical Document - Guille1406/The-Legend-of-Zelda-Hyrule-Conquest GitHub Wiki

#Introduction: This is the Technical Design Document for our latest project: The Legend of Zelda: Hyrule Conquest.

In this document we are going to explain how the code is structured, the code style,the target hardware, the branching policy, the list of the versions and the UMLs.

#Code style:

##Files: We have different types of files.

Code files: The files for modules starts with "j1" . The files for scenes starts with "S_".

Art files: These files will be in .png format. Underline instead of space in names.

Map files: These files will be in .tmx format. The data of these files are encoded in csv. Also the collision layers have an integer attribute named Navigation.

##Classes: Same as code files. The classes for modules starts with "j1". All the others start with a capital letter.

class j1Input{

};

##Variables: All the variables are in lowercase.

iPoint player_position;

The variables will have a prefix which indicates the type.

int I_lives;
bool B_alive;
String S_name;

##Constants: All in uppercase.

#define TILE_COLLISION_ID 128
const static std::string EMPTY_CHAR = "";

##Comments: For single line comments we will use //

//Comment example

If the comment is more extense we will use /* */

/*Comment
Example */ 

##Placement of braces:

This two types will be accepted:

if (true){
int x =0;
}

if(true)
{
int x =0;
}

if there's only a line of code before the if, there will be no braces:

if(true)
  int x =0;

##Vertical alignment In classes the variables will be declared like this:

int      I_lives;
bool     B_alive;
Point    P_position;

##Keep Code Simple

return hours < 24 && minutes < 60 && seconds < 60;

instead of:

if (hours < 24 && minutes < 60 && seconds < 60)
{
    return true;
}
else
{
    return false;
}

#Target Hardware Our game will be released for Windows 7 (32 bits) or later, with at least 2GB RAM.

#External Software: We will use Tiled for making maps and TexturePacker for sprites.

#Spritesheet With the help of TexturePacker the spritsheet will be an .xml document with the following information:

Name: Every sprite of the same animation will have the same name. For example "Link_attack_down".

Rect: We will take the Rect of the sprite in the sprite sheet with four variables. X,Y, width and height.

Pivot: These variables will help to Blit the sprites correctly.

#Maps Every map will contain at least three layers:

Sprite Layer: This layer contains all the sprites. Only this layer will be printed.

Collisions Layer: This layer contains the collision information.

Logic Layer: This layer contains all the logic information of the scene. Like doors, chests enemies positions...

If the scene has different heights we will have one of these layers for every height map.

#Version List:

0.1.0.0

  • Blit Map
  • Collisions
  • Player Move
  • Single Player/ Multi Player
  • Camera

0.2.0.0

  • GamePad
  • Player Sprites and animations
  • Basic UI
  • Map Logic

0.3.0.0

  • 1 Enemy
  • Pick up and throw Zelda
  • Basic attack

0.4.0.0

  • Enemy sprites and animations
  • Tutorial
  • Scripts
  • 1 NPC

0.5.0.0

  • All the enemies
  • All the items

0.6.0.0

  • Menus and map
  • Mini map
  • Boss

0.7.0.0

  • All the map playable with all the puzzles

0.8.0.0

  • All NPCs
  • Store / Ruppes
  • Sound and music

0.9.0.0

  • Polish
  • Final animation

1.0.0.0

  • Polish
  • Test

#UML

General view of game flow: ![](https://github.com/Guille1406/The-Legend-of-Zelda-Hyrule-Conquest/raw/master/Wiki%20pictures/FLOW DIAGRAM.png)

Our code has a j1Module class. Other module classes inherit from this class.

Example of a Module in the game. In this case the Player module.

Return to Home