ForNeVeR / ForNeVeR/O21

Player should keep direction when horizontal speed is zero

Open
#241 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
F#
Stars
30
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Consider that a player has an ability to turn. For easier reproduction, here's a patch that allows this from the start:
```
Index: O21.Game/Engine/Entities.fs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/O21.Game/Engine/Entities.fs b/O21.Game/Engine/Entities.fs
--- a/O21.Game/Engine/Entities.fs (revision Staged)
+++ b/O21.Game/Engine/Entities.fs (date 1746995143324)
@@ -115,7 +115,7 @@
Direction = Right
Lives = GameRules.InitialPlayerLives
Score = 0
- Abilities = Array.empty
+ Abilities = [| { Type = AbilityType.AllowTurn; Lifetime = 0 } |]
Oxygen = OxygenStorage.Default
}
and OxygenStorage = {

```

Now, the player presses keys `Left`, `Right`.

In the original, this leads to horizontal speed of zero but still left-turning position,

In O21 currently, it leads to right-turning position (the default one).

It should keep the player sprite to face left.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.