- 21 Dec, 2020 22 commits
-
-
-
-
-
Rahix authored
Let's hope we don't make them loose it D:
-
Rahix authored
Make sure the player spawns don't put the player into a wall collider.
-
Rahix authored
Load all spawn positions from the `spawns` layer in the map SVG and store them as level data. As a first use, make the player spawn at one of the player spawnpoints randomly.
-
Rahix authored
-
Rahix authored
-
Rahix authored
-
Rahix authored
-
Rahix authored
This allows one to debug wrong colliders in-engine. Quite helpful if inkscape messed up the SVG again ...
-
Rahix authored
The values passed to Cuboid::new() must be half extents and the position of the collider must describe the center. In SVG, rectangles are described by the top left corner and full extents which was incorrectly passed to the Cuboid::new() constructor. Fix this.
-
Rahix authored
Don't move the player if it is colliding with the world
-
Rahix authored
Add a basic level with proper colliders.
-
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
-