Skip to content

2.4.0

Latest

Choose a tag to compare

@rixnobis rixnobis released this 01 Oct 17:44
6e4a363

What's Changed

Four new subsystems and the Lua API to drive them. The Lua surface grows from 142 functions in 20 tables to 234 in 25, and from 13 event callbacks to 22. Full write-ups are in the docs: https://psxsplash.github.io/docs/

⚠️ Splashpack format v23 (Bandwidth)

Sprites, tilemaps and agents only exist in v23 packs, so re-export your scenes from SplashEdit 2.4.0 to use them. Packs down to v20 still load.

Sprites (Bandwidth)

2D sprites drawn between the 3D scene and the UI, with authored sheets and named animations
128-sprite pool, screen-space or bound to an actor
Real-time animation accumulator, so a walk cycle plays at the same speed whatever the frame rate does
Directional facing from a yaw, carrying frame and timer across the switch
Per-sprite tint, flip, layer and size, plus a global view offset with a per-sprite opt-out for HUD elements

Tilemaps (Bandwidth)

Grid-based 2D levels with per-tile walkability and painted objects
A tileset is a sprite sheet, so tiles animate and tint like sprites
Tile.MoveActor(actor, dx, dz) -- moves against the map axis by axis, so a diagonal into a wall slides instead of stopping
Tile.RayClear -- line of sight across the map

Networking (Bandwidth)

Serial multiplayer over SIO1, for two consoles on a link cable or many through a server
Symmetric handshake with host election, or slot assignment from a server
Automatic avatar replication, interpolated between snapshots
A reliable message channel for your game's own protocol, delivered through onNetData
Host-authoritative sync for shared world objects, and session persistence across Scene.Load
Net.Stats() for link diagnostics
Interrupt-driven receive on hardware, polled under an emulator
The server and bridge are game-agnostic and live in psxsplash/psnl_server

Actors and Agents (Bandwidth)

Actors: one handle for anything with a position and rotation -- what sprites bind to, what agents move, and what networking replicates
Actor.Find, Actor.GetPlayer, Actor.GetEntity, Actor.GetPositionXZ, Actor.GetNavRegion, Actor.FindPath
PSX Agent: NPCs that walk the navigation mesh natively, with vision (range, FOV cone, line of sight), hearing, up to 8 patrol waypoints and an eight-state machine
Seven new callbacks: onStateEnter, onStateExit, onTargetSeen, onTargetLost, onTargetReached, onPatrolPoint, onPathBlocked
Real A* pathfinding across nav regions (Bandwidth, Rix)
Input.BindToActor(player, actor) points a controller's built-in locomotion at any actor -- possession, local co-op and networked avatars all reuse the engine's movement
Camera.SetFollowTarget / GetFollowTarget / ClearFollowTarget do the same for the follow camera

UI (Bandwidth)

Canvases and elements draw in sortOrder and hierarchy order, matching Unity -- scenes with overlapping UI may look different
UI.SetFrame / UI.GetFrame switch sheet-backed image frames without touching VRAM
Up to 24 canvases and 256 elements

Controller and IRQ Hardening (Bandwidth)

SIO0 waits time out on a dead pad
Pads are initialised once per boot
IRQs are acknowledged with a plain write to I_STAT

Bug Fixes (Rix)

Online play no longer hangs on "connecting" when the server answers before the console is in a room
tostring() and Debug.Log on fractional numbers no longer crash the script, and negatives print correctly
Camera.LookAt pitch sign, Random.Range with negative bounds, and the RNG seed collapse
Lua allocations go through the out-of-memory handler again

Other

GTE math consolidated onto GteMath (Rix)
tools/splashpack_dump.py for inspecting an exported splashpack field by field (Bandwidth)
nugget bumped to the current psyqo

Thanks

Thanks to Bandwidth for sprites, tilemaps, networking, actors and agents, the UI work and the controller hardening, and to Rix for the pathfinding, the bug fixes and the GTE math.