Fortress Level Blog
A blog about the Fortress level of the Castle game.
graph TD
A[Player] -->|Space/I| B[Interceptor]
A -->|2 Key| C[SpecialScythe]
A -->|3 Key| D[UltraScythe]
A -->|4 Key| E[SuperScythe]
C -->|Collision| D
D -->|Collision| E
B -->|75% Accuracy| F[Destroy Regular Scythes]
C -->|Bounce| G[Screen Edges]
D -->|Auto-Destroy| H[Regular & Special Scythes]
E -->|Auto-Destroy| I[All Scythe Types]
style A fill:#4CAF50
style E fill:#FFD700
style D fill:#FF00FF
style C fill:#00BCD4
style B fill:#00FF00
Key Features
- OOP (Nested Inheritance)
- The Scythe class inherits from the Enemy class, which inherits from the charecter class, and so on…
- Custom Collision Detection
- The scythe detects collisions with the NPC and the player
- Iterables & Data Structures
- Arrays of sprites (the scythes)
- Objects (sprite data)
- Game Loop (See mermaid diagram)
- Handles movement, drawing, and collision detection every frame
- Event Handling
- Player can move, interact, etc.
- Keyboard input for player movement and interaction
- Conditionals, Loops, other simple programming concepts
- Level integration, custom game classes, etc.
File Structure
All code is in /assets/js/castleGame.
/assets/js/castleGame/GameLevelFortress> main file/assets/js/castleGame/castleFortress.md> Markdown file to view the game/assets/js/castleGame/custom/EndScreen.js> Displays an end screen upon winning/assets/js/castleGame/custom/Scythe.js> A special kind ofEnemythat can attack
Challenge
Fortress Game
Lines: 1
Characters: 0
Game Status:
Not Started