- 21 Dec, 2020 4 commits
-
-
Rahix authored
Control the player with WASD like a pro gamer.
-
Rahix authored
-
Rahix authored
-
Rahix authored
Add plumbing for the most basic player: - A `Player` component to mark the entity which is the player. - A `Player` resource which holds the entity ID of the player. - A `draw_tmp_player_system` to draw the player as a circle (for now). - A `create_player` function to create the player entity. - Update the `moving_system` to put the camera at the player position.
-
- 20 Dec, 2020 1 commit
-
- 19 Dec, 2020 8 commits
-
-
Rahix authored
Due to the camera translation, the clear is currently not actually happening over the entire visible canvas. Reset the transform before clearing to ensure it's working correctly.
-
Rahix authored
Just as an example to build on.
-
Rahix authored
It's only relevant for mouse events so only make it available there.
-
Rahix authored
During state cleanup, remove all registered handlers from the DOM again.
-
Rahix authored
Turns out that e.g. an out-of-band event() will trigger the loop again, thus leading to two loops running. This of course kills performance really quickly.
-
Rahix authored
Don't ever leak the handlers, keep track of them and drop them when they are no longer needed.
-
Rahix authored
We currently have a `state` and a `states` module. This is confusing, rename the state module to `gamestate` to make a more obvious distinction.
-
Rahix authored
-
- 18 Dec, 2020 9 commits
-
-
Rahix authored
-
Rahix authored
-
Rahix authored
Use a channel to drop colliders which are deallocated from the world. Unfortunately, we can only use a `SyncChannel` here which means we can only drop a limited number of colliders per frame. This could be a problem at the very end of a level, when an entire level with all its colliders is dropped. Let's see ...
-
Rahix authored
-
Rahix authored
Copy the constants from www/src/_rc3-colors.scss to a rust module as well.
-
Simon Goller authored
-
Simon Goller authored
The camera system sets the transform of the canvas. The pixel coordinate of the camera position is centered in the canvas.
-
Simon Goller authored
-
- 17 Dec, 2020 7 commits
-
-
Simon Goller authored
-
Simon Goller authored
-
Simon Goller authored
-
Simon Goller authored
-
Rahix authored
-
Rahix authored
This is a cheap hack to ensure we won't get event handlers from other states interfering with the currently active one. Whenever a state transition happens, increment the counter and any event arriving after that will recognize what happened and silently drop itself. This will still lead to event handler leaks but at least not broken state logic. Future cleanup needed ;)
-
- 14 Dec, 2020 11 commits
-
-
Rahix authored
-
neosam authored
Add legion world to ingame state See merge request rust/webassembly-game!7
-
Rahix authored
-
Rahix authored
See merge request rust/webassembly-game!5
-
Simon Goller authored
-
Simon Goller authored
-
Simon Goller authored
-
Simon Goller authored
-
Rahix authored
YOLO! Merging my own work is fun See merge request rust/webassembly-game!6
-
Rahix authored