Blitz3D+ Guides

Prototyping and diagnostics in Extended mode

Stage 8 adds small, direct tools for understanding a scene while you build it. They are optional, do not require an editor, and add almost no work when unused.

Immediate debug drawing

Call DebugLine, DebugPoint, DebugBox, DebugSphere, or DebugGrid before RenderWorld. The queued shapes appear through every active camera and then clear. Pass False as the final argument for an always-visible overlay. The queue holds 65,536 lines and reports dropped lines through diagnostics.

The entity helpers show live engine state: DebugEntityBounds, DebugEntityAxes, DebugCameraFrustum, DebugLightVolume, DebugSkeleton, and DebugEntityCollider.

Frame statistics

Read frame queries after Flip. RenderTriangles counts executed main-scene triangles, including every instance, but excludes shadows, debug drawing, and 2D overlays. Memory figures are committed allocations rather than estimates. RenderGPUTime is non-blocking and returns -1 until an older timestamp is ready.

DrawRenderStats x,y,flags combines the counters without changing drawing state. Bits 1, 2, 4, 8, 16, 32, 64, and 128 select timing, geometry, memory, shadows, detail, animation, particles, and diagnostic-count rows.

Structured diagnostics

CountDiagnostics and the one-based Diagnostic... queries expose warnings and errors to your program. Identical records are coalesced and DiagnosticRepeats reports their count. The store retains at most 256 records, favours errors over old information messages, and reports overflow. DrawDiagnostics is the quickest on-screen view.

Capture

CaptureScreenshot arms the next Flip or FlipCanvas; it does not replay or present the scene twice. This includes a world rendered through RenderWorldToCanvas and its target-local 2D overlay. PNG and BMP are supported. CaptureFrame also writes a text report containing renderer settings, counters, scene totals, and diagnostics from that frame. Use CaptureStatus and CaptureError to show success or failure. Only one request may be armed at a time.

Projected decals

CreateDecal returns an ordinary entity, so parenting, transforms, visibility, order, and CopyEntity work normally. Use DecalSize and AlignDecal to place it over opaque or masked geometry. Alpha and additive blending are supported. EntityReceivesDecals entity,False opts a receiver out. The nearest 256 visible projectors render; excess projectors are diagnosed.

Live texture and shader editing

ReloadTexture decodes into temporary storage and swaps only after success. WatchTexture polls an opted-in file after it remains stable, so a half-written save is not used. Failure keeps the previous pixels and is available through TextureReloadError and diagnostics. Source-backed shaders use the same last-known-good rule automatically.

Built-in shaders

AliasModeParameters
builtin:unlitsurfacebrush colour, alpha, Texture
builtin:toonsurfaceBands, ShadowColor, RimStrength
builtin:rim-lightsurfaceRimColor, RimPower, Strength
builtin:dissolvesurfaceAmount, EdgeWidth, EdgeColor, NoiseMap
builtin:grayscalepostStrength
builtin:vignettepostStrength, Radius, Softness, Color
builtin:bloompostIntensity, Threshold, Radius
builtin:color-adjustpostExposure, Contrast, Saturation, Tint

Aliases are case-insensitive and use packaged bytecode, including in a standalone executable. CopyShader, named parameter commands, GPU skinning, automatic instancing, shadows, and camera-effect ordering work like file-backed surface/post shaders.

See the self-contained samples and the command reference.