Code - BooLAW/Zelda-Project GitHub Wiki

Code Technical Document

1.Github:

Commit Name: the name of the commit has to be self explanatory, and needs to explain the area of work and see if it’s a WiP* commit or a TF* commit specifying it at the end of the commit name.

Example: “Sprites Polish WiP”

Commit Description: Explain with detail what’s done in the commit, use “-” if there is more than one issue in the commit.

Example: 	- Now App works with list
		- Erased p2List includes in Map and Textures headers

*WiP means work in progress, we will put this while a task it’s in the in Progress column of trello. *TF means task finished, once we’ve done that

2.Code Style:

2.1 Functions: for the name use capital letters only in the beginning of a word, if there are functions that affect the same part of the code try to use a similar structure in both functions.

The target of a function is to do just one task, so we will use short functions that will only do one task, don’t try to do more than one thing in a function because smaller functions are more useful and adaptable for future features.

Talking about game resources, the maximum number of local variables should be 5, there can be some exceptions that will be discussed with the code responsible.

Example: “ WorldToMap() ”

2.2 Comments: in order to make the code easy to understand it will be very useful for us to know how the functions work and what is the optimal way to use it and also know what could break the function.

Example: /* Here we will introduce a string in order to get the char with the bigger Ascii value, just the 256 first values, don’t use any other*/

2.3 Variables: even if challenge it’s cool calling an integer variable “Cervantes_Book” it’s not an option. There are special name variables that will have always the same name:

2.3.1 Loop counters: we will use i, j and k when we use integer sizes to travel, and we will use it when we use pointer positions to do it.

2.3.2 Single temporary functions: will be called tmp.

2.3.3 Temporary buffers: will be called buf.

The other variables will be named all in lowercase and if they have more than one word use underscore to separate the words

Example: “walkable_path_link”

2.4 Braces: in C most people use the Kernighan and Ritchie format: if (x == true) { Multiply(y,x) } but to keep the code more organized with symetric identations we will use the braces like this: if (x == true) { Multiply(y,x) }

3.Version List

v0.1:Basic Movement, collision boxes, pathfinding basic UI for the first scene

v0.2: Town map, able to get inside and out of buildings, create the first enemy.

v0.3: Dungeon basic enemies implemented(attack, and move included not with AI)

v0.4: Objects connected with an inventory, implement random chests and items dropping items.

v0.5: Implement the Boss

v0.6: Implement the town(the logic) and the store.

v0.7: Implement cooperative mode(someone that follows you but the camera is guided by link)

v0.8: AI

v0.9: Alpha

v0.9.5:Beta

v1.0: The 1.0 version will be the gold version, it will be the release the last day with all bugs fixed.

4.Performance Budgets

In order to keep the game working properly we have to set how the engine is going to work and use the performance resources, to keep our game working around the 80 FPS, to do that we have to cap the work that every module does.

5.Target Hardware:

The game is though to be played in PC, the player will only need a simple keyboard or a controller to play the game.The operating system of the game will be from windows XP to Windows 10.

6.Branching Policy:

The project will be divided in 5 branches and an extra one if we have a lot of features work to do, the workflow is the next one, the code will be updated in the develop branch, and in order to don’t accumulate many features in the features branch every 2 or 3 features we will add this features(art,effects,audio,...) to the develop branch.

We will also have an special branch for big bugs called Hot Fixes in order to work on those complex bugs that don’t let the code move further and need more than one day to be fixed.

Another branch will be the master/version branch, there we will have every version of the game, and finally our last branch will be the release branch that will start having commits once we want to fix all the bugs in release mode before releasing the v1.0.

7.Changelist

v0.1:In this version we will have a 2 scenes the Menu scene and a scene with a big texture room in the background, and columns in this room. Our character will be there, the player will be able to move it around colliding with the walls and with the columns, the basic attack and walking animations will be done.

v0.2: In this version we will change the room texture for a town, with our character’s house, we will be able to get in and out, some NPCs or enemies will be placed around in order to collide with them.

v0.3: Here we will be able to go from our town to the dungeons through a portal, in the dungeon we will have a room with more than one type of enemy, this time you will have hp, more actions and the option to pause the game.

v0.4:The player will be able to get some items in the town and in the dungeon, the objects in the town will be given by the villager and the objects of the dungeons will be randomly thrown by the enemies.

v0.5: In this version a town villager will tell you to go face an horrific boss that will be hidden in one of the deepest rooms of the dungeon.

v0.6: In the dungeons you will earn some coins to spend in the town store to buy a few items or information that will help you in your quest.

v0.7: Once a mission is completed you will have an NPC that will follow you and give you extra stats.

v0.8: This time the enemies won’t move with a seen frequency some of them will follow you and move by groups, every enemy movement will have sense and this time the quests will be more difficult to face.

v0.9: Here we will have the logic of the game completed and we will have to polish things such as audio, sprites animations and optimize memory resources.

v0.9.5:Beta, in this phase we will focus on fixing all the bugs before the gold is released.

v1.0: The 1.0 version will be the gold version, it will be the release the last day with all bugs fixed.

8.Build delivery method

When the core of the game has been implemented into the project, we will start using AppVeyor to build the releases. This tool allows us to test that the code does compile, select a few elements to upload and upload directly to GitHub with different tags that allows for easy identification of the builds delivered.

UML link

Here i have brief explanation of how entities will work, the rest of the code will work around an own 2D engine. Entity Manager UML link

BACK TO HOMEPAGE