Commit Graph

15 Commits (d01a6772ec5f2eb08e66d7f775ec0ea3adb06403)

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 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 b5da3f216c Implement anchoring for bbox shifting
Changelog:
- Add function to calculate offset needed to maintain anchor when
  changing bbox size
- Simplify down bbox changing for player
- Some minor fix from last commit
2022-12-28 17:36:07 +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 905f0d70a6 Small optimisation for key handling
Changelog:
- Use a single queue to handle pressed keys
- Remove unused printf for key presses
2022-12-13 00:10:40 +08:00
En Yi 3e6a53b097 Fix incorrect player input processing
Changelog:
- Store player dir input in LevelScene Data instead of pointer,
  to avoid use-after-free (non-fatal as mempool is used, but can cause
  unintended behaviour)
- Only process player movement in system update. This is done in the
  movement update system
- Normalise before apply acceleration, duh
2022-12-12 20:29:51 +08:00
En Yi 3a99dafcd4 Implement key controls to scene
Changelog:
- Add double buffer to handle key presses and release
- Add more actions
- Update action mapping of level scene
- Implement action function for level scene
- Remove action queue for Scene struct. This is handled by raylib
  and the game engine
- Update scene struct with action function field
2022-12-11 14:32:26 +08:00
En Yi b05dfe6fde Improve scene testing
Internal Changelog:
- Implement scene boundary bounce system (subject to change)
- Add tilemap in preparation for collision system
- Allow early exit of scene testing
2022-12-11 10:34:06 +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 6c03078db9 Implement Scene and Level Scene
Changelog:
- Add actions and assets headers, not implemented and not used
- move original main to entManager_test
- Add proper main to create window and display nothing
- Implement scene base class and level scene
- Add a simple level scene test
- Update CMakeLists to compile main and tests
2022-12-03 13:46:24 +08:00