Repository navigation
Technical Design
A TDD serves as a blueprint for your programmers, outlining the game's technical aspects. Here's how to build one on a GitHub Wiki:
- Introduction: Briefly describe the game, genre, target platform (PC, mobile etc.), and core functionalities.
- Game Architecture: Explain how the game will be structured. This might involve components like the game engine, networking (if multiplayer), and data management. You can include diagrams for better visualization.
- Core Systems: Delve deeper into the technical details of major systems: Gameplay Mechanics: How will movement, combat, or resource gathering work?
- Input & Controls: How will players interact with the game (keyboard, mouse, touch)?
- Rendering: 2D/3D graphics engine and rendering pipeline details.
- Physics: How will physics simulations be implemented (if applicable)?
- Networking (if multiplayer): Communication protocols, server architecture, and data synchronization.
- AI (if applicable): Enemy or NPC behavior logic.
- Save System: How will player progress be stored and loaded?
- Data & File Formats: Specify file formats for game data (levels, characters, audio, textures etc.).
- Development Tools & Technologies: List the programming languages, libraries, and frameworks used for development.
- Testing Strategy: Outline how the game will be tested (unit tests, integration tests, manual testing).
The turning of the player will use an raycast. The cursor will aim at a point in the scene itll return a vector 3 which will subtract from the current position so I know what the direction is and set that as the rotation.
On wave 1 each zone will have the exact same amount of zombies that it will spawn. It'll use a for loop so it iterates through the total spawn amount. It uses a random number generator with its ranges being the the minimum and maximum their zone then it will spawn until it has spawned the amount of enemies its required to.
graph TD;
Start((Start))--> Wave-starts
Wave-starts--> Get-current-wave;
Get-current-wave--> Calculate-enemies-Count
Calculate-enemies-Count-->Spawn-enemies
Add-Health-Correlating-To-Wave-->Spawn-enemies
Spawn-enemies-->Killed-all-enemies?
Killed-all-enemies?--> |Safe period| Wave-starts;
The enemy then gets an script for targeting, movement and attacking, within the targeting script, the script will target the nearest structure it finds, if the player comes near the enemy, it will target the player.
For the Enemy movement script, it will use the navmesh to get to the nearest structure for the enemy to attack, if the player gets too close to the enemy, the enemy will follow the player so it can attack the player.
When the Enemy uses the Attacking script, it will give the player or the structure it hits damage. If the player or structure has a health value of 0 or below, the player dies or the structure collapses.
graph TD;
Start((Start)) --> Enemy_Spawns;
Enemy_Spawns --> Is_Player_InRange;
Is_Player_InRange --> |Yes| Player_Target;
Is_Player_InRange --> |No| Get_Nearest_Structure;
Player_Target --> Move_To_Player;
Get_Nearest_Structure --> Find_Nearest_Structure;
Move_To_Player & Find_Nearest_Structure --> Is_Enemy_At_Target?;
Is_Enemy_At_Target? --> |Yes| Attack_Target;
Is_Enemy_At_Target? --> |No| Move_Towards_Target;
Move_Towards_Target --> Is_Player_InRange;
Attack_Target --> Target_Dead?;
Target_Dead? --> |Yes| Is_Player_InRange;
Target_Dead? --> |No| Continue_Attacking;
This script is used by every single object that needs health, like the player, enemy, structures or the main base, the Enemy deals damage to the base, structures or player, the Player deals damage to enemies, and some structures can deal damage to the enemy.
graph TD;
A[Player] -->|DealDamage| B[Enemy]
C[Structure] -->|DealDamage| D[Enemy]
E[Enemy] -->|DealDamage| F[Player]
E -->|DealDamage| G[Structure]
E -->|DealDamage| H[Base]