singe/testScripts/README.md

6.6 KiB

Test scripts

The Lua scripts used to verify the 3D scene and physics work, one per stage of PLAN.md sections 18 and 19, with everything they load: the Khronos Duck, Fox, BoxAnimated, AnimatedMorphCube and Sponza sample models under Models/, Box.png and crate.png. The disc and the font are the engine's own, addressed as Singe/menuBackground.mkv and Singe/FreeSansBold.ttf like any engine asset. This directory is a complete Singe game directory. Run one from the singe directory with

.builddir/Singe-v3.00-Linux-x86_64 -w -d data -v Singe/menuBackground.mkv testScripts/scene6.singe

(scene12 and scene20 have no disc: give them -C 720x480 instead of -v)

or pack it (singe --pack testScripts testScripts.game) and run an entry with --entry N (the numbers follow games.dat). Every script takes a screenshot or two and quits by itself; the results are in screenshots/.

Script Entry Stage What it shows
scenetest.singe 1 18.1 The 3D layer: a translucent colour over the disc, text on top
scene2.singe 2 18.2 Primitives, materials, lights, camera, sceneProject label
scene3.singe 3 18.3 glTF models: two Ducks, BoxAnimated, loose and packed
scene4.singe 4 18.4 Node animation at three speeds, one paused
scene5.singe 5 18.5 Skinning: three Foxes in Survey, Walk and Run
scene6.singe 6 18.6 The disc and a loaded video as materials, sceneUnproject
scene7.singe 7 18.6b Shadows: sun, sun and spot together, a point light inside
scene8.singe 8 18 An arcade cabinet from primitives with the disc on screen
scene9.singe 9 19.2 Physics: a crate stack, a ball, a kinematic paddle
scene10.singe 10 19.3 Physics: a trigger volume, collision callbacks, a raycast pick
scene11.singe 11 19.4 Physics: a hull down a ramp, a mesh torus, hinge, ball and slider joints
scene12.singe 12 19.6 2D physics drawn with sprites; runs with no GPU (SDL_GPU_DRIVER=nothing)
scene13.singe 13 18.8 Morph targets: the AnimatedMorphCube, animated and driven from script
scene14.singe 14 - The solid tangram dragon (Models/DragonModel.glb, a copy of assets/DragonModel.glb) turning under a sun with shadows
scene15.singe 15 - The Singe logotype as solid letters (Models/SingeText.glb, a copy of assets/SingeText.glb) turning under a sun with shadows
scene16.singe 16 - The dragon perched on the logotype, both models under one parent node, turning together
scene17.singe 17 20.1 2D particles: fireworks, a smoke trail, sparks off a 2D physics ball; runs with SDL_GPU_DRIVER=nothing
scene18.singe 18 20.2 3D particles: torch flame and smoke on a post, a fountain, dust, over the disc with shadows
scene19.singe 19 21.1 Character controller: the Fox on a course of stairs, a ramp, a jump, a crate, a wall and a steep slope
scene20.singe 20 21.2 Character controller in 2D: a sprite platformer (gap, step, wall, ledge); runs with SDL_GPU_DRIVER=nothing and -C 720x480
scene21.singe 21 22.1 Point-light shadows inside geometry: a bulb under a shade and a bulb in a cage, in a closed room of outward-facing boxes, inside and outside views
scene22.singe 22 23.1 Vehicles: a car from primitives on a ramp track, driven by a scripted route with a chase camera
scene23.singe 23 23.2 Vehicles: a tank that pivots and climbs, and a motorcycle that leans through a turn
scene24.singe 24 24.1 Water: a pool and a river; crates float, sink and drift, the Fox swims across, a raft drives
scene25.singe 25 25.1 Ragdolls: a running Fox crumples at a wall, one falls down stairs, one lies under motor strength
scene26.singe 26 26.1 Soft bodies: a flag, a sheet catching a crate, a swinging rope, a balloon
scene27.singe 27 - The Khronos Sponza atrium (Models/Sponza.glb, 18 MB: textures compressed to KTX2 with util/compressTextures.py --etc1s, then packed with util/packGlb.py; 99 MB of texture memory instead of 393 MB) under a sun with cascaded shadows, lit from above by a sky (sky.png) in place of a flat ambient, fog down the nave, the ACES tone curve, six braziers with flame, smoke and dust particles, each crackling in place (crackle.wav from util/makeCrackle.py); no disc, -x 1280 -y 720 -C 1280x720 (screenshots/sponza-nave, -atrium, -gallery and -columns.png are the four stops at 2560x1920)
scene28.singe 28 - Materials: roughness and metallic sphere rows before a brick wall with normal, emissive and metallic-roughness maps (brick*.png), each stop a different exposure and tone curve; no disc, -x 1280 -y 720 -C 1280x720
scene29.singe 29 - Animation blending: a Fox crossfading Walk to Run, one walking with Survey on a layer masked to its neck, one easing out of a ragdoll into Survey; no disc, -x 1280 -y 720 -C 1280x720
scene30.singe 30 - Sky and fog: the dragon on its plate and metal spheres under an equirectangular sky (sky.png from util/makeSky.py) lighting the scene, fog down an avenue of posts; no disc, -x 1280 -y 720 -C 1280x720
scene31.singe 31 - Culling and instancing: 400 dragons on a plain, the overlay reporting sceneGetStats and the frame time at four stops; no disc, -x 1280 -y 720 -C 1280x720
scene32.singe 32 - Bloom and views: a monitor showing a security camera's view of the Fox, a rear-view panel from a camera on the Fox, a lamp glowing with bloom, a name tag and icon billboarded over the Fox and a fixed text sign; no disc, -x 1280 -y 720 -C 1280x720
scene33.singe 33 - Navigation: a mesh baked from Sponza's geometry, the path along the nave marked with posts, six Foxes wandering between random points as crowd agents; no disc, -x 1280 -y 720 -C 1280x720
scene34.singe 34 - Terrain: hills from hills.png (util/makeHills.py) with a tiled brick texture from a KTX2 file (brick.ktx2), the dragon placed by terrainGetHeight, crates tumbling on the height field body; no disc, -x 1280 -y 720 -C 1280x720
scene35.singe 35 - Physics debug drawing: physicsSetDebug(DEBUG_ALL + DEBUG_STATIC) over crates, a ball, a hinged bar and a walking player, a ray cast drawn with lineDraw and the baked navigation mesh with navDraw; no disc, -x 1280 -y 720 -C 1280x720