Skip to content

Left stick: walk and fight in any direction; world map camera stays put - #90

Merged
schindlershadow merged 5 commits into
mainfrom
analog-walk
Nov 19, 2026
Merged

schindlershadow merged 5 commits into
mainfrom
analog-walk

Conversation

@schindlershadow

Copy link
Copy Markdown
Owner

Ideas and research from VCKing101's port (https://github.com/VCKing101/Dissidia012-pc, MIT): the cause, the addresses and the camera-follow design come from its docs/port/analog-movement.md; the code here is our own. docs/related-projects.md (new) surveys that project, RocherBrockas/DissidiaDecompProject and RecompLauncher, with credits and licence terms, and lists what else is worth taking.

Walking in the stick's own direction. Our radial stick vector was never what steered a walk: the walker's input (ovl_battle FUN_08B38A0C, world map and the player's fighter in battle) builds its step from the four walk bits only, so every walk went one of eight ways. input.cpp replaces that camera-space step with the stick's direction just before the game applies the camera (the first of FUN_0885EA88 / FUN_089A3BC8 called from the walk's frame), for the hardware pad's walker only (raw[0]; a first version also steered the CPU fighter during the battle intro). Never while the pads are fed by the online exchange or a replay.

  • World map: 15 / -15 / 30 degree pushes turned the walk 14.8 / 15.0 / 30.2 degrees against a straight push (8-way: jumps of 20 to 45).
  • Battle: stick 0 -> 15 degrees turned the walk's world direction 15.6 degrees, and the fighter moved along it within 1-3 degrees a frame (PSPRECOMP_ANALOG_WALK_OUTLOG). On by default; PSPRECOMP_ANALOG_WALK_BATTLE=0 keeps battle 8-way, which saved battle replays need to play back exactly (they store only the 8-way bits).

World map camera. The game's follow turns the camera toward the walker's facing; with true angles the camera chased the walk (227 degrees in 1.5 s for a sideways push with PSPRECOMP_CAM_UNLOCK_HOLD=0). The follow's atan2 result (FUN_089A457C inside FUN_08B3F7F4, only the call on the walker's facing) is moved so the camera does not follow a walk with the stick at all: the right stick turns it, as asked. PSPRECOMP_ANALOG_FOLLOW_ZONE (degrees, default 180; 22.5 is VCKing101's dead zone, 0 the game's follow). D-pad walks keep the game's follow.

Docs: native-build.md, steamdeck.md (it said battle movement was fully analogue, which was not true), Developer options rows for the new variables. Tested on the test host and on the user's desktop (Vulkan, 240 fps).

Release notes

  • On the world map and in battle the left stick now moves you in any direction, not just eight.
  • On the world map the camera no longer swings around when you walk with the left stick; turn it with the right stick.

🤖 Generated with Claude Code

schindlershadow and others added 5 commits November 19, 2026 01:04
…s/DissidiaDecompProject, RecompLauncher)

Notes, with credit and licence terms, on what the other Dissidia 012 projects
have that we lack: the 8-way walk input at ovl_battle 0x08B38A0C, the game's
online exchange at 0x0890D664 and their rollback numbers, Japanese story scene
scripts, BGM picker and music mods, event names missing from charmod_objx.py.
Sources: https://github.com/VCKing101/Dissidia012-pc (MIT, VCKing101),
https://github.com/RocherBrockas/DissidiaDecompProject (MIT, Pierre Brossy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The walker's input (ovl_battle FUN_08B38A0C) builds each step from the four
walk bits, so walks went one of eight ways even with the radial stick vector.
While it runs for raw[0]'s LogicalPad with the stick pushed, the step on its
stack is replaced by the stick's own direction just before the camera is
applied (first of FUN_0885EA88 / FUN_089A3BC8 from its frame). World map by
default; PSPRECOMP_ANALOG_WALK=0 off, PSPRECOMP_ANALOG_WALK_BATTLE=1 also in
battle (experimental: battle heading moves only a few degrees),
PSPRECOMP_ANALOG_WALK_LOG=<n>.

Measured on the prologue field: 15, -15 and 30 degree pushes turned the walk by
14.8, 15.0 and 30.2 degrees.

Cause and addresses from VCKing101's notes:
https://github.com/VCKing101/Dissidia012-pc/blob/main/docs/port/analog-movement.md (MIT)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The world map's free camera (ovl_battle FUN_08B3F7F4) turns toward the walker's
facing with no dead zone, so with the walk at the stick's own angle a push a
few degrees off straight up spins the camera. While the follow runs for the
walker whose last step was the analogue one, its atan2 result (FUN_089A457C on
the walker's facing) is moved: no turn within PSPRECOMP_ANALOG_FOLLOW_ZONE
degrees (default 22.5, 0 = game), a ramp to the cap over half the zone, the
game's follow beyond.

Measured with PSPRECOMP_CAM_UNLOCK_HOLD=0, 15 degree push: 186 degrees of turn
in 1.75 s without the zone, a straight walk with it. With camera.cpp's hold
camera (the default) the spin was already hidden; the zone covers the rest.

Design from VCKing101's notes (docs/port/analog-movement.md section 7, MIT):
https://github.com/VCKing101/Dissidia012-pc

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A per-frame log of the walk's world output (PSPRECOMP_ANALOG_WALK_OUTLOG) shows
battle is fully steered: stick 0 -> 15 degrees turned the walk direction 15.6
degrees and the fighter moved along it to within 1-3 degrees a frame; the
8-way walk stayed on one direction for 0, 15 and -15. The earlier 2-6 degree
figure came from comparing separate runs, which the lock-on camera's orbit and
the dummy's varying spot make meaningless.

On by default; PSPRECOMP_ANALOG_WALK_BATTLE=0 keeps battle 8-way (saved battle
replays record only the 8-way bits). Pads fed by the online exchange or a
replay are never steered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns it)

Asked for: the left stick swung the world map camera left and right as the
game's follow turned it after the walker. PSPRECOMP_ANALOG_FOLLOW_ZONE now
defaults to 180 degrees (never turns after a stick walk); 22.5 is the earlier
zone, 0 the game's follow. D-pad walks keep the game's follow.

Checked with PSPRECOMP_CAM_UNLOCK_HOLD=0, stick held at 90 degrees: game's
follow 227 degrees of turn in 1.5 s, now a straight walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schindlershadow
schindlershadow merged commit 5c24901 into main Nov 19, 2026
2 checks passed
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.

1 participant