Commit Graph

13 Commits (921b59d2ab8bb92f0f26b705235fd87d8b114d3d)

Author SHA1 Message Date
En Yi 501a599336 Allow multi-rows sprites framing
Internal Changelog:
- Add a new field to store frames per row for a sprite
- Update sprite drawing function to bound check
- Update assets loader to look for the new field
    - Refactor adding a sprite function to reduce repetition
- Update all main programs
2024-05-06 21:18:03 +08:00
En Yi 42c4572066 Rework sprite render system
Internal Changelog:
- Add more fields
    - Elapsed is now in sprite component
    - Add rotation fields
- Tweak early exit checks in render functions
2024-05-01 11:55:34 +08:00
En Yi 0a6e7b4ddc Add delta time handling
Internal Changelog:
- Major change: all engine that does counting uses delta time instead of
  frame counting
- Animation runs at 24 FPS
- Water fill is at a constant rate as well
- Particle update will need to be given delta time as well.
- Particle system is not updated to use float, so no delta time handling
  for the system in this commit
2024-04-23 22:44:52 +08:00
En Yi a2c061c5e8 Place position field into Entity
Position is so commonly used that placing it into Entity from the
CTransform components reduces the reference to CTransform.

Void Particle proved that it made development much easier.
2024-04-22 22:15:21 +08:00
En Yi ad789329d1 Add emitter component
Also, add funciton to check if emitter handle is still alive
2023-11-20 22:06:58 +08:00
En Yi 0b5f34b9f3 Modify water upthrust behaviour
Changelog:
- Upthrust now depends on water area overlap with entity
- Fix complete overlap checks
2023-11-14 22:31:28 +08:00
En Yi 2968172921 Use signed int for water runners 2023-11-11 12:06:19 +08:00
En Yi b150b3ad38 Change to manual init for entity tag map
The entity tag mapping is not that used often enough.

So, change it to manual init.
2023-11-11 11:14:22 +08:00
En Yi 0c540d5053 Move frame counter out of sprite component
This allows individual animation
2023-11-04 20:32:29 +08:00
En Yi ebecc68941 Add better support for particle system
Changelog:
- Move sprite to emitter itself to allow better reusing emitter config
- Dedicate a function for destroying entity. This is helpful for dealing
  with events that only occurs during entity destruction
2023-11-04 14:36:59 +08:00
En Yi ad421d724a Add sprite rotation 2023-11-02 21:18:47 +08:00
En Yi 7dc66945da Add in engine configuration
All engine constants now sits in a single header file for easy tweaking
Also, SFX list fields is now an array rather than a pointer instead.
2023-10-13 21:55:30 +08:00
En Yi b9b0c11524 Separate out engine from scenes
This creates stronger separation the engine stuff from game
implementations.

way overdue tbh
2023-10-13 21:26:42 +08:00