Commit Graph

312 Commits (bf655daf8d1bdf64daa12d4f85f9888a70435904)

Author SHA1 Message Date
En Yi bf655daf8d Add mempool macros to simplify definition 2024-08-19 20:29:49 +08:00
En Yi 056b50c431 Separate out component memory pools definition
Changelog:
- Refactor the EC header files to put struct in more sensible locations:
    - Sprite and Particle Emitter + Configs are now assets, as they
      should be
    - Components type are now unsigned int, thus it is not sensitive to
      any component enums
    - Components enums are now pure index store. There are two sets of
      components: Basic for engine use, Extended for game-specific ones
- Component memory pools are now defined on outside of engine. Majority
  of the components will be game-specific, so it should be on the game
  to define the components and the mempools for all of them.
2024-08-19 18:26:08 +08:00
En Yi d2af974b29 Experiment with extern component mempool
Internal Changelog:
- Split assets from engine so that rres_packer do not need to implement
  mempools
- The idea is that mempool is incomplete and requires implementation of
  the mempool in scenes.
    - Components are usually game-specific, so this is the first step to
      decouple it from the engine.
2024-08-19 17:33:05 +08:00
En Yi e4b5695a15 Allow level end to be deleted 2024-08-19 14:24:33 +08:00
En Yi e37e89505a Experiment with timer-based transition 2024-08-19 14:24:22 +08:00
En Yi 019f39f84c Implement basic level state management
Internal Changelog:
- Remove spawn position for entity
    - Not used. If spawning is needed, use a spawning entity
- Put in state machine callback function
    - Player spawning system is part of callback function
    - Remove player spawning system
- Incorporate state transition in systems
2024-08-19 11:55:48 +08:00
En Yi f6f6d54ecf Put back the air meter
Render it on the game canvas layer
2024-08-17 20:37:20 +08:00
En Yi c20401c457 Rework free camera toggling behaviour for editor
Changelog:
- Reorder render layers
- Seperate out player related actions from others
- Add indication for free camera mode
2024-08-17 16:59:50 +08:00
En Yi acb1b7858c Add lookahead feature into main game 2024-08-17 14:59:17 +08:00
En Yi 90bbad09ae Add free-movement to camera in editor scene 2024-08-17 14:49:51 +08:00
En Yi 5d8385f9ff Refactor camera update system 2024-08-17 14:10:59 +08:00
En Yi 9fdb8296ff Add key to toggle player movement
This key will be used for looking ahead
2024-08-17 13:58:06 +08:00
En Yi e762f62f40 Decouple player dead and respawn system 2024-08-15 11:55:22 +08:00
En Yi 9410075207 Add placeholder images 2024-08-15 11:08:39 +08:00
En Yi c1207ec5b4 Properly reset a level scene 2024-08-15 11:08:20 +08:00
En Yi 13d8aafec3 Increase engine limits 2024-08-15 11:00:16 +08:00
En Yi 259fa114ca Fix water filling rate 2024-08-13 18:17:52 +08:00
En Yi c3924c862b Adjust player swimming behaviour
Internal Changelog:
- Slightly increase upthrust
- Slightly reduce air time
2024-08-13 18:17:33 +08:00
En Yi 979533092e Update main game render 2024-08-13 15:34:31 +08:00
En Yi 639aed69db Reposition level select UI 2024-08-13 15:33:38 +08:00
En Yi 0e9ba5795c Center menu screen 2024-08-13 15:33:18 +08:00
En Yi 65b04523ce Update game rendering
Internal Changelog:
- Port editor scene rendering improvements
- Make game scene ~640x480 for testing
2024-08-12 16:06:36 +08:00
En Yi 9f6c37c1fd Fix bubbling particles issue out-of-water 2024-08-11 15:50:11 +08:00
En Yi 5d1784dad8 Attempt to fix BG scrolling 2024-08-10 17:45:09 +08:00
En Yi 2c908ffd46 Update rendering for editor scene
Internal Changelog:
- Add background
- Update grid and bbox drawing
2024-08-10 17:21:10 +08:00
En Yi f20daa9cce Update main game sprite rendering 2024-08-06 21:43:40 +08:00
En Yi 4a54bfe84f Incorporate anchor point in player sprite info
Changelog:
- src anchorpoint is also an enum. The offset needs to be computed
  dynamically due to flip_x
- Re-add back the offset field.
- Add symbol parsing for anchor point.
2024-08-06 21:36:17 +08:00
En Yi 1215746e05 Add x-flipping for anchoring 2024-08-06 20:36:23 +08:00
En Yi 657110a66d Implement sprite rendering anchor 2024-08-05 21:50:01 +08:00
En Yi 2dbc1f19ab Add additional sprites for swimming 2024-08-03 17:50:08 +08:00
En Yi 8207558be7 Add title to level select scene 2024-07-08 21:08:55 +08:00
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