Repository navigation
Releases
Releases · RustingStudio/RustingEngine
RustingEngine v2.5.6
Added
GameScene::exiting(): game code gets one last update, with no tick andexiting()true, when the window closes, afterscene.quit(), and when a dedicated server gets Ctrl+C or SIGTERM (a console close on Windows), so it can write its save.App::run_exit_updateruns it for custom loops.save_dataalready writes through a temporary file and a rename (WILDROOT F25).rusting run --bench --jsonreportspasses_p50_ms, andrusting test --jsonreportsperf.render.passes_ms: GPU milliseconds per pass, per shadow cascade, and per opaque, terrain, foliage and sky part of the scene pass. The plainbench:output names the three costliest passes (WILDROOT F15).rusting.terrainlayers take optionalnormal(OpenGL-style normal map),roughness(red channel) andtiling(metres per repeat; 0 uses the terrain's) fields. Layers without them look as before (WILDROOT F3).- The net join handshake carries the host's world seed: the host calls
NetSession::set_seed(scene.seed()), a client readsNetSession::seed()after joining, directly or through a relay, and applies it with the newGameScene::set_seed. The wire protocol is now version 4, so hosts, clients and relays must all be updated together (WILDROOT F21). rusting.terraintakes a terrain-widetint(linear rgb, default white) multiplied into every layer and aroughness(default 1) that scales every layer's roughness. Changing only these two updates the terrain material without rebuilding chunk meshes, LOD groups or layer arrays, andGameScene::set_terrain_look(name, tint, roughness)sets them without a trip through JSON. A material color on a terrain now tints the blended layers instead of skewing the splat weights (WILDROOT F23).net::interpolate::Trackblends a remote object's plain(tick, position)samples for games that send their own snapshots, without a replica orNetTransform:push(tick, position)in any order,at(tick)with a fractional tick,newest()(WILDROOT F18).rusting asset import --linear(andreimport --linear) marks an image as data and cooks<name>-linear.rtexturebeside it, which thereferencefield points at. A plain image in a material's normal, metallic-roughness or occlusion slot now loads as linear data, from scene files and from the Inspector.AssetServer::load_linear_textureandassets::cook_linear_textureexpose both paths (WILDROOT F24).rusting.foliagetakesconform(default false), which sets each copy on the heightfield below it so a scatter follows hills, andlayers(default empty), terrain layer indices a copy must stand on, such as grass but not sand. Copies are placed again when the object, heightfield or terrain changes (WILDROOT F12).- Materials take a
swayblock (MaterialSway:amplitude,frequency,height) that bends every mesh using them in therusting.force_fieldwinds at its origin, in the vertex shader, so tree crowns sway for no CPU cost.frequencyadds gusts phased by position andheightkeeps the base rooted while the crown curves. The editor material inspector shows it, and cooked scenes move to format version 11; version 10 scenes load without sway (WILDROOT F13). rusting.watertakes optionaldeep_color,depth_fade,shore_foam,ripplesandripple_length: the surface fades to the deep color by the metres of water the view crosses, draws white foam where the ground nears the surface, and lights small scrolling waves. They read the opaque scene depth, which the renderer now copies for water even with reflections off. The defaults keep the plain one-color surface (WILDROOT F7).- glTF import accepts
KHR_texture_transform: the offset, rotation and scale the material's textures share are folded intoTEXCOORD_0, and textures with different transforms fail with an error naming the material instead ofUnsupported extension(WILDROOT F8). PlayerController::step(physics, body, shape, position, input, water, floor_pose, dt)runs one fixed tick of player movement from aPlayerInput(forward,right,jump,jump_held,sprint,crouch) instead of the globalplayer.*actions, so a host can move every peer's body, and a client can replay its own inputs for prediction, with the same code asrusting.player_controller. It returns the dynamic body walked into as aPlayerShove(WILDROOT F16).rusting asset bake-foliage <model> [--cards N] [--impostor] [--node NAME] [--tint RRGGBB] [--atlas PIXELS] [--out PATH]bakes a tree'sMASKorBLENDfoliage into crossed alpha-tested cards with one RGBA atlas (4 triangles per card), and with--impostora crossed-billboard impostor of the whole tree for the last LOD. It prints the source, foliage and card triangle counts.foliage_bake::bake_foliageexposes it to code (WILDROOT F9).rusting asset importandasset reimportrecord every file they cook beside a model (its.rmeshmeshes,.lodN.rmeshlevels,.rlodgroups and.rtexturetextures) in the new optional.rmetafieldcooked, and the report's newmesheslist gives each mesh's triangle count and its LOD triangle counts, so a 4-million-triangle tree shows up at import time instead of in a frame-time capture (WILDROOT F1).rusting docs show api/net,api/net::predict,api/net::input,api/net::interpolateandapi/procgenlist each module's public items, and every type, function, constant and type alias there has its ownapi/<name>page with its signature and docs, such asapi/PeerId,api/NetSession,api/fbm2andapi/RandomStream.Smoothing::correctnow says which position to pass asshown(WILDROOT F17, F18, F2).rusting lintwarnsLINT_TERRAIN_CHUNKSwhen a terrain draws more than 300 chunks (WILDROOT F11).
Changed
- Cooldowns have their own namespace:
start_cooldown(name, ..)keeps its end tick in the countercooldown:<name>, so a counter callednameis a separate value and a cooldown no longer overwrites it. Saves and scenarios load as before; a game that saved a cooldown throughsave_counterspassescooldown:<name>instead. Statuses keep their<object>/<effect>counters (WILDROOT F26). - Terrain layers are kept in a mipmapped texture array at full size up to 2048 px (was a 2x2 atlas of tiles cut to 512 px) and sampled with anisotropic filtering, so distant terrain shows no grid lines or moiré at layer repeats (WILDROOT F5, F6).
Fixed
- A
"realtime": truescenario timesNetSession::simulatedelays from each tick's planned time instead of the wall clock, so a slowcaptureframe no longer changes the tick a held message arrives on, and a copy of the scenario without its captures sees the same arrivals (WILDROOT F22). rusting asset reimportof a glTF recooks its.rtexturefiles next to the project copy, not only its.rmeshfiles, so a changed source texture shows. Reimport without--fromkeeps a project copy that was edited after the last import instead of overwriting it with the recorded original, warnsASSET_EDITED_COPY, and records the copy as the new original (WILDROOT F24).- The engine builds for Windows again: a zip permission literal had no integer type there.
- Fixed-tick code (a game's
tickfunction and everyFixedUpdatesystem) seesFrameTime::deltaequal tofixed_delta, so code that steps movement bydelta_seconds()in a tick moves at the same speed whatever the frame rate.Updatestill sees the frame's time (WILDROOT F19). - Terrain: the one-pixel vertical seam at the screen centre is gone. The atlas cropped each layer to 94% of its image, so every texture repeat drew a seam, and a camera at a round coordinate looking down an axis put one at the screen centre (WILDROOT F14).
- Terrain: layer
texture,normalandroughnesspaths are relative to the scene file, like every other scene asset path. Paths relative to the project root still load, with a deprecation warning.rusting lintandvalidatereport a missing layer image (SCENE_MISSING_ASSET) and a project-root path (SCENE_TERRAIN_ROOT_PATH), and a run logs once per path when a layer image fails to load instead of painting it white silently (WILDROOT F4).
Performance
- Foliage: wind lean of
rusting.foliagecopies runs in the scene and shadow vertex shaders instead of on the CPU, so a wind field no longer re-uploads every copy's transform each frame.Customforce fields no longer lean foliage (WILDROOT F13). - Shadows: each cascade draws only the casters inside it, at the finest LOD level any of them shows on screen, instead of every caster at full detail. WILDROOT's densest forest went from 13.2 ms to 2.4 ms of shadow GPU time, and from 25.8 ms to 17.1 ms per frame (WILDROOT F15).
- Terrain:
rusting.terrainchunk_cells0, the new default, picks the chunk size from the heightfield so a terrain makes at most about 150 chunks (a 1501 x 1501 island draws 144 instead of 2,209); an explicit size still wins (WILDROOT F11). - CPU physics:
TriangleMeshandHeightfieldcolliders test only the triangles under the other body's bounds through the mesh's box tree; one ball on a 1501 x 1501 heightfield steps in 0.05 ms instead of 40 ms (WILDROOT F10).
v2.4.1
v1.0.0
Full Changelog: https://github.com/GoingRusting/RustingEngine/commits/v1.0.0