f303d24f4a3af9eeb6726df64c333dbd791a6ed6
New src/dusk/perf module: a simple push/pop tick-stack (perfPush/perfPop/ perfReport) for measuring how long a labeled span of code takes, wired into engine.c's init/dispose. perfGetTick() is a placeholder - real time on DUSK_LINUX (clock_gettime) and DUSK_PSP (sceKernelGetSystemTimeWide), 0 elsewhere until a proper cross-platform answer is settled on. Used it this session to chase a reported PSP hitch when crossing a chunk boundary. Confirmed mapPositionSet itself (unload/load sweeps, chunk order rebuild, entity chunkIndex recompute) is consistently under ~3ms - not the cause. Along the way, found and fixed a real, unrelated bug: logDebug()/logError() on PSP did a fopen+write+fclose to the Memory Stick on every single call, which was massively inflating any perf measurement that logged from inside another measurement (the actual source of the ~29-128ms numbers first seen). That's now gated behind a new DUSK_PSP_LOG_FILE CMake option (default off). Also, as a real test based on this session's findings: - MAP_CHUNK_LOAD_CONCURRENCY dropped from 2 to 1 (8 and 4 both crashed/ were untested further on real PSP hardware; 1 is confirmed safe). - MAP_CHUNK_LOAD_DELAY_TEST: an intentionally exaggerated (now 50ms) artificial delay between starting successive chunk loads, gated in mapChunkLoadNext/mapUpdate, to observe the effect on framerate. All perf instrumentation call sites added during this investigation (assetChunkLoaderSync, assetMeshLoaderSync, mapPositionSet, the map area callback invocation, engine.c's frame boundary) were removed again once they'd served their purpose - only the reusable perf module itself and the two real fixes above remain. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Dusk
RPG Game Project, small and able to run on a PSP.
Building
Each build target has different requirements. You can take a look at the git workflow to see how the builds are done for each target. In addition, for accessing the editor and building the game on your host system, install the following packages, depending on your system;
Fedora;
sudo dnf install git make gcc cmake python python-polib python3-pillow python3-dotenv python3-numpy python-qt5 python3-pyopengl SDL2-devel zlib-devel libzip-devel bzip2-devel openssl-devel lzma-sdk-devel xz xz-devel lua-devel libmad-devel
libmad-devel (used for MP3 decoding) is GPL-licensed and ships in the
RPM Fusion free repository rather than Fedora's
base repos - make sure RPM Fusion is enabled first.
Ubuntu;
sudo apt-get install git build-essential gcc python python-polib python3-pillow python3-dotenv python3-numpy python3-pyqt5 python3-opengl libmad0-dev
Arch Linux;
sudo pacman -S git base-devel gcc python python-polib python-pillow python-dotenv python-numpy python-pyqt5 python-opengl libmad
Languages
C
89.7%
JavaScript
3.5%
CMake
3.1%
Python
2.1%
HTML
0.8%
Other
0.7%