Commit Graph

49 Commits (d3029316b74ff7af87e55ef61b0eeb2c40c14dcb)

Author SHA1 Message Date
En Yi d3029316b7 Add spikes sprite support
Add tile rotation. This is kind of a temp solution, since any sprite
could use rotation. So, may need to extend this for general sprite
2023-08-16 21:21:55 +08:00
En Yi bba12b9b39 Add Sandbox button in main program
Changelog:
- First button now loads the levelpack
2023-08-14 21:54:25 +08:00
En Yi e670af2519 Fix camera for levels smaller that viewport 2023-08-14 21:22:03 +08:00
En Yi 8e9efc622d Refactor out level tilemap initialisation
- Rename sandbox scene initialisation, which is just a convenience
  function
- Also refactor out tilemap related functions to a new file
2023-08-14 13:51:20 +08:00
En Yi 5dbe2cc4d0 Add struct for loading in a level pack 2023-08-13 15:02:20 +08:00
En Yi c6b1e4e4b7 Add function to restart editor level 2023-07-29 17:47:18 +08:00
En Yi 0c52718695 Update water flow rendering logic 2023-07-26 23:16:50 +08:00
En Yi f81029b482 Add shape factor to control upthrust and friction 2023-07-25 20:39:42 +08:00
En Yi f6c5fa10fd Add simple water flowing visual 2023-07-24 23:59:19 +08:00
En Yi 478dea2d9c Add air pocket tile
Air pockets are just tiles with a max water level lower than the
absolute maximum

Also, make air pockets not reachable by water runners
2023-07-24 22:15:13 +08:00
En Yi 7d00d348f6 Put max water level into each tile
This is to create air pockets
2023-07-24 21:58:50 +08:00
En Yi ec8f8b6a36 Integrate water runner into main scene 2023-07-24 21:46:53 +08:00
En Yi 0a76826c27 Modify player collision with water blocks
Collision now handles different water level
2023-07-24 21:19:16 +08:00
En Yi 4a09550c0b Update main scene to do multiple water levels
Note: Player collisions not updated yet
2023-07-24 19:44:39 +08:00
En Yi aae61edda9 Refactor out broad phase grid collision functions 2023-07-17 21:14:02 +08:00
En Yi 4414747c79 Improve auto-crouch detection
Changelog:
- Move tilemap update to be at the start
    - This is to account for new entities being created
    - The post tile collision is not used for now
- Change auto-crouch collision check to check for entities as well
2023-07-03 22:57:13 +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 fe2bcdf8cd Add metal crate toggling
Changelog:
- Remove spawn option for metal crate
- Use M to toggle metal crate, applicable for arrow crates
2023-06-28 22:58:51 +08:00
En Yi 7dcff39864 Add direction to arrow spawning 2023-06-28 22:50:09 +08:00
En Yi e74f523b7f Handle arrow collision with tilemap
Changelog:
- Refactor function to change a tile type
- Destroy entities without bbox when OOB
- Add hitbox collision checking with tiles
- Add defense point on tiles
2023-06-28 22:19:20 +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 9859854baa Add spawn entity selection via mouse
Changelog:
- Add row below game scene to select spawning entity
- Add mouse release logic to select spawning entity
- Update render order for tile
    - order: 'moveable' -> tile -> water level
2023-06-26 22:57:59 +08:00
En Yi f206d3c981 Update entity spawn + despawn function
Changelog:
- Check for mouse in game pos before mouse click check
- Right click will also remove entities now! Hooray!
2023-06-26 21:27:22 +08:00
En Yi dab8303cbe Update tile spawning
Changelog:
- Right click now removes tiles
- Water has its own spawn selection
2023-06-26 21:08:44 +08:00
En Yi bb6da04e74 Change rendering for not 'moveable' tile 2023-06-26 20:19:38 +08:00
En Yi b5790ef00b Update spike orientation logic
Changelog:
- Remove redundant checks
- Add downwards tile check first
- Fix incorrect rightward tile check
2023-06-23 22:17:59 +08:00
En Yi c7ef3f473f Add spike destruction
Changelog:
- Spike collision is now checked against all bboxes
    - Non player will destroy it
- Add moveable flag for each tile to determine whether a boulder can
  move into it
2023-06-22 23:14:07 +08:00
En Yi 5267c318f2 Give display name when selecting entity to spawn 2023-06-21 23:40:08 +08:00
En Yi 2b878ae784 Add player collision with spikes 2023-06-21 22:32:14 +08:00
En Yi c8d2ee5408 Improve crushing using edge testing
Changelog:
- Add len reduction to edge checking to give leeway in crushing
2023-06-21 21:27:13 +08:00
En Yi c27fa632a2 Add spikes spawning
Changelog:
- Add new tile: spikes
- Change bbox of tile of spikes depending on solid tiles position
2023-06-19 22:32:18 +08:00
En Yi 81da536e8e Add bounding box info in tiles
Changelog:
- Use more memory, but should help out in implementing spikes
2023-06-19 21:08:42 +08:00
En Yi fc2001e428 Add system to destroy one-way tile with boulder 2023-06-17 11:50:23 +08:00
En Yi d39461cff1 Do two-pass for grid update 2023-06-16 16:26:20 +08:00
En Yi a1101cd951 Add player respawn system 2023-06-14 20:36:50 +08:00
En Yi dbf80508ec Integrate in player crushing system 2023-06-05 20:09:22 +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 8bc14b17b1 Add boulder-boulder interaction when landing
Changelog:
- Add previous velocity in ctransform component
- Add functions to check if a boulder can move left or right when
  landing on a boulder
- Adjust system execution order
2023-06-04 23:51:02 +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 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 b1a6430eb7 Add horizontal flip to sprites 2023-05-23 21:33:05 +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 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 e9d9ffff20 Refactor implementation of Crate Entity 2023-05-16 22:14:54 +08:00
En Yi 3580209f71 Refactor out implementation of Player Entity 2023-05-16 21:55:59 +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