Commit Graph

129 Commits (21e37a328e10788506be4ead3f70921db7c61d5d)

Author SHA1 Message Date
En Yi 41e4b34869 Allow changing sound pitch 2024-05-01 17:08:29 +08:00
En Yi 1094e13c0a Fix some emitter positioning 2024-05-01 12:38:53 +08:00
En Yi 42c4572066 Rework sprite render system
Internal Changelog:
- Add more fields
    - Elapsed is now in sprite component
    - Add rotation fields
- Tweak early exit checks in render functions
2024-05-01 11:55:34 +08:00
En Yi 6bcccf7412 Fix regression in water air timer 2024-04-24 21:30:34 +08:00
En Yi c76ceba9bf Add delta time into particle system updates
Only update the callbacks to use it
2024-04-24 21:06:57 +08:00
En Yi 0a3f56f730 Fix out-of-bound access in water check function 2024-04-24 20:58:54 +08:00
En Yi 0a6e7b4ddc Add delta time handling
Internal Changelog:
- Major change: all engine that does counting uses delta time instead of
  frame counting
- Animation runs at 24 FPS
- Water fill is at a constant rate as well
- Particle update will need to be given delta time as well.
- Particle system is not updated to use float, so no delta time handling
  for the system in this commit
2024-04-23 22:44:52 +08:00
En Yi 6f3f391d8a Rework the offset collision checking
Change the function to check for collision at the specified point.
This is much straightforward to use.
The offset point to check must be computed before passing into the
function.
2024-04-22 22:42:32 +08:00
En Yi fec9ac268d Adjust simple collision function signatures
Remove redundant position argument for the straightforward collision
functions, as the entity would have it alread.

The collision offset check function is not as trivial and requires
some review
2024-04-22 22:31:58 +08:00
En Yi a2c061c5e8 Place position field into Entity
Position is so commonly used that placing it into Entity from the
CTransform components reduces the reference to CTransform.

Void Particle proved that it made development much easier.
2024-04-22 22:15:21 +08:00
En Yi 402d6f658e Attempt to tune up boulder sliding behaviour 2023-11-24 21:45:48 +08:00
En Yi bdbf936c7c Make boulder slide into wooden platform
Internal Changelog:
- Remove speed requirment for platform destruction
- Platform check is now 1 px lower
- Allow sliding if platform is on the lower tile on the sides
2023-11-24 21:24:11 +08:00
En Yi f3d48281f5 Adjust bubbles draw position 2023-11-23 20:53:04 +08:00
En Yi d62b862ebe Make player hitbox bigger 2023-11-22 21:41:43 +08:00
En Yi 21dab8b9a8 Adjust camera base height on crate jumping 2023-11-22 21:40:50 +08:00
En Yi 72235f7522 Play box land sfc for chests as well 2023-11-22 21:13:10 +08:00
En Yi 09ee7aa4b3 Fix weird air and bubbling behaviour
Changelog:
- Air timer decays on point check instead of water state
- Bubbling is also starts with this point check
- This is so that it is consistent that bubbles == air going down
2023-11-22 20:51:29 +08:00
En Yi dbf5b30366 Add coin and bubble emitter 2023-11-22 00:12:29 +08:00
En Yi f94ecedc7d Fix aliveness check for emitter
Emitter aliveness should be checked with its finish state

Also update bubbling to re-activate an still alive handle
2023-11-20 22:47:30 +08:00
En Yi c52651ca1b Add bubbling paritcle emitter to player 2023-11-20 22:08:28 +08:00
En Yi de5da9a5f2 Increase lifetime for bomb crates 2023-11-18 20:12:39 +08:00
En Yi e1bef49d06 Fix tunneling for wooden tile
Just make the collision bbox to be tile_size.
The 'hitbox' of the tile is too thin.
2023-11-16 20:23:06 +08:00
En Yi bfab7df718 Play SFX on destroying wooden tile 2023-11-16 00:02:52 +08:00
En Yi a9939200b7 Fix ladder not one-way on destruction 2023-11-15 23:32:10 +08:00
En Yi c64ef906e0 Reposition airtimer point check 2023-11-15 21:01:02 +08:00
En Yi 315d9849a7 Use water overlap for friction update
Also relocate the water overlap update
2023-11-15 20:53:41 +08:00
En Yi 0b5f34b9f3 Modify water upthrust behaviour
Changelog:
- Upthrust now depends on water area overlap with entity
- Fix complete overlap checks
2023-11-14 22:31:28 +08:00
En Yi 72c27ed92e Add more SFX
Also, revert crate ground state behaviour
2023-11-13 14:23:31 +08:00
En Yi c78dc50f50 Fix Boulder landing playing on spawning
Done by setting its ground state to 1. For consistency, this is
done to any entity that can 'land'. So far, this has no tangible
gameplay effects.
2023-11-13 11:34:39 +08:00
En Yi 45d9e2a5f6 Use unsigned int for boulder checks 2023-11-11 12:44:57 +08:00
En Yi ffc890240b Remove asset argument from entity creation 2023-11-11 12:18:45 +08:00
En Yi 15bb9c84ae Remove unused prev_pos in box edge checking 2023-11-11 11:56:08 +08:00
En Yi 029415e19f Add particles for arrow destruction 2023-11-10 23:15:12 +08:00
En Yi 0c540d5053 Move frame counter out of sprite component
This allows individual animation
2023-11-04 20:32:29 +08:00
En Yi 97f7afc401 Add more particle effects
Changelog:
- Add a dedicated tile destroy function
    Similar reason to destroy entity
- Add more sprites for particles
2023-11-04 17:05:54 +08:00
En Yi ebecc68941 Add better support for particle system
Changelog:
- Move sprite to emitter itself to allow better reusing emitter config
- Dedicate a function for destroying entity. This is helpful for dealing
  with events that only occurs during entity destruction
2023-11-04 14:36:59 +08:00
En Yi a8b62f5aec Integrate particle system into scenes
Changelog:
- Each scene will have its own particle system to maintain
- Crate destruction now emits particles
- Draw particles during screen renders
    - May want to make this configurable
    - Should be in general scene render
2023-11-02 22:44:52 +08:00
En Yi e318c65135 Add some more sfx 2023-10-10 21:57:45 +08:00
En Yi 2b79b5e6bc implement simple sfx playback for jumping 2023-10-09 21:28:30 +08:00
En Yi 0a4c700bf6 Add camera lookahead when falling 2023-10-08 12:34:35 +08:00
En Yi ae730ce029 Finish initial camera behaviour
x follows a mass-spring-damper system
y is simple lerp. Doesnt follow player when jumping
2023-10-08 12:13:03 +08:00
En Yi b56e0e7f10 Clamp target position and revert to old behaviour
Need to figure out the y direction update. Should not be
the same way as x
2023-10-08 12:13:03 +08:00
En Yi d1d8033b77 Only apply new behaviour to x direction only 2023-10-08 12:13:03 +08:00
En Yi f8eab8acec Adjust parameters for camera 2023-10-08 12:13:03 +08:00
En Yi 835b88f1f4 Fix coyote jump issue
Changelog:
- Add check for coyote timer when jumping
- Set ladder state AFTER the jump check
2023-10-08 12:13:03 +08:00
En Yi 064341e2eb Initial implementation of camera system
Changelog:
- Implement effectively a PI controller
2023-10-08 12:13:03 +08:00
En Yi 9f3061bae3 Implement coyote time 2023-09-29 21:18:08 +08:00
En Yi c2c00cfa51 Add quake-style jump buffering 2023-09-28 21:31:52 +08:00
En Yi d4d3b317e2 Complete level data packing and loading 2023-09-28 16:10:20 +08:00
En Yi 359ac0a0ae Implement air meter
Changelog:
- Add air timer component
- Update movement component to keep track of x direction
    - This indicate the facing direction
- Implement air timer update system
- Add air timer component to player
- Render player's air timer
2023-09-27 22:08:16 +08:00