Skip to content

Support variable gravity #1500

Open
0 of 4 issues completed
Open

Description

@omesser

We want to allow "floating" / "Swimming" characters like fish, jelly-fish, birds, etc... and for them to behave in a reasonable way.
One easy way to do that is to make gravity a variable setting and let character manifest override the default gravity.
A fish character, for example, can set gravity=0 which will allow it top keep its horizontal movement.

In Scope

  • desktop/windows interactions without gravity - perch, and hitting windows on the side panels
  • Settings - expose gravity slider - range 0 - 2g, where g= (9.80665 { m/s}^2) - earth's gravity. default is 1
  • Allow character manifest to override default gravity for this character. e.g. some fish will set gravity=0. Still overridable in settings
  • Create a test character (fish?) for 0 gravity scenario. package it with the default roster
  • Grab / throw still work, giving the character vector momentum like today
  • Grab + place (gently) will de facto place the character in a certain height, which it will maintain, because vertical/diagonal movement is excluded from scope.
  • poking zeros-out all momentum, so it's a way to "set" the horizontal band the character is on

Out of scope / Follow ups

  • handle vertical / diagonal movement and window interactions
  • negative gravity (falling upwards will cause weird visual artifacts, since there's no ceiling and the sprites are all up-right

Activity

  1. added this to the V2 milestone on Oct 11, 2026
  2. moved this from Todo to In Progress in Fidgeton Oct 29, 2026
  3. added
    umbrellaAn over-arching issue containing references to several issues/PRs for implementation/research phases
    on Oct 30, 2026
  4. omesser commented on Oct 30, 2026

    @omesser
    OwnerAuthor

    First slice landed on main in #1944 (merge 54e09b1a): a Character Manifest can set gravity = 0.25..2, a multiple of the default fall. Leave it out and you get 1, which falls exactly as before. Grab and throw keep their momentum under the scaled gravity.

    Still open, tracked as sub-issues:

    Leaving this open until those land.

    — Cursor agent (Coder), on @omesser's behalf.

  5. omesser commented on Oct 30, 2026

    @omesser
    OwnerAuthor

    Progress from #1944, now on main (54e09b1):

    • A Character Manifest can declare gravity, a multiple of the default fall, accepted from 0.25 to 2 (GravityScale, crates/core/src/character.rs L124-L132). Leaving it out keeps 1, so existing Characters fall exactly as before.
    • The manifest parser rejects 0, negatives and non-numbers by name (crates/core/src/character/manifest.rs L134-L145).
    • Each Instance gets its Character's gravity (Engine::with_gravity_scale, crates/core/src/engine.rs L690; the Roster wires it in crates/core/src/roster.rs L260), and Falling uses it (engine.rs L1390).
    • Documented in the manifest table in docs/DEVELOPMENT.md L239.

    Still open here, each tracked as its own sub-issue:

    This umbrella stays open until those land.

    — Cursor agent (P. Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agentumbrellaAn over-arching issue containing references to several issues/PRs for implementation/research phases

    Projects

    • Status
      In Progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions