The goal is to create a working prototype for new users. Not everything needs to use ECS. Some things are best done with a pure node and signals system.
We'll be completing the following tasks in a 3D environment while only worrying about the latest current phase. So if you're on phase 2, we'll worry about phase 1 and 2 but not 3, 4, 5, or 6. Each phase will be fully functional before moving on to the next phase.
- Create a play button.
- When the button is clicked, load a new scene with a room that has 4 walls and a floor and a sun.
- When the new scene is loaded, we'll begin performing CRUD operations.
- Create a player entity.
- Read the player entity and log its details.
- Update the player entity's details: position, health, score, and xp.
- Read the updated player entity and log its new details.
- Delete the player entity.
- Attempt to read the deleted player entity and log the result.
- Create a player entity.
- The player should have a position component.
- The player should have a health component.
- The player should have a score component.
- The player should have an xp component.
- Think about if some of the data should be grouped into a single component.
- Implement player movement.
- The player should be able to move forward, backward, left, and right using the W, A, S, and D keys.
- The player should be able to jump using the spacebar.
- If the player, or any entity, moves outside the room, reset their position to the center of the room.
- Implement spell casting.
- The player should be able to cast a spell by clicking the left mouse button.
- When the spell is cast, create a spell entity at the player's position.
- The spell entity should move forward in the direction the player is facing.
- If the spell entity collides with the wall, an enemy, or a crate, destroy the spell entity and log a message to the console indicating what it hit.
- If the spell entity moves outside the room, destroy the spell entity.
- The spell entity should have a lifespan of 3 seconds before it is automatically destroyed.
- The spell has a cooldown of 0.5 seconds before the player can cast another spell.
- When the spell is cast, log a message to the console indicating that the spell was cast.
- When the spell is cast, play a sound effect.
- Implement camera controls.
- The camera should follow the player from a third-person perspective.
- The camera should rotate around the player based on mouse movement.
- The camera should zoom in and out based on the mouse scroll wheel.
- Create a health system.
- The player should have a health component.
- The player should start with 100 health points.
- When the player collides with an enemy, reduce the player's health by the enemy's damage value and log the new health to the console.
- When the player collides with a crate, destroy the crate and increase the player's score by the crate's score value and log the new score to the console.
- If the player's health reaches 0, log a "Game Over" message to the console.
- Create an enemy entity.
- The enemy should have a health component.
- The enemy should have a position component.
- The enemy should have a score value of 5 points when destroyed.
- The enemy should have a damage value of 10 points for whenever it collides with the player.
- When an enemy collides with the player, reduce the player's health by the enemy's damage value and log the new health to the console.
- When an enemy collides with the player, reset their position.
- When the player casts a spell and hits an enemy, reduce the enemy's health by 20 points and log the new health to the console.
- If the enemy's health reaches 0, destroy the enemy, increase the player's score by the enemy's score value, and log the new score to the console.
- Spawn a new enemy at a random position within the room every 10 seconds.
- The enemy should move towards the player at a slow speed.
- If the enemy collides with the player, it should stop moving for 2 seconds before resuming its movement towards the player.
- Create a crate entity.
- The crate should have a position component.
- The crate should have a score value of 2 points when destroyed.
- When the player collides with a crate, destroy the crate, increase the player's score by the crate's score value, and log the new score to the console.
- Spawn a new crate at a random position within the room every 15 seconds.
- The player should have an xp component.
- The player should start with 0 xp points.
- When the player destroys an enemy, increase the player's xp by 10 points and log the new xp to the console.
- The player can pick up 2 items from crates. One is a health potion that restores 20 health points, and the other is an xp potion that grants 15 xp points. They can be used by pressing the 1 and 2 keys, respectively.
- When the player reaches 100 xp points, increase the player's level by 1, reset the player's xp to 0, and log a "Level Up" message to the console.
- When the player levels up, increase the player's health by 20 points and log the new health to the console.
- When the player levels up, increase the player's score by 50 points and log the new score to the console.
- When the player levels up, increase the player's spell damage by 5 points and log the new spell damage to the console.
- When the player levels up, increase the player's movement speed by 0.5 points and log the new movement speed to the console.
- When the player levels up, increase the player's spell cooldown reduction by 0.05 seconds and log the new spell cooldown to the console.
- Create an item entity.
- The item should have a position component.
- The item should have a type component (health potion or xp potion).
- The item should have a value component (20 for health potion, 15 for xp potion).
- A player can interact with an item by pressing the E key when they are within a certain distance of the item.
- When the player interacts with an item, put it in their inventory, increase its quantity if it exists already, and log a message to the console indicating the item was picked up and the new quantity.
- When the player uses a health potion, increase the player's health by the item's value and log the new health to the console. Remove one health potion from the inventory.
- When the player uses an xp potion, increase the player's xp by the item's value and log the new xp to the console. Remove one xp potion from the inventory.
- If the player's health exceeds 100 points, set it to 100 points and log the new health to the console.
- If the player's xp exceeds 100 points, set it to 0 points, increase the player's level by 1, and log a "Level Up" message to the console.
- Then we'll create a simple UI to display the player's health and score.
- The UI should update in real-time as the player's health, xp, and score change.
- When the player's health reaches 0, display a "Game Over" message on the screen for a brief period before filling the players health back over time.
- When the player destroys an enemy or crate, display a brief message on the screen indicating the points earned.
- When the player picks up an item, display a brief message on the screen indicating the item picked up.
- When the player casts a spell, display a brief message on the screen indicating the spell cast.
- When the player clicks the play button, display a brief message on the screen indicating the game has started.
- When the player pauses the game, display a "Game Paused" message on the screen.
- When the player resumes the game, remove the "Game Paused" message from the screen.
- When the player exits the game, display a "Game Exited" message on the screen.
- When the player restarts the game, display a "Game Restarted" message on the screen.
- When the player saves the game, display a "Game Saved" message on the screen.
- When the player loads a saved game, display a "Game Loaded" message on the screen.
- When the player picks up an item, update the inventory UI to show the new item.
- When the player casts a spell, update the spell-casting UI to show the spell being cast.
- When the player destroys an enemy or crate, update the score UI to show the new score.
- When the player takes damage, update the health UI to show the new health.
- When the player reaches a new level, display a "Level Up" message on the screen.
- When the player reaches a new level, update the level UI to show the new level.
- When the player kills an enemy, display a "Enemy Defeated" message on the screen and update their score and xp.