Commit Graph

18 Commits (8fff2edae5ecd3b1d82de16cc4feb790ecd313ef)

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 c76ceba9bf Add delta time into particle system updates
Only update the callbacks to use it
2024-04-24 21:06:57 +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 05e58677a5 Add angle and rotation range for particle system 2023-11-22 23:18:08 +08:00
En Yi 841603a432 Update inital position of stream emitter 2023-11-20 20:53:22 +08:00
En Yi 8165cd41c2 Rework stream handling function
Changelog:
- Add callback function to stop the emitter
    - This is use to automatically stop the emitter when the condition
      is met
- Update particle test program
2023-11-20 20:48:41 +08:00
En Yi be75263c2c Implement stream-type particle emitter 2023-11-18 19:44:20 +08:00
En Yi cb0a93ee70 Implement feature to start and stop emitter 2023-11-18 15:48:43 +08:00
En Yi 5350c2b761 Refactor particle system for future feature
This is to support persistent emitter later on

Also, re-check the update logic
2023-11-18 12:45:57 +08:00
En Yi cdb9d22e6c 'Fix' unused params for remaining functions 2023-11-11 13:10:00 +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 43aa821c18 Refactor particle system
Changelog:
- Config should contain constants that determine the spawning of an
  emitter.
- Move user_data and update_func to emitter, since these values can
  change depending on the scene.
- Assets now load in Emitter Configs
2023-11-02 22:42:18 +08:00
En Yi ad421d724a Add sprite rotation 2023-11-02 21:18:47 +08:00
En Yi edf78412dc Improve particle system
Add support for texture and rotation
2023-11-01 22:18:40 +08:00
En Yi 7c86e0b3c5 Implement initial particle system
Changelog:
- Can only to one-shot burst emitter
- Add test for it
2023-10-21 14:37:54 +08:00
En Yi 7b2c48524d Add skeleton for particle system 2023-10-18 21:45:19 +08:00