Commit Graph

15 Commits

Author SHA1 Message Date
74ba61ee53 Add EntityFactory, player can now shoot bullets
Add DEBUG Constant + rendering of FPS when true
2020-01-25 17:26:04 +04:00
087b53564f maxVelocity = Float.MAX_VALUE by default 2020-01-25 17:21:14 +04:00
5eed818cc3 It makes more sense for Component to be an interface 2020-01-25 15:51:06 +04:00
f44f34b3de Add ComponentMapper for faster retrieval of entity components 2020-01-25 15:34:58 +04:00
d97c956607 Cleanup of ListenerRegistry 2020-01-25 14:03:50 +04:00
90e5ff36e7 Move entity processing loop to systems
Store cache of interested entities in each system.

Perform entity activation, deactivation and removal outside of the update
loop.

Instead of throwing an exception when trying to get a Component from
ComponentBag that is out of range, just return null. This is to allow
systems to try getting a Component it isn't registered for.

Fixed ComponentType.isTypeInMask
2020-01-25 13:56:35 +04:00
d8b82c4fee Fix screen wrapping math
Rather than place entities directly on the screen edge boundary, add the
distance they were beyond the screen edge.

Store aabb in ModelComponent for use by multiple systems.
2020-01-25 13:18:38 +04:00
22fc504619 Add Event/Listener framework to common/ecs 2020-01-25 00:18:16 +04:00
83113f3afd Rotate at a frame time dependent rate (300 degrees / second) 2020-01-25 00:18:16 +04:00
3d9b62d455 Add screen wrapping system
Move model position/rotation updating to movement system
2020-01-25 00:17:14 +04:00
d7c55d72e3 Set up ECS on GameScreen: register components and systems, add player 2020-01-24 17:24:08 +04:00
6fb664adaf Add player/model components + input/render systems 2020-01-24 16:05:13 +04:00
e38b538a1e Add movement/acceleration/velocity components + movement system 2020-01-24 16:05:13 +04:00
89a7bc031c Add beginnings of game code. 2020-01-24 16:05:08 +04:00
909b50b47d Add base project files. 2020-01-24 12:03:04 +04:00