wholeworldcoding WrldBox-derived game collection
  • C 92.6%
  • Python 4.2%
  • Shell 3%
  • Makefile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
P7MJ a3b5066239 Share charge, block and throw with scripted cubes (cube equality Phase 5)
Blocking was the last combat action that only the player could raise: the
shield glide lived in the player's intent writer. It is now an intent field
filled by the button or shieldblock(), with one consumer gliding shieldBlock
for every cube, and a scripted aim now aims the shield too. Throw gained
throwweapon(), which is the player's own release path, so a scripted throw
follows the same arc. Charge needed no code - one state machine already served
both - so the phase closes on the remaining two actions.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-11 20:36:39 -05:00
archive Minor reorganization 2026-09-15 08:29:29 -04:00
block-collision-definitions More minor edits 2026-10-31 09:55:42 -04:00
block-texture-definitions More minor edits 2026-10-31 09:55:42 -04:00
block-texture-sources Add project introduction and P7MJ block texture source 2026-09-14 07:24:37 -04:00
cara A-0-xvii (Build 16) THE RANGED UPDATE; first ranged weapon added, optimized and tested- 2026-11-02 18:19:30 -05:00
character-texture-definitions Pause menu, settings/controls persistence, physics step-up fix, debug HUD + mouse readout (pre-CAScript checkpoint) 2026-08-08 10:28:35 -04:00
character-texture-sources Pause menu, settings/controls persistence, physics step-up fix, debug HUD + mouse readout (pre-CAScript checkpoint) 2026-08-08 10:28:35 -04:00
context Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
cube-stat-definitions A-0-xiii (Build 12) Cube stat parser edits and return of brittle item type 2026-10-26 15:24:43 -04:00
cube-texture-definitions Cube texture skins + universal file functions 2026-08-27 17:41:40 -04:00
cube-texture-sources Cube texture skins + universal file functions 2026-08-27 17:41:40 -04:00
docs Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
editor Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
font-definitions Dropped items come to rest, shield swings animate through the pose hand-off, and CAScript gains screen() popups 2026-10-29 13:30:58 -04:00
font-sources Proto A-0-v (Build 4) Pixelorama is kinda broken on my device... 2026-10-19 20:10:12 -04:00
home/p7mj Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
icon-texture-definitions Cardboard box item defs and texture, key_b / key_~ icons, and the Programmer's Handbook 2026-10-27 21:00:41 -04:00
icon-texture-sources Dropped-item bounce + wall-lean, spawnitem index/removeitem, drip removal, debug cursor fix, options/inventory UI cleanup 2026-08-13 22:44:29 -04:00
include Init Commit 2026-06-11 07:26:35 -04:00
item-collision-definitions before ranged implementation 2026-11-02 16:19:24 -05:00
item-stat-definitions A-0-xvii (Build 16) THE RANGED UPDATE; first ranged weapon added, optimized and tested- 2026-11-02 18:19:30 -05:00
item-texture-definitions before ranged implementation 2026-11-02 16:19:24 -05:00
item-texture-sources Interactables + item class, KO rework (drop gear, no ragdoll), ESC-skips-hints, physics safety net, UI/controls polish 2026-08-14 15:08:00 -04:00
levels Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
lib Init Commit 2026-06-11 07:26:35 -04:00
lint Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
maps Add music intensity profiles and extend bot behavior plans 2026-11-04 16:39:30 -05:00
misc-texture-definitions File I/O builtins, RNG seeding, 9-slice chat bubbles, title debug level-selector 2026-08-19 10:38:05 -04:00
misc-texture-sources File I/O builtins, RNG seeding, 9-slice chat bubbles, title debug level-selector 2026-08-19 10:38:05 -04:00
music-file-definitions Note why the public repo has no music and reshuffle roadmap order 2026-11-09 10:41:23 -05:00
projectile-additionals before ranged implementation 2026-11-02 16:19:24 -05:00
projectile-collision-definitions before ranged implementation 2026-11-02 16:19:24 -05:00
quests A-0-xii (Build 11) Editor QoL + CAHIE (Cube A Halloween Internal Edition) wip as well as engine cleanups 2026-10-26 14:49:42 -04:00
ranged-extras before ranged implementation 2026-11-02 16:19:24 -05:00
screen_definitions Dropped items come to rest, shield swings animate through the pose hand-off, and CAScript gains screen() popups 2026-10-29 13:30:58 -04:00
src Share charge, block and throw with scripted cubes (cube equality Phase 5) 2026-11-11 20:36:39 -05:00
tests Editor improvements 2026-11-08 16:05:20 -05:00
tools Add music intensity profiles and extend bot behavior plans 2026-11-04 16:39:30 -05:00
weapon-texture-sources EXPERIMENTAL: combat + inventory system, tiny weapon scale, 1-min regen grace 2026-08-10 09:26:02 -04:00
win Editor: roll the Windows port and the unsaved-warning fixes back out 2026-10-16 18:05:17 -04:00
.gitignore A honest reorganization. 2026-11-06 22:15:01 -05:00
AGENTS.md Polish editor views and linting; add project context 2026-11-04 10:54:59 -05:00
bench-water.sh before ranged implementation 2026-11-02 16:19:24 -05:00
bench_true_template.txt Add FPS and execution averages to benchmark summary 2026-11-03 15:07:39 -05:00
CREDITS.md one tiny grammar error and clarifications 2026-11-07 12:42:57 +00:00
editor-summary.txt Dropped items come to rest, shield swings animate through the pose hand-off, and CAScript gains screen() popups 2026-10-29 13:30:58 -04:00
git_rollback.sh Dialogue rework + weight system + title menu & save system 2026-08-14 21:54:58 -04:00
glfw3.dll Fixed missing raylib dll. I describe this error as PICNIC 2026-08-28 16:01:37 -04:00
libraylib.dll Fixed missing raylib dll. I describe this error as PICNIC 2026-08-28 16:01:37 -04:00
Makefile Add music intensity profiles and extend bot behavior plans 2026-11-04 16:39:30 -05:00
Makefile.win Add music intensity profiles and extend bot behavior plans 2026-11-04 16:39:30 -05:00
MUSIC.md Add MUSIC.md 2026-11-07 03:21:10 +00:00
newsavefile.txt Polish editor input and save dialog; update tutorial 2026-11-11 19:26:40 -05:00
README.md A honest reorganization. 2026-11-06 22:15:01 -05:00
selftest.sh Add debug benchmark suite and results folder shortcut 2026-11-03 10:16:18 -05:00
splashes.txt before ranged implementation 2026-11-02 16:19:24 -05:00
supermake.sh Add cube uniqueness controls and improve CAScript linting 2026-11-05 10:45:08 -05:00
title_screen_level Organization and planning 2026-11-03 19:48:46 -05:00
todo-now.txt A honest reorganization. 2026-11-06 22:15:01 -05:00
todo.txt Note why the public repo has no music and reshuffle roadmap order 2026-11-09 10:41:23 -05:00
use_legacy_font.txt Proto A-0-iv (Build 3) At least the question marks are showing up 2026-10-19 20:04:42 -04:00
win_compat.h Windows Compilation 2026-08-16 09:00:33 -04:00
WIN_COMPILE.txt Remove the unused GCC runtime and winpthread DLLs 2026-11-05 10:38:52 -05:00

WrldBox — Cube A

WrldBox is a work-in-progress cube RPG and C/raylib engine by P7MJ, part of wholeworldcoding. Levels, maps, item definitions, textures, music, and quests live in editable files alongside the game. The custom editor provides map, collision, texture, and script editing, with CAScript and CARA linting.

The engine currently includes melee and ranged combat, projectiles, swimming, inventory containers, item tagging, quests, manual saves, dialogue, and CAScript level scripting. Ranged weapons use ordinary items as ammunition and CARA files for their animations. War and the Cube A Vehicle Format remain planned work; the tutorial/content is still being developed.

Build and run

Run the game from the repository root: asset and configuration paths are relative to the working directory. Keep the data folders with the executable.

Linux

The game requires GCC (or a compatible C compiler), make, raylib, and the X11, dl, pthread, and math libraries. The Makefile uses the checked-in headers in include/ and raylib library in lib/. System development libraries are still required; the bundled raylib archive must be compatible with your platform.

make
./wrldbox

Build and run the editor from its own directory:

cd editor
make
./editor

The full Linux editor includes terminal, game CAS console, and build/run tools. The C linter is the default for CAS and CARA and does not need Python. View → C Linter switches between C (on) and Python (off). Python 3 is required only when selecting the Python backend. See the editor guide for editing and console workflows.

Windows (MSYS2 UCRT64)

Use the UCRT64 shell. Install GCC, raylib, make, and git there if needed:

pacman -S --needed mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-raylib make git
make -f Makefile.win
./wrldbox.exe

Build the editor from editor/, matching the Linux workflow:

cd editor
make
./editor.exe

The editor Makefile selects its Windows build automatically; explicit make -f Makefile.win also works. It links the bundled raylib DLL and copies its runtime DLLs beside editor.exe.

The Windows editor supports asset editing and native CAS/CARA linting. Its three console panels and build/test/run actions are disabled and display Use Linux to access this feature! Python is not required for this editor build. Compile and launch the game separately in UCRT64. See the Windows editor notes.

Root game builds also analyze music once and cache loudness profiles for the musicintensity() builtin (track-relative source loudness, 0–100). See music analysis.

Playing and creating levels

Use New Save, Load Save, and Options on the title screen. Controls are configurable in Options; consult its controls page for your current bindings. Saving is manual through the pause menu's Save Game action. Quitting does not automatically save.

newsavefile.txt selects the starting level for new saves. title_screen_level selects the CAScript level running behind the title screen. A level script loads its map, creates entities and interactables, and defines its behavior.

For development, load a script directly from the repository root:

WRLDBOX_SCRIPT=levels/combat_test_self.cas ./wrldbox

Normal launches print concise loading, initialization, and shutdown messages. Warnings, errors, and script print() output remain visible. Enable detailed Raylib logging with ./wrldbox --verbose or ./wrldbox.exe --verbose.

Project files

Path Purpose
src/ Game engine and CAScript interpreter.
editor/ Custom editor, platform support, and editor documentation.
levels/ CAScript levels and Python CAS/CARA linters.
maps/ Layered world maps; blocks use 16×16 world-unit chunks.
item-*-definitions/ Shared item/weapon stats, textures, and collision grids.
block-*-definitions/ Block textures and collision grids.
cara/, ranged-extras/, projectile-additionals/, projectile-collision-definitions/ Ranged animations and projectile assets.
cube-stat-definitions/, cube-texture-definitions/ Named cube definitions and skins.
font-definitions/, music-file-definitions/, quests/ Font glyphs, music tracks, and quest definitions.
saves/ Per-save state, inventory, quests, statistics, and script data.
options.txt Local settings and control bindings.
lint/, tests/, tools/ Native linters, regression tests, and development tools.
docs/ Language references and subsystem documentation.
home/p7mj/ Development notes, audits, and plans; these are not all current specifications.

home/p7mj/inventory.txt is an illustrative format example, not the player's live inventory. It includes an ellipsis placeholder and should not be copied verbatim into a save. Actual inventory files are saves/<save>/inventory.txt; they record numbered slots, nested contents, durability, and equipped slots. The on-disk slot numbering is one-based.

home/p7mj/revert.txt is historical documentation of October 16 rollbacks and restore points. Statements about HEAD, branch state, active bugs, or unpushed commits refer to that snapshot, not the current checkout. It has no runtime role.

todo.txt is the active checklist, refreshed on November 3, 2026. It separates current priorities, deferred work, and shipped features. The previous long backlog is preserved in the historical TODO archive; its old API proposals and dated bug claims require verification. The active list also records an obsolete quest-task marker required by the current startup helper, so launching the game does not append that task again.

References and checks

With Debug Mode enabled, Benchmark on the title screen runs the suite and writes bench_results_YYYYMMDDHHMMSS.txt. Open Folder opens the game working directory. The report summarizes average FPS, average script execution throughput, and fullscreen resolution, followed by individual measurements. bench_true_template.txt is used by regression tests; the game does not read it.

From the repository root on Linux:

./selftest.sh
python3 -m unittest discover -s tests -p test_benchmark.py
make -C lint
./lint/native-lint --root . levels/template.cas

Graphical checks need a working display. The full self-test also builds and checks editor/linter components; see selftest.sh --help and the linked guides for focused checks. For the benchmark report's exact formatting, the test suite uses the checked-in template.

Credits and licensing

Created by P7MJ as part of wholeworldcoding, with support from its members. The intended license for the project is MIT. A root license file and third-party license notices still need to be finalized; bundled libraries and assets have their own licensing requirements. See the distribution and licenses plan.

The music is by OctoLinkYT and is not distributed in this repository: the six octo-*.mp3 tracks are ignored by git and ship only in released builds, with the author's permission. See CREDITS.md for the terms, the track list, and the fallback the title screen uses when they are absent.