Skip to content

Add pullable actor system, collision checks for push/pull#281

Draft
Dan512 wants to merge 1 commit into
chrismaltby:mainfrom
Dan512:main
Draft

Add pullable actor system, collision checks for push/pull#281
Dan512 wants to merge 1 commit into
chrismaltby:mainfrom
Dan512:main

Conversation

@Dan512

@Dan512 Dan512 commented Feb 24, 2026

Copy link
Copy Markdown

This is the Engine side of the Push/Pull system

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

Feature

What is the current behavior?

Solid actors in Adventure scenes have no built-in push or pull mechanics. The only push that exists is a push animation if a player runs into an actor or wall. Players cannot interact with solid actors to move them around the scene.

What is the new behavior (if this is a feature change)?

Solid actors can now be marked as "Is Pushable" and/or "Is Pullable" via new collision flags. Each has a corresponding feature toggle in the Adventure engine settings.

Push: Player walks into a pushable actor and enters a Push state after a configurable delay. The actor's "On Pushed" script fires each frame, passing direction and hold frame count. A "Push Grace Frames" setting prevents animation flickering during movement. A collision check prevents the script from firing if the actor is blocked.

Pull: Player presses interact while facing a pullable actor, then walks away to pull. The actor's "On Pulled" script fires each frame, passing direction and hold frame count. Collision checks verify both the actor and player have room to move. Recommended to use threads in the pull script to move the player and actor simultaneously.

New conditional events "If Pushed Direction" and "If Pulled Direction" allow scripts to branch based on direction and an optional hold frame threshold.

Depends on GBStudio side changes in a separate PR by Dan512

Does this PR introduce a breaking change?

No. Both features are disabled by default and require opting in via engine settings. Existing projects are unaffected.

Other information:

GB Studio changes (compiler, editor UI, events, and localization) are in a separate PR on the gb-studio repo. This PR covers the adventure.c, gbs_types.h, engine.json

@chrismaltby chrismaltby marked this pull request as draft February 24, 2026 16:19
@chrismaltby

Copy link
Copy Markdown
Owner

Thanks! I've left a comment on the GB Studio PR chrismaltby/gb-studio#1967 just setting these as drafts for now to prevent merging until I've been able to review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants