Commit Graph

310 Commits (43aa821c184af34b0a660a53e9d151fee2fcd634)
 

Author SHA1 Message Date
En Yi 905f0d70a6 Small optimisation for key handling
Changelog:
- Use a single queue to handle pressed keys
- Remove unused printf for key presses
2022-12-13 00:10:40 +08:00
En Yi 3e6a53b097 Fix incorrect player input processing
Changelog:
- Store player dir input in LevelScene Data instead of pointer,
  to avoid use-after-free (non-fatal as mempool is used, but can cause
  unintended behaviour)
- Only process player movement in system update. This is done in the
  movement update system
- Normalise before apply acceleration, duh
2022-12-12 20:29:51 +08:00
En Yi 3a99dafcd4 Implement key controls to scene
Changelog:
- Add double buffer to handle key presses and release
- Add more actions
- Update action mapping of level scene
- Implement action function for level scene
- Remove action queue for Scene struct. This is handled by raylib
  and the game engine
- Update scene struct with action function field
2022-12-11 14:32:26 +08:00
En Yi b05dfe6fde Improve scene testing
Internal Changelog:
- Implement scene boundary bounce system (subject to change)
- Add tilemap in preparation for collision system
- Allow early exit of scene testing
2022-12-11 10:34:06 +08:00
En Yi e20b020829 Rewrite mempools to be scalable
Changelog:
- Rewrite the Mempool Struct to be generic enough
- Static alloc for components mempool and entities mempool
- Component mempool now uses the component enum as index
- Update all mempool functions to work with the new struct
2022-12-05 13:02:34 +08:00
En Yi b392e462b7 Implement test scene
Internal Changelog:
- Update BBox component to use Vector2
- Add new CTransform component
- Implement level scene movement system and render system
- Implement scene test procedure
2022-12-05 12:20:00 +08:00
En Yi 6c03078db9 Implement Scene and Level Scene
Changelog:
- Add actions and assets headers, not implemented and not used
- move original main to entManager_test
- Add proper main to create window and display nothing
- Implement scene base class and level scene
- Add a simple level scene test
- Update CMakeLists to compile main and tests
2022-12-03 13:46:24 +08:00
En Yi 4a926f8c53 Implement tag on entities
Internal Changelog:
- Use data store similar to component map
- Add init and free for entities tag
- Use enum instead of char for tag
- Switch to use clang for compilation
- Add -Wall for compilation
2022-11-26 23:27:45 +08:00
En Yi f90ef7eee4 Adjust function parameters input 2022-11-26 20:49:16 +08:00
En Yi 17aae0617c First Commit of HATPC remake
Internal Changelog:
- Implement Basic ECS
- Tag system not yet implemented
- Use SC for common data structures
2022-11-26 18:11:51 +08:00