En Yi
9b6c364269
Add mouse support for scroll area
...
Internal Changelog:
- Refactor scroll area refocus function
- This only triggers when selection is made
- Add mouse function process in test scene
- Add action for mouse selection
2024-07-08 19:16:10 +08:00
En Yi
eff3d090df
Add proper level selection actions
...
Internal Changelog:
- Scroll area will auto scroll to make selection completely visible
2024-07-08 18:42:29 +08:00
En Yi
41f3656ba1
Integrate Level Selection scene transition
...
Internal Changelog:
- Changing scene now return the scene to change into
- Set the level pack and selected level
2024-07-08 18:18:48 +08:00
En Yi
98b957a8ff
Encapsulate scroll area as UI component
2024-07-08 18:02:56 +08:00
En Yi
6dd185b6cd
Integrate scroll bar to level select
2024-07-08 12:40:27 +08:00
En Yi
33de816841
Replace hardcoded scene values to enum
2024-07-07 16:48:55 +08:00
En Yi
0c461d3167
Integrate level select screen to main
...
Not complete tho
2024-07-07 15:45:17 +08:00
En Yi
893fc1c73f
Add level select scene
...
Just a render texture with simple scroll
2024-07-02 21:54:54 +08:00
En Yi
b158bee1e8
Remove unused ActionResult
...
There is only one focused scene at a time as part of the design
limitation. Thus, it is no longer needed
2024-07-01 20:48:48 +08:00
En Yi
c5a30bee6d
Use scene idx instead of pointer
2024-06-29 13:26:48 +08:00
En Yi
0653cbd0a2
Continue plan data struct for scene management
2024-06-20 21:41:14 +08:00
En Yi
5a0c02b81a
Fix out-of-bound tile check due to uint
2024-05-14 23:22:26 +08:00
En Yi
394825173d
Fix inequality check for one way tile
...
Refactor the check as well
2024-05-14 23:22:03 +08:00
En Yi
ededdb488b
Fix off-by-one error in one-way tile check
2024-05-13 21:51:52 +08:00
En Yi
8765500606
Add button to toggle solid tilemap
2024-05-11 15:53:39 +08:00
En Yi
7b4af0b513
Add tilemap rendering from sprite
...
Internal Changelog:
- Add a mapping from connectivity to tile to render
- Add new field for static tilemap sprite
2024-05-09 21:07:15 +08:00
En Yi
d7113d42fe
Add neighbour solid counts
...
This is preparing for the tile sprites rework
2024-05-06 22:04:53 +08:00
En Yi
501a599336
Allow multi-rows sprites framing
...
Internal Changelog:
- Add a new field to store frames per row for a sprite
- Update sprite drawing function to bound check
- Update assets loader to look for the new field
- Refactor adding a sprite function to reduce repetition
- Update all main programs
2024-05-06 21:18:03 +08:00
En Yi
0f09a7b2bd
Remove obsolete render function field
2024-05-04 20:40:15 +08:00
En Yi
251360ca3e
Fix instructions not rendering correctly
2024-05-04 19:29:43 +08:00
En Yi
21e37a328e
Update editor rendering to use texture dimensions
2024-05-04 19:25:47 +08:00
En Yi
bef2ee2813
Expose initial window size to scene
...
This is so that each scene does not need to hardcode render layer size
2024-05-04 18:28:53 +08:00
En Yi
75d019aa34
Rework rendering to allow multi-layer render
...
Internal Changelog:
- A scene now has a maximum amount of render texture. It is to be
rendered in order of the array by the engine.
- A scene now needs an explicit render system to draw onto the render
textures. The scene will also init the number of render layers
needed.
- The change is to allow more separate of concerns when it comes to
rendering. A scene can also now compartmentalise the rendered items,
which hopefully make understanding the code easier.
- Update all exisiting code to use the new render system.
2024-05-04 17:57:07 +08:00
En Yi
0d4089d9ce
Tweak scene render function
...
Delegate BeginDrawing and EndDrawing to individual scenes
2024-05-01 19:56:10 +08:00
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
2bda67e917
Make player box a little smaller
2024-05-01 11:56:07 +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
754d380221
Integrate mouse action into input process
2024-04-25 21:46:53 +08:00
En Yi
0fb1fe27de
Display time scaling in sandbox
2024-04-24 22:15:52 +08:00
En Yi
204329d2aa
Use float for timing in particle system
...
Also, update the assets_loader due to this
2024-04-24 21:47:58 +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
09da7e8700
Add sprite to tile and entity spawn in editor
2023-11-23 22:26:44 +08:00
En Yi
8a39f85c45
Change key to toggle grid
2023-11-23 21:53:36 +08:00
En Yi
f3d48281f5
Adjust bubbles draw position
2023-11-23 20:53:04 +08:00
En Yi
d5c6d05558
Add action to set spawn point
2023-11-23 20:52:51 +08:00
En Yi
05e58677a5
Add angle and rotation range for particle system
2023-11-22 23:18:08 +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
9a9f77c7b2
Fix issue with web build
...
Changelog:
- Update SFX
- Draw air meter
2023-11-22 00:13:05 +08:00
En Yi
dbf5b30366
Add coin and bubble emitter
2023-11-22 00:12:29 +08:00
En Yi
799941ed80
Draw particles before water
2023-11-21 21:01:47 +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
911663b51f
Update game scene system
2023-11-20 22:19:18 +08:00
En Yi
70d52cca5b
Tweak bomb horizontal spawn
2023-11-20 22:10:02 +08:00
En Yi
c52651ca1b
Add bubbling paritcle emitter to player
2023-11-20 22:08:28 +08:00
En Yi
b18e072d51
Print free emitters in editor scene
2023-11-20 22:08:05 +08:00
En Yi
73ea7edd07
Update emitter asset loading
2023-11-20 22:07:45 +08:00
En Yi
8ae999ccc8
Tweak water rendering
...
make water rendering in front of all entities
2023-11-18 20:13:02 +08:00
En Yi
de5da9a5f2
Increase lifetime for bomb crates
2023-11-18 20:12:39 +08:00
En Yi
cb67dcf81f
Fix incorrect parsing of emitter config
2023-11-18 20:02:00 +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
85e731392a
Remove drawing of moveable grid
2023-11-15 23:35:38 +08:00
En Yi
a9939200b7
Fix ladder not one-way on destruction
2023-11-15 23:32:10 +08:00
En Yi
7dd4c8413b
Add action to toggle grid for sandbox
2023-11-15 23:30:13 +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
8529a2c934
Use unsigned int for rres Id as per the struct
2023-11-11 13:04:24 +08:00
En Yi
816608029a
Fix more sign int usage
2023-11-11 12:48:28 +08:00
En Yi
45d9e2a5f6
Use unsigned int for boulder checks
2023-11-11 12:44:57 +08:00
En Yi
d947d95247
Fix signed int comparison
2023-11-11 12:44:37 +08:00
En Yi
97714eccf6
Use unsigned int for UI component count
2023-11-11 12:30:42 +08:00
En Yi
ffc890240b
Remove asset argument from entity creation
2023-11-11 12:18:45 +08:00
En Yi
2968172921
Use signed int for water runners
2023-11-11 12:06:19 +08:00
En Yi
15bb9c84ae
Remove unused prev_pos in box edge checking
2023-11-11 11:56:08 +08:00
En Yi
b150b3ad38
Change to manual init for entity tag map
...
The entity tag mapping is not that used often enough.
So, change it to manual init.
2023-11-11 11:14:22 +08:00
En Yi
029415e19f
Add particles for arrow destruction
2023-11-10 23:15:12 +08:00
En Yi
b17c521dfd
Add emitter loading from RRES
2023-11-07 21:58:20 +08:00
En Yi
d9b69aa09d
Draw air meter in main game scene
2023-11-07 21:53:42 +08:00
En Yi
d660b4e5a5
Add sound loading from rres file
...
Also, fixes mistake in raw data size when loading from RRES file
2023-11-07 21:49:15 +08:00
En Yi
26cc567b7f
Add emitter config to asset file loading
2023-11-06 21:36:23 +08:00
En Yi
e39e549cd0
Add sound in asset info
2023-11-06 20:49:30 +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
ad421d724a
Add sprite rotation
2023-11-02 21:18:47 +08:00
En Yi
b01edded42
Add chest sprite
2023-11-02 20:37:55 +08:00
En Yi
290dafdf86
Rework scene rendering function
...
Split off- and on-screen rendering. Off-screen rendering would be a
system now
2023-10-21 10:48:21 +08:00
En Yi
b7a6c11b77
Improve scene drawing
...
Changelog:
- Add entity draw culling
- Tweak culling range
- Remove unnecessary draws for game scene, those are debug anyways
- Reorder draw in game scene for entity
2023-10-18 21:44:23 +08:00
En Yi
7dc66945da
Add in engine configuration
...
All engine constants now sits in a single header file for easy tweaking
Also, SFX list fields is now an array rather than a pointer instead.
2023-10-13 21:55:30 +08:00
En Yi
b9b0c11524
Separate out engine from scenes
...
This creates stronger separation the engine stuff from game
implementations.
way overdue tbh
2023-10-13 21:26:42 +08:00
En Yi
b3de60b4bc
Merge EC into engine directly
...
There is not much gained separating EC from engine. Merge it.
sc is still separated though.
2023-10-13 21:21:22 +08:00
En Yi
92555708d7
Put more boilerplate inits into engine init
2023-10-13 21:08:48 +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
de29201a41
Fix uninitialised overlap value
2023-10-08 12:07:04 +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
5398c08782
Integrate air timer in game scene
2023-09-28 20:47:10 +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
En Yi
26fa9af6b8
Allow null input for overlap for AABB check
2023-09-25 22:08:31 +08:00
En Yi
ce8284ab39
Implement level ending
...
Internal Changelog:
- Activate on collected chest == all chest
- Add spawning level end entity
- Level ending in sandbox will just reset the scene
2023-09-25 22:04:13 +08:00
En Yi
d54fee8935
Fix main game collision issue
...
Changelog:
- Add the refactored system to main game
- Reset coin counter to zero on (re-)start
2023-09-23 14:16:57 +08:00
En Yi
e6784a4d71
Fix crates hitbox collision with player
2023-09-23 13:39:18 +08:00
En Yi
e8ebe0f89c
Improve player collision to chests vs crates
...
Internal Changelog:
- Delay zeroing velocity on edge check to after hitbox update
- Update player velocity on hitting a crate explicitly
- This is due to the zeroing velocity changes above
- This essentially allow 'phasing' through chest but not wooden
crates
- Render crates using material instead of fragile flag
2023-09-23 00:28:03 +08:00
En Yi
a8e0d99870
Implement collecting chests
...
Internal Changelog:
- Set chest limit to 65535
- Handle (de-)spawning chest on coin counter
- Add coin increment to chest collision with player
2023-09-21 22:08:02 +08:00
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
51618cadc6
Reset ZSTD context before starting
2023-09-02 19:54:17 +08:00
En Yi
789d1b2577
Fix incorrect check for invalid assets
2023-09-02 19:51:36 +08:00
En Yi
5cfa0c0fc0
Add id check for each chunk load
2023-09-02 14:34:24 +08:00
En Yi
20d5bd4ac7
Integrate loading RRES data pack
...
Changelog:
- Add in rres
- Split rres header only into two files. Easier to deal with. Sorry
Raysan...
- Add function to load assets from rres chunk
- Add function to load player sprite info from rres chunk
- Test loading rres in scene test
2023-09-01 20:50:45 +08:00
En Yi
044a5831ff
Integrate ZSTD decompression to load level
2023-08-26 22:17:53 +08:00
En Yi
62de96609b
Fix (hopefully) one way collision
2023-08-20 16:40:51 +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
7dcc142a2d
Correct CMakeLists for web build
2023-08-19 20:33:07 +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
963ba34164
Make water runner travel faster
...
Changelog:
- introduce travel speed: how many move can the water runner make
- normal movement cost : 2
- water movement cost : 1
2023-08-19 13:03:13 +08:00
En Yi
d2a19c5405
Refactor out engine init, deinit, and key handling
...
To avoid repeated code
2023-08-19 12:20:16 +08:00
En Yi
b30646103d
Remove velocity check in moveable system
...
It's funner that way
2023-08-18 23:26:47 +08:00
En Yi
42e5caf695
Implement quit function in main menu
...
Will need to revise this in the future
2023-08-18 23:10:48 +08:00
En Yi
209f09e307
Add WASD control for sandbox scene
2023-08-18 00:29:02 +08:00
En Yi
4d12a02f91
Tweak player's movement
...
Changelog:
- Increase ground friction generally.
- Reduce friction when the player is moving on the ground. To compensate,
reduce player acceleration as well. Now, the player stops faster
without losing too much max speed.
2023-08-17 23:20:52 +08:00
En Yi
3a4671cecc
Add hurtbox to player
...
Changelog:
- Update player bbox update
- Update hitbox update system to account for player
- Reduce explosion size to allow better chaining behaviour
- Reduce lifetime of destroyed crates
2023-08-17 22:19:01 +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
93e3b24e40
Fix transition out of water collision check
2023-08-17 21:24:52 +08:00
En Yi
939fe7bc4e
Allow boulder pushing when swimming
2023-08-17 21:10: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