docs: how will the game look like
This commit is contained in:
@@ -46,3 +46,49 @@ The gameplay loop is simple and repetitive:
|
|||||||
`Play` → `Collect` → `Grow` → `Avoid` → `Fail` → `Restart`
|
`Play` → `Collect` → `Grow` → `Avoid` → `Fail` → `Restart`
|
||||||
|
|
||||||
The simplicity of the mechanics allows for immediate understanding, while increasing difficulty creates tension and replayability.
|
The simplicity of the mechanics allows for immediate understanding, while increasing difficulty creates tension and replayability.
|
||||||
|
|
||||||
|
## How will the game look like?
|
||||||
|
|
||||||
|
```
|
||||||
|
What are the game elements (e.g. characters, world, interface) and how will they be implemented in code (e.g., modules, classes, objects, functions)? Feel free to use diagrams, flow-charts or any other visual representation to show your plan.
|
||||||
|
```
|
||||||
|
|
||||||
|
The game will feature a dark 3D environment with glowing spheres as the main visual elements, creating a clean and immersive experience.
|
||||||
|
|
||||||
|
<img src="environment.png" style="max-height: 300px;">
|
||||||
|
|
||||||
|
### Game Elements
|
||||||
|
|
||||||
|
- **Player**: glowing sphere with trailing body segments
|
||||||
|
- **Orbs**: collectible glowing spheres
|
||||||
|
- **Obstacles**: larger objects that cause collision
|
||||||
|
- **World**: bounded arena on a flat plane
|
||||||
|
- **UI**: score, best score, start and game over screens
|
||||||
|
|
||||||
|
### Code Structure
|
||||||
|
|
||||||
|
The game will be organized into simple modules:
|
||||||
|
|
||||||
|
`main.js`
|
||||||
|
├── `GameManager`
|
||||||
|
├── `Player`
|
||||||
|
├── `Orb`
|
||||||
|
├── `Obstacle`
|
||||||
|
└── `UI`
|
||||||
|
|
||||||
|
- **Player**: movement, growth, collision
|
||||||
|
- **Orb**: spawning and collection
|
||||||
|
- **Obstacle**: collision handling
|
||||||
|
- **GameManager**: game state, score, restart
|
||||||
|
- **UI**: display elements
|
||||||
|
|
||||||
|
### Gameplay Flow
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Technical Approach
|
||||||
|
|
||||||
|
- Built using **Three.js** for 3D rendering
|
||||||
|
- Movement constrained to a plane for simplicity
|
||||||
|
- Objects managed using classes and arrays
|
||||||
|
- Collision detection using distance checks
|
||||||
|
|||||||
BIN
environment.png
Normal file
BIN
environment.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1002 KiB |
Reference in New Issue
Block a user