Commit Graph

21 Commits (8529a2c934ff1543621418a8d0cd54bea0123462)

Author SHA1 Message Date
En Yi 8529a2c934 Use unsigned int for rres Id as per the struct 2023-11-11 13:04:24 +08:00
En Yi ffc890240b Remove asset argument from entity creation 2023-11-11 12:18:45 +08:00
En Yi 359ac0a0ae Implement air meter
Changelog:
- Add air timer component
- Update movement component to keep track of x direction
    - This indicate the facing direction
- Implement air timer update system
- Add air timer component to player
- Render player's air timer
2023-09-27 22:08:16 +08:00
En Yi 5cfa0c0fc0 Add id check for each chunk load 2023-09-02 14:34:24 +08:00
En Yi 20d5bd4ac7 Integrate loading RRES data pack
Changelog:
- Add in rres
    - Split rres header only into two files. Easier to deal with. Sorry
      Raysan...
- Add function to load assets from rres chunk
- Add function to load player sprite info from rres chunk
- Test loading rres in scene test
2023-09-01 20:50:45 +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 62ecd3c0fa Create simple dead player respawn system
Changelog:
- Add player dead sprite
- Add function to create dead player entity
    - It is easier to create a new entity than to transform an existing
      one
- Update existing respawn system
2023-08-16 23:45:34 +08:00
En Yi f81029b482 Add shape factor to control upthrust and friction 2023-07-25 20:39:42 +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 542c7cf57c Add crouch sprite transition 2023-05-27 16:39:17 +08:00
En Yi 937f63b0ca Add pause feature on sprite animation
Ladder animation now pauses on no movement
2023-05-24 21:54:59 +08:00
En Yi c0aa37886f Add Player Ladder, Crouch, and Swim transitions 2023-05-24 21:34:50 +08:00
En Yi 9c2e21f4d2 Add jumping and falling player sprites 2023-05-23 21:42:01 +08:00
En Yi b1a6430eb7 Add horizontal flip to sprites 2023-05-23 21:33:05 +08:00
En Yi 237bee41a9 Add simple player transition logic Stand<->Run 2023-05-23 21:17:36 +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 b0e1d33ad6 Implement player sprite info loading from file 2023-05-22 20:33:48 +08:00
En Yi 98450d0bba Rework Entity Sprite Component & Add Tile Sprite
Changelog:
- Add tile sprites as part of Level Data
- Render tile sprite if loaded in
- CSprite now stores array of sprite rendering info
    - use current idx to keep track
2023-05-20 18:23:26 +08:00
En Yi 3580209f71 Refactor out implementation of Player Entity 2023-05-16 21:55:59 +08:00