Commit Graph

10 Commits (b5790ef00bab75b4b37890ad0aa61b3943d848fd)

Author SHA1 Message Date
En Yi bb4a9a8f3c Improve crushing response
Changelog:
- Fix incomplete line-AABB collision check
- Add line-AABB check for grid
- Change len_reduction to 0
- Set tiles to check once during edge checking
2023-06-22 22:19:39 +08:00
En Yi 451b241460 Correct AABB tests
Changelog:
- Figure out why the previous AABB behaviour was correct: continuum
    [0, 5) does not collide with [5, 10)
    For tile check however, need to subtract one to avoid extra tile
    check. Exception is the tile collision
2023-06-21 22:11:32 +08:00
En Yi 4b91ab5667 Integrate line check into edge check function
Internal Changelog:
- Weird issue when using the new AABB functions, revert the off-by-one
  fix
2023-06-21 21:13:02 +08:00
En Yi 7767b38221 Add line-AABB collision check function 2023-06-20 22:23:32 +08:00
En Yi d455cbc6b9 Add test for AABB collision functions
Internal Changelog:
- Fix some off-by-one errors
2023-06-16 15:18:03 +08:00
En Yi 57cb3ef07a Improve collision system
Changelog:
- Add handling for complete overlap
    - It will attempt to move into an empty space near the checked
      entity. If no free space, it will move up. Ripe for exploit!
- Move boundary collision check into movement update
- AABB check now returns overlap mode:
    - 0: no overlap
    - 1: partial overlap
    - 2: complete overlap
2023-06-05 21:56:57 +08:00
En Yi 99112e3a7c Add better handling for complete AABB overlap 2023-06-05 20:05:20 +08:00
En Yi 023536f7c0 Update collision system
Changelog:
- Update collision functions to omit entity_manager
    - Change tile entity set to use map 64v to store entity pointer
- For complete overlap, return the smaller magnitude
    - Still incorrect though
- Add a check for empty space before moving the entity during collision
  check
2023-06-05 17:40:56 +08:00
En Yi 20ec3f6395 Improve on the boulder pushing mechan
Changelog:
- Implement point to AABB check function
- Change moveable check to use point-AABB check
- Allow boulder pushing from standing still
2023-06-03 14:01:10 +08:00
En Yi 7b3685b792 Refactor for better separation of concern
Changelog:
- Separate out engine-specific stuff vs game-specific stuff
2023-05-16 21:09:38 +08:00