Commit Graph

65 Commits (e1a0c6e4e081e2d1e0d664820b29f34f986b23dc)

Author SHA1 Message Date
En Yi e1a0c6e4e0 Implement Chest Entity
Internal Changelog:
- chest entity: Basically crates, but high def, and fragile
- Add new spawn type for chest
- Add atk modifier for player->chest
- Make crate non-fragile
- Ignore chest for collision check and move with player
2023-09-21 21:48:32 +08:00
En Yi 5cbacf8516 Change keybinds to be more convenient
Also, remove asan compile flag for web build
2023-08-20 11:47:51 +08:00
En Yi e2bce62a9d Update editor scene to be larger
also prevent last row to be modified
2023-08-19 20:33:31 +08:00
En Yi 567b7ab173 Update instruction on metal toggling 2023-08-19 19:34:36 +08:00
En Yi e26f972600 Update crate colour when toggling metal 2023-08-19 19:30:39 +08:00
En Yi cf8e2ca1be Revert some changes for sandbox drawing
Changelog:
- Remove entity culling when drawing, not good right now
- Put back number of entity in each tile
2023-08-19 19:20:02 +08:00
En Yi fae37eeecd Test out compilation for the web 2023-08-19 18:21:27 +08:00
En Yi 99c34b4107 Reduce the number of line draws 2023-08-19 17:42:50 +08:00
En Yi 731a84273a Render the selection tiles only once
This is not pretty as this does not allow double (de-)init of the
sandbox scene, but should suffice for now
2023-08-19 17:38:13 +08:00
En Yi e6683dfec1 Draw only things within the game rectangle
Testing it out on sandbox for now
2023-08-19 16:40:12 +08:00
En Yi 209f09e307 Add WASD control for sandbox scene 2023-08-18 00:29:02 +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 216a0d9f0b Fix rotation not reset on sandbox restart 2023-08-17 21:03:47 +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 cb68c6c6f4 Add toggle to activate crates on spawn 2023-08-16 22:29:17 +08:00
En Yi 27cb6b05c6 Display help text for selection in sandbox 2023-08-16 22:08:11 +08:00
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