⚠️ This repository has now been superceded by the newOutpost Assault repothat accompanies theOutpost Assault course.Please use that codebase instead of this one. We're still preserving this codebase because it has one or two features not present in the other one, such as hit states. Note, however, that this version is missing explosions, sound effects, and will be less up-to-date overall.
An open source 2D tile-based tower defense game template built for Godot 4.0, created byQuiver.
Godot 4.0 RC 6 or later.
(click to watch the full trailer!)
- Tower placement
- Different tower/weapon types
- Various projectile types
- Different enemy types
- Enemy pathfinding
- Basic enemy AI
- UI and HUD
- Player-controlled camera
- Godot 4's new features:
- GDScript's annotations
- The massively-upgraded
TileMap
system - The Navigation Server API
- Physics bodies, including the new
CharacterBody2D
- Signals
- Class inheritance
- Scene composition (oraggregation)
- Character movement
- Character animation
- Collision detection
- AI implementing the Finite State Machine (FSM) pattern and states
- Following Godot'sbest practices
- Creating UI and HUD usingthemeswith the built-in Theme Editor
- Scene switching/reloading
The code will be written using static typing whenever possible and following the official GDScriptstyle guide.
Every asset will be named usingsnake_casefor usability.
snake_case
means the first letter of each word is written in lowercase and spaces are replaced by underscores_
.
The following convention will be used:entity_animation_xx
whereentityis the entity itself (e.g.turret,player,muzzle_flashetc.),
animationrefers to the type of animation andxxare numbers indicating the sprite's order in the animation (starting from 00).
Examples:infantry_idle_00.png
,infantry_idle_01.png
,explosion_13.png
,infantry_move_00.png
,etc.
Optionally,entity
can be omitted if its sprites are in a folder named after the entity itself.
For example, if we have tanks and infantry, we could have the following folder structure:
tank/idle_00.png
tank/idle_01.png
tank/move_00.png
tank/move_01.png
...
infantry/idle_00.png
...
infantry/move_00.png
...
animation
can also be omitted in case an entity only has one animation (e.g. a bullet flash or an explosion).
- This project usesGit Large File Storage(LFS) to store asset binaries. To initialize it make sure you have LFS installed, then simply run
git lfs install
- Clone this repository from Github
- Open the project file with Godot 4 and run it to play theOutpost Assaultdemo!
For bugs and feature requests, feel free to file an issue here or comment on this template'sproject page.
If you manage to incorporate this template into your next project, please share with theQuiver community!