---
# System prepended metadata

title: Engine details

---

Tmc overview

# Engine details
- Entity
    - Every active entity has a single entry point which is called (every frame?)
    - Most entities will use a function pointer array and implement an init/update/destroy state machine
    - Two? Collision layers
    - z (depth) axis
    - Physics handled manually by each entity through calling physics update functions
    - Entities may use their speed and z velocity fields
    - Sprite updates handled manually
- Scripting system
    - variable arithmetic, conditional jumps, function calling
- Audio handled by m4a
- handwritten asm used for data manipulation and time critical operations
    - Some are written in arm and ran from IWRAM
    - Used to change tilemap, sprites, etc
- Palette, OAM handled dynamically
- Sprites are packed for optimal storage in ROM, must be assembled during runtime
- Flags, messages stored in banks

# Tasks
### Title
### File select
### Gameplay
- Room init
- Room change
- Update
- Area change
- Minish portal
- Deep wood barrel
- NULLED
- Menu
    - Fade in
    - Vblank
    - Update
        - Exit
        - Pause menu
        - Exit
        - Map hint
        - Kinstone
        - Cutscene 1?
        - Cutscene 2?
        - Figurines
        - World event (or fusion event?)
        - Fast travel
        - Area hint
    - Fade out
    - Menu "Death"
### Game over
### Credits
### Debug

# Entities
### Player
- Persists beetween rooms
- Reset between areas
### Enemy
- Gives/takes damage
- Most enemies call the same set of functions which calculate what behavior to run
### Projectile
- Damages player, spawned by enemies
### Object
- Props, not generally interactive
### Npc
- Entity player can talk to, fuse kinstones with
- Has two main update functions, one for body/head sprites
    - Third update function for fusion
### Player item
### Manager
- utility objects that serve as a proxy between gameplay and the engine
- usage examples: drawing clouds, ezlo hints, playing cutscenes
- updates indepently from other entities, does not add to maximum entity count
