The maintainer has not written a description at the source.
Repo dr-jam/CameraControlExercise, read from GitHub 1 min ago. dr-jam has not joined Take My Repo.
dr-jam/CameraControlExercise is a public repo on GitHub by dr-jam. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in GDScript, has 0 stars and last changed on 2026-10-13. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Add adaptation information here.
Place claims here.
Your goal is to create several swappable camera control scripts for a top-down terraforming simulator.
The primary reference for this exercise is Scroll Back: The Theory and Practice of Cameras in Side-Scrollers by Itay Keren, covered in class.
The due date for this exercise is listed in Canvas.
We will evaluate the submitted master branch of your individual exercise repository as specified in Canvas. Make sure all work you want evaluated has been committed and pushed to GitHub.
Before submitting:
CameraSelector.draw_camera_logic enabled.The following requirements apply to all five stages:
CameraControllerBase.World node.Vessel node to the Target exported field through the editor.Array[CameraControllerBase] in CameraSelector.delta.ImmediateMesh in _draw_logic() to visualize important camera logic when draw_camera_logic is true. Follow PushBoxCamera for the drawing pattern.Vessel.draw_camera_logic enabled in the submitted project.x is horizontal and world z is vertical. ui_up moves toward negative z; ui_down moves toward positive z.Vector2 used for a frame or zone, .x means world x and .y means world z. Thus top_left has smaller coordinates than bottom_right on both components.Vessel.WIDTH / 2 on either side of its center on x, and Vessel.HEIGHT / 2 on z, as in PushBoxCamera.x-z plane; differences in world y do not count. Controllers should preserve the base camera's vertical tracking/zoom behavior.delta; clamp movement so a camera cannot pass its destination in a single frame.Keep the camera centered on the Vessel in the x-z plane. This stage needs no additional exported fields.
When draw_camera_logic is true, draw a cross at the center of the camera.
This type of camera can be found in games such as Terraria ©2011 Re-Logic.
In the grand tradition of shmups, this controller implements a frame-bound autoscroller.
Scroll the camera and its rectangular frame at autoscroll_speed, on either or both ground-plane axes. The player can move freely inside the frame.
After scrolling the camera, push a lagging target just far enough to keep its trailing side inside the frame. For positive x scrolling, check the target's left side against the frame's left edge; for negative x, check its right side against the frame's right edge. Apply the same rule independently on z. Do not constrain an axis with zero scroll speed, or change the camera's scroll speed to follow the target.
When draw_camera_logic is true, draw the frame border.
Vector2 top_left Vector2 bottom_right Vector3 autoscroll_speed
top_left — top-left corner of the frame relative to the camera, in (x, z) coordinates.bottom_right — bottom-right corner of the frame relative to the camera, in (x, z) coordinates.autoscroll_speed — world units per second for each world axis. Use its x and z components; y is ignored.The frame bounds are inclusive. Configure top_left.x < bottom_right.x and top_left.y < bottom_right.y, with enough room for the vessel's footprint. A zero speed on an axis disables scrolling and trailing-edge correction on that axis. Only trailing edges are enforced; leading and non-scrolling edges do not constrain the target.
This type of camera can be found in games such as Scramble ©1981 Konami..
autoscroll_speed changes the scrolling rate.Unlike Stage 1, move the camera toward the target over time rather than centering it immediately.
While the vessel has nonzero velocity, the camera should move toward it at follow_speed. This should generally be slower than the vessel's movement speed, allowing some separation between the player and camera.
When the vessel's ground-plane velocity reaches zero, the camera should move toward it at catchup_speed. Deceleration still counts as movement until velocity reaches zero.
After the normal follow or catch-up step, enforce leash_distance on the x-z plane. If the camera is too far away, move it to the nearest point on the leash boundary around the target. This correction takes precedence over the normal speed and may move the camera faster than follow_speed or catchup_speed. Motion toward the target must stop at the target rather than overshoot it.
Use fixed-speed movement, such as move_toward() with a step of speed * delta. Ordinary repeated lerp uses a fraction of the remaining distance, not a speed in units per second, so it does not implement these parameters.
When draw_camera_logic is true, draw a cross at the center of the camera.
float follow_speed float catchup_speed float leash_distance
follow_speed — speed at which the camera follows a moving target.catchup_speed — speed at which the camera catches up after the player stops.leash_distance — maximum distance between the vessel and camera center.Speeds and leash distance must be nonnegative. The scalar leash describes a circular limit on the x-z plane. Adaptation A adds separate horizontal and vertical limits; Adaptation B changes the fixed-speed catch-up rule.
This is a simplified smooth-follow exercise inspired by the discussion of Super Meat Boy ©2010 Team Meat.
leash_distance.Create a variant of Stage 3 in which the camera leads the player in the direction of player input.
Maintain an x-z focus offset relative to the target, initially zero. Use ui_left, ui_right, ui_up, and ui_down to determine the lead direction, not vessel velocity. Normalize nonzero input so diagonal input does not produce a faster lead.
While input is nonzero, move the offset toward input_direction * leash_distance at lead_speed, without overshooting. Place the camera's ground-plane center at the target's current position plus this offset. The camera therefore tracks target movement even when the vessel moves faster than lead_speed; that speed controls the change in look-ahead, not world-space camera speed.
On release, hold the offset relative to the target for catchup_delay_duration, then move it toward zero at catchup_speed, without overshooting. Reset the timer whenever movement input is nonzero. If a frame crosses the delay threshold, use only the part of delta after the threshold for recentering. Reversing input changes the desired offset immediately, but the actual offset still moves at lead_speed; Adaptation C adds a recentering step before the new lead.
When draw_camera_logic is true, draw a cross at the camera center.
float lead_speed float catchup_delay_duration float catchup_speed float leash_distance
lead_speed — rate of change of the target-relative offset, in world units per second.catchup_delay_duration — seconds of zero movement input before recentering starts.catchup_speed — rate at which the offset returns to zero, in world units per second.leash_distance — intended full lead distance and maximum offset length.All four fields must be nonnegative. Use fixed-speed offset movement, not ordinary repeated lerp. Keep the offset within the circular x-z leash, including when its limit is reduced in the editor.
The input-directed focus is inspired by Jazz Jackrabbit 2 ©1998 Epic Games.
lead_speed.Adapt the one-directional speedup-push-zone technique demonstrated in class to work left, right, up, and down. Use an inner speedup zone and an outer pushbox, with the exported fields listed below.
Your controller must produce these behaviors:
push_ratio.Choose how to organize the rules and enforce containment. Do not move the vessel to satisfy the pushbox; this controller moves the camera.
When draw_camera_logic is true, draw both the pushbox and speedup-zone boundaries.
float push_ratio Vector2 pushbox_top_left Vector2 pushbox_bottom_right Vector2 speedup_zone_top_left Vector2 speedup_zone_bottom_right
push_ratio — fraction of target movement applied to the camera while the target is in a speedup region but has not reached the outer edge.pushbox_top_left — top-left corner of the outer pushbox.pushbox_bottom_right — bottom-right corner of the outer pushbox.speedup_zone_top_left — top-left corner of the inner speedup zone.speedup_zone_bottom_right — bottom-right corner of the inner speedup zone.All four corners are offsets from the camera center in (x, z) coordinates. On each axis, require outer_min < inner_min < inner_max < outer_max; both boxes must fit the vessel's footprint. Contact with an inner boundary does not trigger fractional following; contact with an outer boundary triggers full following for outward movement. push_ratio must be between 0 and 1, inclusive.
This is a simplified four-directional adaptation of the speedup-before-the-push-boundary idea discussed for Super Mario Bros. ©1985 Nintendo.
Provide a short recording or reproducible demonstration showing:
Explain how your implementation combines the axis rules, how it handles boundary crossings, and one limitation or tradeoff. Compare the same movement sequence at two frame rates and report any differences.
Implement _draw_logic() using PushBoxCamera as an example. Draw the cross or boundaries required by each stage at the vessel's height. You can also draw the leash or other state if it helps you diagnose movement.
After completing the five controllers, make one of these changes:
Modify Stage 3 or Stage 4 so the horizontal and vertical leash distances can be tuned independently.
Modify Stage 3 so the camera catches up more aggressively when it is far from the target and settles more gently as it approaches.
Modify Stage 4 so that reversing direction first brings the camera back toward the player before establishing a lead in the new direction.
Your adaptation should:
Add a short comment near the relevant class declaration identifying the option you implemented:
# ADAPTATION: B - Distance-Sensitive CatchupInclude a short explanation in your submission:
Supplied tests, debug drawing, recorded demonstrations, and your own tests are all useful ways to verify the change. You do not need to write additional automated tests.
| Stage / required work | Baseline competency | Evidence |
|---|---|---|
| Stage 1: Position Lock, scene binding, and debug drawing | Engine Usage — Unlocked | Uses the camera base class, scene references, and ImmediateMesh to implement and inspect camera behavior. |
| Stage 2: Planar Auto-Scroll | System Interrelations — Unlocked | Coordinates camera scrolling and vessel position while preserving independent player movement. |
| Stage 3: Position Lock with Smoothing | Game Systems — Unlocked | Implements movement-dependent following, catch-up, and a distance limit. |
| Stage 4: Smoothed Target Focus | Further evidence for Game Systems — Unlocked | Combines input-directed focus, target tracking, and delayed recentering. |
| Stage 5: Four-Way Speedup Push Zone, including its explanation and demonstrations | Game Systems — Developed | Generalizes the one-directional technique, combines independent axis rules, and verifies boundary crossings and frame-rate behavior. |
| Required adaptation and its evidence | Further evidence for Game Systems — Developed | Changes an existing controller to meet a new requirement and explains and verifies the result. |
The suggestions at the end of this document offer other ways to demonstrate Developed or Mastery. Claims are evaluated against the course competency criteria, not the number of features or tests added.
deltadelta is the time in seconds since the previous frame. At 10 units per second, one frame's movement is:
distance = 10.0 * delta
lerp)lerp(a, b, t) returns a point between a and b: t = 0 gives a, t = 1 gives b, and t = 0.5 gives the midpoint.
lerp(a, b, t) = a + t * (b - a)
Calling position.lerp(target_position, 0.1) moves 10% of the remaining distance each time. That is not 0.1 units per second, and repeating it once per frame makes the response frame-rate dependent. For a speed in units per second, consider move_toward() with a step of speed * delta.
A leash limits camera-to-target distance on the ground plane. With leash_distance = 10, that distance must stay at or below 10 units even when normal following would let the target move farther away.
A pushbox, also called a camera window, is a region around the camera in which the target can move without forcing the camera to follow exactly.
When the target reaches an outer boundary, the system responds to keep the target in the intended region. Stage 2 corrects the target at the trailing edge; Stage 5 moves the camera at the outer pushbox edge.
Stage 5 uses two nested regions:
Outer Pushbox
┌─────────────────────────────┐
│ Speedup Region │
│ ┌─────────────────┐ │
│ │ Inner Zone │ │
│ │ camera does not │ │
│ │ move │ │
│ └─────────────────┘ │
│ Speedup Region │
└─────────────────────────────┘
The camera stays still inside the inner zone, follows outward movement at a fraction of target speed in the surrounding region, and enforces containment at the outer boundary.
A target-focus camera shows more space in the direction the player intends to travel. Stage 4 uses input for this; input and current velocity can point in different directions.
An invariant is a condition that must remain true during play. For a leashed camera:
distance(camera, target) <= leash_distance
Other examples are keeping the target ahead of Stage 2's trailing edge and keeping Stage 5's camera still while the target is inside the inner zone. Check these conditions throughout a movement sequence, not just at the end.
For Stages 2 and 5, put the vessel's side exactly on a boundary and just to either side. In Stage 5, try outward and inward movement at the same position, then compare single-edge and corner contact. These cases exercise the rule changes that a test in the middle of a region can miss.
ImmediateMeshImmediateMesh lets you build the debug lines in code. Each controller must call its _draw_logic() method when debug drawing is enabled; the base class declares the method but does not call it for you. Follow the mesh creation and cleanup pattern in PushBoxCamera.
Once a controller works, change its exported parameters and play it again. Try slow movement, hyper-speed movement, stops, and reversals. Check it at different frame rates as well as with the automated tests.
These are optional directions, not additional requirements or automatic awards:
For a claim, identify the competency and level, link to your work, and explain how the results meet the course criteria.
dr-jam/CameraControlExercise is a public repo on GitHub by dr-jam. Its maker has not written a description.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-10-13. GitHub counts 3 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Materials for ECS170 Artificial Intelligence Spring 2018
Syllabus and course materials for the AI, Games, and Design (ECS 289G 002 for fall quarter 2020).