Skip to content

3. Tech Design Document

Eweer edited this page Mar 11, 2023 · 19 revisions
Table of contents
  1. Description and considerations
  2. Milestones and Objectives
  3. Budget
  4. Development hardware and software
  5. Build Creation
  6. Files format

Development hardware and software

Hardware

With the products we stated in the production plan, the plan is to use that material. If not, we can use our own material.

Software

Code

  • GitHub Desktop

  • Visual Studio 2022

Assets

  • Adobe Photoshop

  • Aseprite

  • Tiled

External libraries

  • SDL

  • PugiXML

Build Creation

v0.5 (Vertical slice)

v0.8 (Alpha)

v1.0 (Gold)

Coding Style

The #define guard

  • All defines and macros should be in all caps separated by underscores if there are multiple words.
  • All header files should have #define guards to prevent multiple inclusion.

#ifndef FOO_H_

#define FOO_H_

...

#endif FOO_H_

Variable naming

  • Variables should be in camelCase.
  • Variable names should specify what they do:
    • If a variable is used instantly and never used again in an obvious usage (e.g iterator in a while), it's fine with it being a single letter (e.g.: i).
    • If a variable is used in multiple parts of the code, be as long as necessary (e.g.: tilesFromPlayerToEnemy).
  • Do not deny boolean variables (e.g.: "notDead"), use: "isFalling", "isAlive" instead.

Enumerations

  • Always use enum class.
  • Enums should be in TitleCase.
  • Members should be in all caps with underscores if multiple words.

Class and Structs

  • Always in TitleCase.
  • Do not mix public and private members.

Miscellaneous

  • Brackets after functions should go on a new lane.
  • Use TABS instead of 4 spaces.

File Organization

File formats encode information so that it can be accessed by the same or similar software programmes in the future and accessed from any computer and some mobile devices. Selection of file format is often determined from the software and hardware that we initially use to encode the information. With that being said, here we have the format files we will be using for the project:

Art

  • Art assets should be in *.png.
  • Sprites with few (2-) or no animations:
    • Should be encapsulated in a folder.
    • Should be named as: Identifier of item + image variation number + "_" + name of animation + frame number. Example:
    • Items
      • arrow0_shine000.png
      • arrow0_shine001.png
      • arrow0_static000.png
      • arrow1_shine000.png
      • coin0_rotation000.png
      • ...
  • Sprites with a large (3+) animations
    • Should have their own folder per animation.
    • If the images are part of a longer animation, they should be named: name of the animation followed by the frame number.
    • Example:
    • Characters
      • Player
        • Idle
          • idle1.png
          • idle2.png
        • Attack
          • ...
        • Run
          • ...
      • Enemies

Audio

  • File format has to be either *.ogg or *.wav.

  • It has to be stored in the corresponding SFX or music folder.

  • In case there are multiple sounds related to each other (e.g.: enemy sounds on battle) they should be inside a folder. Example:

  • Example:

    • Audio
      • SFX
        • Battle
          • Enemies
            • Slime
              • slime0_hit.ogg
              • slime0_death.ogg
              • slime0_attack.ogg
          • Player
            • ...
        • Overworld
          • ...
        • Example3
          • ...
      • Music
        • ...

Map assets

  • Tiled format file should be *.tmx.
  • Maps in tiled should NOT have tileset data embedded on them. It should be in their own *.tsx file.
  • The *.tsx file should be stored in the same folder as the *.png.

Data saving

  • Configuration files and databases should be on .xml format.
Clone this wiki locally