Skip to content

Dark Forces: level 2 reachable again (a nameless agent no longer vanishes after mission 1); saving in big levels no longer crashes - #144

Merged
finger563 merged 1 commit into
mainfrom
fix/df-nameless-agent
Nov 21, 2026
Merged

finger563 merged 1 commit into
mainfrom
fix/df-nameless-agent

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Summary

Bumps TheForceEngine to esp-cpp/TheForceEngine#2 (fix/nameless-agent), which fixes Dark Forces level 2 never becoming reachable:

  • A nameless agent no longer vanishes after mission 1. The agent menu lists agents up to the first one without a name, and New Agent accepted an empty name, which is easy with the gamepad text entry. After mission 1, mission 2 couldn't be begun, and the agent's progress was written back cleared. Agents now always have a name (AGENT <n>), and a stored nameless agent with progress gets one when the pilot file is read.
  • Saving in big levels no longer crashes. The save header captured the screen into a 256 KB buffer for its 4 × 4 image, and the screen capture is a stub here anyway. In Talay the allocation failed and the save crashed, leaving an empty slot. The header now gets the placeholder directly.

Testing

On the box and the Tab5 with the box's pilot file:

  • The agent menu lists AGENT 1, and Talay: Tak Base loads.
  • The existing Talay save loads.
  • A save in Talay completes and loads back (on the box).
  • On the box in Talay, about 120 KB of PSRAM is left. Memory there is tight, and that's a separate follow-up.

Merge esp-cpp/TheForceEngine#2 first; the submodule points at its branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

…ing in big levels no longer crashes

TheForceEngine fix/nameless-agent:
- The agent menu lists agents up to the first one without a name, and New
  Agent accepted an empty name (easy with the gamepad text entry): such an
  agent played mission 1, then the agent menu came back without it, so
  mission 2 could not be begun, and its progress was written back cleared.
  Agents now always have a name ("AGENT <n>"), and a stored nameless agent
  with progress gets one when the pilot file is read.
- Saving captured the screen into a 256 KB buffer for the save header's
  4x4 image (the capture is a stub here): in Talay only ~120 KB of PSRAM is
  free, the allocation failed and the save crashed (an empty slot). The
  header now gets the placeholder directly.

Tested on the box with its pilot file (a nameless agent, mission 1 done):
AGENT 1 is listed with Talay: Tak Base available, Talay loads (50 fps,
4 MB block full + 712 KB from the PSRAM heap, ~120 KB left), a save in
Talay completes and loads back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@github-actions

Copy link
Copy Markdown

ESP-IDF Size Report for 'Esp Box Emu'

Metric Base PR Delta
FLASH 4,232,656 bytes (67.28%) 4,232,628 bytes (67.28%) ⬇️ -28 bytes (0.00%)
DRAM 170,069 bytes (49.76%) 170,069 bytes (49.76%) 0 bytes (0.00%)
IRAM 0 bytes 0 bytes 0 bytes
RAM (DRAM+IRAM) 170,069 bytes 170,069 bytes 0 bytes (0.00%)

FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available.
DRAM/IRAM usage does not include memory used by the heap allocator at runtime.
This report was generated by esp-idf-size-delta.

@finger563
finger563 merged commit 820cfa6 into main Nov 21, 2026
3 checks passed
@finger563
finger563 deleted the fix/df-nameless-agent branch November 21, 2026 22:43
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