Repository navigation
LD60: either controller plays, and the cameras follow a moment behind like the prototype's - #182
Merged
Merged
Conversation
All five are one-player games, but they only read joy1, so whoever picked up the second controller (or the WASD half of the emulator's keyboard) got nothing, not even past the title screen. Each game now reads its stick and buttons through held()/pressed(), which take either controller, the same "joy1 or joy2" idiom the dream garden demo uses. The test harness gains a second controller on the headless comms, and every game is played twice from one seed, once on each controller, to check that the second one moves the world exactly as the first and starts a new game from the end screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the prototype, steering in or out moves the ship at once and the view scrolls after it a moment later; here the camera was pinned to the ship, so the tunnel jerked with every press. The prototype's scroll closes 7% of the gap to its target each 60 fps frame (its momentum term resets whenever the camera heads for the target, so in play it is that plain ease); 12% per 30 ms tick is the same pace. While you steer, the ship is drawn about a tile off its usual depth, and it settles back when you let go. Only the depth eases. Round the disc the camera still turns exactly with the ship. The camera tests teleport the ship, so they now clear the walls and UFOs and let the camera catch up instead of expecting it there on the next tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prototype eases its view after the player in every level. Round the disc it turns by a share of the gap that grows with the gap (4% of it per hundredth of a turn, each 60 fps frame), so a moving player is drawn a few columns ahead of the top and the view drifts back onto them when they stop; a gap of a twentieth of a turn or more is jumped. In and out it scrolls only the levels taller than the screen: the tunnel, the maze and Rim Runner, at 7% of the gap a frame. All five ports now turn the same way: TURN_FOLLOW = 1/36 of the gap per column of it, per 30 ms tick, which is the prototype's pace. That's about 5 columns ahead at cruising speed, a column more flat out in Spiral Tunnel and Dodge 'Em. Catch the Robots and Rim Runner also ease in and out at 12% a tick, like Spiral Tunnel already did. Dodge 'Em and Defender fit on screen in the prototype too, so they only turn. Dodge 'Em's crash explosion now keeps its place in the world, since the camera keeps moving after the crash. Every game's tests now check that the player is drawn 3 to 12.8 columns ahead while going round. In the three games where you can stop, they also check that the camera comes back onto the player. Spiral Tunnel and Dodge 'Em check that faster means further ahead, averaging over ten ticks because the camera sits on whole columns. Catch the Robots and Rim Runner check the in/out lag. The tests that moved the player instantly now wait for the camera to catch up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to the LD60 Circular Arcade games (after #181).
Either controller plays all five games
The games are one-player, but they only read joy1. Anyone holding the second controller, or using the WASD half of the emulator's keyboard, couldn't even get past the title screen. Each game now reads its stick and buttons through
held()/pressed(), which accept either controller. That covers A on the title and end screens too. It's the samejoy1 … or joy2 …pattern the dream garden demo uses.The cameras follow a moment behind, as in the prototype
In the prototype you move at once and the view eases after you. Here the camera was pinned to the player.
1/36of the gap per column of it per 30 ms tick, which is the same speed. A moving player is drawn about 5 columns ahead of the top, a little more at full speed. When you stop, the view drifts back onto you.Tests
tests/run_tests.pypasses and mpy-cross compiles all five games. The menu icons are unchanged.🤖 Generated with Claude Code