- C 92.6%
- Python 4.2%
- Shell 3%
- Makefile 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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>
|
||
| archive | ||
| block-collision-definitions | ||
| block-texture-definitions | ||
| block-texture-sources | ||
| cara | ||
| character-texture-definitions | ||
| character-texture-sources | ||
| context | ||
| cube-stat-definitions | ||
| cube-texture-definitions | ||
| cube-texture-sources | ||
| docs | ||
| editor | ||
| font-definitions | ||
| font-sources | ||
| home/p7mj | ||
| icon-texture-definitions | ||
| icon-texture-sources | ||
| include | ||
| item-collision-definitions | ||
| item-stat-definitions | ||
| item-texture-definitions | ||
| item-texture-sources | ||
| levels | ||
| lib | ||
| lint | ||
| maps | ||
| misc-texture-definitions | ||
| misc-texture-sources | ||
| music-file-definitions | ||
| projectile-additionals | ||
| projectile-collision-definitions | ||
| quests | ||
| ranged-extras | ||
| screen_definitions | ||
| src | ||
| tests | ||
| tools | ||
| weapon-texture-sources | ||
| win | ||
| .gitignore | ||
| AGENTS.md | ||
| bench-water.sh | ||
| bench_true_template.txt | ||
| CREDITS.md | ||
| editor-summary.txt | ||
| git_rollback.sh | ||
| glfw3.dll | ||
| libraylib.dll | ||
| Makefile | ||
| Makefile.win | ||
| MUSIC.md | ||
| newsavefile.txt | ||
| README.md | ||
| selftest.sh | ||
| splashes.txt | ||
| supermake.sh | ||
| title_screen_level | ||
| todo-now.txt | ||
| todo.txt | ||
| use_legacy_font.txt | ||
| win_compat.h | ||
| WIN_COMPILE.txt | ||
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
- CAScript guide and builtin reference.
- Ranged weapons and CARA.
- Editor guide and native linting.
- Benchmark workloads and report format.
- War design, a planned subsystem.
- Coding-agent instructions, including keeping both linters in sync.
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.