singe/testScripts/README.md

4.3 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, 52 MB, packed with util/packGlb.py) under a sun with shadows, six braziers with flame, smoke and dust particles; no disc, -C 1280x720