Commit Graph

14 Commits (0b342bb9be4079d84efad6bc1d7863ac975d7e54)

Author SHA1 Message Date
En Yi 0b342bb9be Implement Crates
Changelog:
- Add new component: container
- Add function to spawn a crate
- Refactor player spawning into level scene init
- Modify tile collision to work on bbox components
- Add actions to switch entity to spawn
- Update spawn system to spawn a crate
2023-01-10 21:24:50 +08:00
En Yi 85915d363c Refactor movement states
Changelog:
- Refactor ground and water state as a separate component
- Refactor upthrust and gravity calc. as a separate system targetting
  the new component
- General modification to use the new component
2023-01-09 21:00:30 +08:00
En Yi 68bb9f941c Move fields to player state component
Changelog:
- Move level scene data related to player to playerstate component
- Update system related to player state to use the playerstate
  component
2023-01-05 21:55:25 +08:00
En Yi b2a5e29ce4 Rework water, ground, and air state transition
Changelog:
- Move ground and water states into CTransform
- Update state in movement update system
- Use 2 bits to check state transition for water and ground
2023-01-03 21:16:52 +08:00
En Yi 1ba786a91e Re-add back TileComponent
Changelog:
- Remember the purpose of this component, which is to assist
  updating which tiles is containing the entity
2023-01-03 19:41:07 +08:00
En Yi f7057bd56c Implement jumps in water
Changelog:
- Map space to jumping
- Allow jumps in water but lowered speed and with cooldown
- Update out<->in water transition logic and jumps handling
  - Out->in water: if player center is in water
  - In->out water: if player bbox is not in water
- Apply upthrust conditionally in water
2022-12-29 11:21:10 +08:00
En Yi c6ed46c6e7 Refactor out bounding box handling
Changelog:
- Make bbox handling a separate system
- Simplify crouch handling
- Remove grid update system as it is not useful
  - As there is too many factors influencing the grid positioning,
    it is not useful to pre-store the grids to check, might as
    well compute it during checks
  - Remove tilecoords component
2022-12-28 10:54:06 +08:00
En Yi 64466128bc Implement water tiles and movement
Changelog:
- Adjust Gravity and movement accelaration
- Replace friction with acceleration instead of fractions of velocity
- Add upthrust in water
- Cut movement acceleration in water
2022-12-27 13:16:05 +08:00
En Yi 68586cd1d2 Add crouching to player
Changelog:
- Add player state component to keep track of crouching
- Add crouch key handling
- Crouch mechanics:
  - Reduce vertical bbox, slightly stretch horizontally
  - Offset position to be on ground
  - Reverse for un-crouching
  - Can jump out of a crouch, reverting the bbox
  - Dont allow un-crouch if there is something overhead (maybe should
    check directly overhead, instead of a full overhead?)
  - Above also apply for jump out of crouch
2022-12-21 23:40:10 +08:00
En Yi a4f4e2b170 Properly implement jump system
Changelog:
- Add Jump component
- Implement single jump and short hop
2022-12-17 15:45:41 +08:00
En Yi aa2125c8f6 Improve board-phase collision
Changelog:
- Rework tile movement update logic to be general
- Increase tilemap and player size for testing
2022-12-15 22:46:25 +08:00
En Yi 03b602de40 Implement broad-phase collision system
Changelog:
- Implement grid system
- Update screen bounce scene test
- Add grid movement update system
- Add component to track occupied grid tiles
2022-12-15 16:24:13 +08:00
En Yi b392e462b7 Implement test scene
Internal Changelog:
- Update BBox component to use Vector2
- Add new CTransform component
- Implement level scene movement system and render system
- Implement scene test procedure
2022-12-05 12:20:00 +08:00
En Yi 17aae0617c First Commit of HATPC remake
Internal Changelog:
- Implement Basic ECS
- Tag system not yet implemented
- Use SC for common data structures
2022-11-26 18:11:51 +08:00