Skip to content

Dark Forces: only the textures a level uses are loaded; the level is freed before the next cutscene - #37

Merged
finger563 merged 1 commit into
mainfrom
perf/df-level-memory
Nov 22, 2026
Merged

finger563 merged 1 commit into
mainfrom
perf/df-level-memory

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Summary

Bumps TheForceEngine to esp-cpp/TheForceEngine#3. These are the handheld (TFE_ESPBOX) changes the box needed for the later Dark Forces levels:

  • Only the textures a level uses are loaded (JABSHIP: 51 of 359, −1.1 MB).
  • The level is freed before the next mission's cutscene starts.
  • The renderer's adjoin edge list (−253 KB) and the task stacks (−96 KB per 16 tasks) are cut to their real size.
  • A save load frees the loaders' read buffers.

The Tab5 has plenty of PSRAM, so for it this is mainly about keeping the shared engine on one version.

Testing

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

…freed before the next cutscene

TheForceEngine perf/df-level-memory 5f5b0da (TFE_ESPBOX, shared with the box):
only the textures the sectors and walls use are loaded (JABSHIP: 51 of
359, -1.1 MB), the level is freed before the next mission's cutscene starts
(finishing NARSHADA ran out of memory in jabba1 on the box), the renderer's
adjoin edge list (-253 KB) and the task stacks (-96 KB per 16 tasks) are
their real size, and a save load frees the loaders' read buffers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@finger563
finger563 merged commit dda4db1 into main Nov 22, 2026
1 check passed
@finger563
finger563 deleted the perf/df-level-memory branch November 22, 2026 05:44
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