Commit Graph

32 Commits (c76ceba9bfb8fc16e993e12431f4784cb7e6cbaa)

Author SHA1 Message Date
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 70d52cca5b Tweak bomb horizontal spawn 2023-11-20 22:10:02 +08:00
En Yi 72c27ed92e Add more SFX
Also, revert crate ground state behaviour
2023-11-13 14:23:31 +08:00
En Yi c78dc50f50 Fix Boulder landing playing on spawning
Done by setting its ground state to 1. For consistency, this is
done to any entity that can 'land'. So far, this has no tangible
gameplay effects.
2023-11-13 11:34:39 +08:00
En Yi ffc890240b Remove asset argument from entity creation 2023-11-11 12:18:45 +08:00
En Yi 029415e19f Add particles for arrow destruction 2023-11-10 23:15:12 +08:00
En Yi b01edded42 Add chest sprite 2023-11-02 20:37:55 +08:00
En Yi ce8284ab39 Implement level ending
Internal Changelog:
- Activate on collected chest == all chest
- Add spawning level end entity
- Level ending in sandbox will just reset the scene
2023-09-25 22:04:13 +08:00
En Yi e8ebe0f89c Improve player collision to chests vs crates
Internal Changelog:
- Delay zeroing velocity on edge check to after hitbox update
- Update player velocity on hitting a crate explicitly
    - This is due to the zeroing velocity changes above
    - This essentially allow 'phasing' through chest but not wooden
      crates
- Render crates using material instead of fragile flag
2023-09-23 00:28:03 +08:00
En Yi e1a0c6e4e0 Implement Chest Entity
Internal Changelog:
- chest entity: Basically crates, but high def, and fragile
- Add new spawn type for chest
- Add atk modifier for player->chest
- Make crate non-fragile
- Ignore chest for collision check and move with player
2023-09-21 21:48:32 +08:00
En Yi 3a4671cecc Add hurtbox to player
Changelog:
- Update player bbox update
- Update hitbox update system to account for player
- Reduce explosion size to allow better chaining behaviour
- Reduce lifetime of destroyed crates
2023-08-17 22:19:01 +08:00
En Yi 8c889690e8 Add null checks when creating new entity
Also, fix player spawn to reuse the player
2023-08-17 21:51:11 +08:00
En Yi 86a29ccba8 Add sprite info for explosion 2023-08-16 21:41:50 +08:00
En Yi e7c6f9929b Add sprite info for all crates 2023-08-15 21:08:46 +08:00
En Yi b980f16def Add sprite info for arrows and bombs 2023-08-15 20:43:04 +08:00
En Yi 62703c0317 Add arrow sprite 2023-08-13 15:02:20 +08:00
En Yi 7929178411 Add sprite loading from empty crates
Also adjust the gravity delay, bomb timing + size to allow
vertical chain explosion
2023-08-08 23:55:46 +08:00
En Yi f81029b482 Add shape factor to control upthrust and friction 2023-07-25 20:39:42 +08:00
En Yi 966432867f Add delay in crate destruction
Changelog:
- Add Lifetimer and remove hurtbox on hit
    - Still insta-remove on player hit
- Fix adding a component to an entity that already has that component
- Reorder lifetimer update system
2023-07-03 22:18:35 +08:00
En Yi ab582e723c Implement bomb's explosion 2023-07-02 21:52:19 +08:00
En Yi a4900a001b Add bomb crates
Changelog:
- Crates can spawn bombs
- bombs does nothing now
2023-07-02 20:37:16 +08:00
En Yi 7dcff39864 Add direction to arrow spawning 2023-06-28 22:50:09 +08:00
En Yi b578dd95f7 Add arrow spawning from crates
Changelog:
- Add function spawn arrow
- Update game system to handle null components
    - enough for the arrow to work
- Render arrow, sort of
- Initial implementation, definitely need more work
2023-06-27 22:11:14 +08:00
En Yi b70dcc1e98 Add activeness to ctransform
Changelog:
- Activeness determines whether to start moving or not
- Tile collision will skip inactive objects
- Crates are inactive on spawn
2023-06-26 20:42:32 +08:00
En Yi 63930fbe7d Update hitbox-hurtbox system
Changelog:
- Use atk and def values to determine whether a hitbox destroys a
  hurtbox
2023-06-17 13:08:07 +08:00
En Yi 371e6fcbdf Add delay to global external forces for entities
Changelog:
- Apply delay to crates and boulder
2023-06-14 21:00:14 +08:00
En Yi aae8811cc1 Add movement to boulder for grid movement 2023-06-05 15:11:06 +08:00
En Yi 62dc51d45e Implement simple systems for pushing boulder 2023-05-30 21:32:04 +08:00
En Yi 29c9b4eec7 Add boulder entity and moveable component 2023-05-29 21:36:06 +08:00
En Yi bc7f9ef777 Add manager field to an entity
Since an entity is essentially tied to a manager, put it as a field in
Entity. This means no need to pass entity manager when getting a
component, which is more intuitive.
2023-05-23 21:00:23 +08:00
En Yi e9d9ffff20 Refactor implementation of Crate Entity 2023-05-16 22:14:54 +08:00