- 27 Dec, 2020 20 commits
-
-
Rahix authored
Randomly choose between assembly hall and CCL for now.
-
Rahix authored
A new level which only supports the bottle angel shift for now. Notably, I did not yet add any obstacle spawn points because I was unsure how we can make sure the player can't be trapped.
-
Rahix authored
Allow players to use the arrows keys as well as WASD for controlling character movement.
-
neosam authored
Random fixes and improvements Closes #27 See merge request engel-simulator-2020/game!34
-
Rahix authored
When the player reaches 30 hours, we're currently getting a panic in debug mode and an unhandled interger underflow in release mode. Sidestep this by not performing the subtraction if the player has gained enough hours.
-
Rahix authored
We do know the update timestamp already as it is passed in via Clock::update() and saved as Clock.last_tick. Make use of this value instead of calling into a browser API each time.
-
Rahix authored
For proper operation of the clock, it needs to be updated in those states as well.
-
Rahix authored
Some of them interfered with walls, move them slightly to fix this.
-
Rahix authored
Remove a left-over debug print statement.
-
Rahix authored
Show a banner message that a return to heaven is imminent and count down for 3 seconds before going back to heaven. This makes the game flow a bit smoother as it provides an indication to the player that the challenge is completed now.
-
Rahix authored
If the system were to run multiple times after all bottles were collected, it would add the hours to the player's counter multiple times. Ensure this can't happen.
-
Rahix authored
In case some entity needs its sprite to be offset from its position, add an `offset` attribute to the `Sprite` component which allows doing just that. The offset is a translation vector from the default position. By default, a sprite is placed such that its center is located at the entities `Position`.
-
Simon Goller authored
The `Clock` now returns a constant `frame_delta` for each frame. To do this, it must be updated once in the `InGameState` on each update. This commit also fixes the diagonal movement speed by normalizing the movement vector. Fixes #19 and #20
- 26 Dec, 2020 20 commits
-
-
Rahix authored
Instead of deleting drop points on contact, change them to be an empty drop point instead.
-
Rahix authored
Drop the home-cooked temporary debug rendering system for bottle drop points and instead use a sprite for this.
-
Rahix authored
-
Rahix authored
Allow passing either an ImageHandle or a `Sprite` to Sprite::new().
-
Rahix authored
Query the size of the sprite on the fly during rendering. This makes component instanciation much easier because it no longer requires access to the `Rendering` API. As a later optimization, we could move this ofsetting into the draw_image() function via a new parameter.
-
Rahix authored
No match needed, for simple enums one can just convert them to their integer discriminant with `as <int-type>`.
-
Rahix authored
-
Rahix authored
Pass the timestamp from requestAnimationFrame() to the state update function so the game-state doesn't have to call into JavaScript for timestamps anymore.
-
Rahix authored
-
Rahix authored
The GameManager provides a way for systems to schedule a transition back to the heaven.
-
Rahix authored
Add a new method to the AngelShiftImpl trait which angel shifts use to configure any shift-specific entities, resources, and ECS systems. As a first implementation, properly implement this for the bottle angel shift and move the `collect_bottledrops` systems here instead of it being a generic system.
-
Rahix authored
Doing it this way, each shift can decide which levels are compatible with it and this way we don't require that each level supports all possible shifts.
-
Rahix authored
Generate a random shift for the player when entering the heaven. Display all meta-data for this shift in the GUI.
-
Rahix authored
A new module to contain the "logic" for all angel shifts. As an example/first shift, introduce a "Bottle Angel Shift". Shifts are abstracted as a trait object which contains the actual shift logic and is dynamically selected based on RNG.
-
Rahix authored
Tell a player how many hours they'll gain by doing a certain shift.
-
Rahix authored
Display a cound of collected angel hours and the amount of hours still needed for getting a shirt (currently hard-coded to 30h).
-
Rahix authored
Add the count of angel hours to the player component.
-