
A new update has been released, you can view the full changes on our blog post.
https://sbox.game/news/update-26-09-08-9668a58f
s&box now has 2D physics, powered by Box2D (yes, like Box3D). Switch the physics mode in your scene settings and bodies will simulate in the XY plane, using the same physics components and APIs you already know instead of having a 2D and 3D API split.
The Game Jam III has begun with a prize pool of £50,000. The theme is ONE MORE ROUND and submissions end on Fri 25 Sep
We've integrated it into the platform menu where entries are playable and voteable by the community. The structure is there for future game jams now, we can let the community run some, we can reward items for them, etc.
We've been using Yoga as our UI layout engine from the start, what this does is take all your HTML & CSS and decides where on the screen it has to go, the same way your browser does it on this page right now. Yoga could only do Flexbox layouts though and we wanted more. So we've replaced it with our own open source C# layout engine Sandbox.Layout. With this we can support more different ways to lay out UI elements such as `display: block`, `display: grid` and `display: inline`
Existing layouts should be exactly the same, and performance should be mildly better even going from C++ → C#.
Layout workloadYogaSandbox.Layout10,001-node flat flex tree: first layout5.40 ms2.22 ms10,001-node flat flex tree: changed leaf3.68 ms1.37 ms10,101-node nested flex tree: first layout4.99 ms3.54 ms10,101-node nested flex tree: root resize1.92 ms2.22 ms
We now support CSS grid layout, this is like Flex but makes it easier to lay your content out in an exact grid.
We've never really had a nice complete way to do rich text before, simple things like styled text wrapping across lines simply wasn't possible, everything was a block of content. Now you can do `display: inline` for content and it'll behave just like on the web, letting you style any bit of text without worrying about the layout.
We've added `position: fixed` which is like absolute positioning but the anchor point is always the screen. This is particularly useful for menu popups like...
There's a new `Sandbox.UI.Menu` system for menu bars and menus. This supports everything the editor version does, but you can use it in your games!
var file = new Menu( "File" );
file.AddOption( "New", "note_add", New ).Shortcut = "Ctrl+N";
file.AddOption( "Open...", "folder_open", Open );
file.AddSeparator();
file.AddOption( "Save", "save", Save ).Enabled = false;
The aim is to get these feeling as native as possible.. and right now they do. You can restyle them using css as you would expect.
Scrollbars, finally! They're built into the panel system and you toggle them with `scrollbar-width`. Suggestion would be to do `scollbar-width: auto` if you want them visible.
I'm pretty militant about not inventing our own css styles, so they use standard css styles like..
`scrollbar-width` - defines the width
`scrollbar-color` - defines the back and thumb color
`scrollbar-gutter` - overlay vs inline
The panel ui system now has a `TreeView` , just like the editor UI. This works as you expect, like a native windows control. It's virtualized, has selection, keyboard navigation, hover and row styling, renaming, context menus, scroll to item.. everything you'd expect.
Tooltips are better now. They work in PanelWindows (which the new launcher uses).
We've added `Panel.OnTooltip` - which you can use to build the tooltip panel. This means you can make nice rich tooltips, instead of being limited to the line of text like before.
I've revamped the color picker with several different layouts: square, hue ring, hue disc, HSV and RGB.
Movie Maker gets quicker timeline editing. Shift-click-drag can paint keyframe blocks into a range or remove them, making repeated timing work much less fiddly.
Export previews also use fewer resources, leaving more headroom for the scene being rendered and the rest of the editor.
The mapping tools have a new doorway primitive. It creates a doorway as one editable operation instead of making you cut and rebuild a basic doorway by hand.
Model normals and tangents now use signed-octahedral and diamond encoding, which basically means it looks better. TL;DR is that our old encoding format had a precision error up to 1-2 degrees, which resulted in various annoying artifacts that artists used to compensate by enabling expensive tangents in ModelDoc. (which is bad due to higher memory usage) I have replaced this encoding with a new format, signed-octahedral + diamond tangent, which provides much better precision (around ~0.2deg precision error) while keeping the same memory budget. What do you need to do as an artist/developer:
Just recompile all your models. Until models are recompiled, they will continue using old compression format
I think your custom shaders will auto recompile on the next editor launch, but make sure they are up to date anyway
Old cloud assets with outdated models and shaders will stay functional, but at the cost of higher memory bandwidth. If you have any models uploaded to cloud, please recompile and reupload them if you can!
This is a somewhat major change but it should not affect any existing assets, so even if you do nothing, everything should stay normal. Please yell at me if I broke any of your assets, attaching any logs/assets/repro projects will be useful.
Some users reported heavy stuttering even when their FPS looked fine. This was particularly noticeable for users who had Windows hardware-accelerated GPU scheduling (HAGS) turned off. We’ve reworked frame pacing so frames reach the screen more evenly, making movement feel smoother.
If you still encounter pacing issues, please let us know, as the problem may persist on certain hardware configurations.
Exclusive fullscreen mode has also been fixed and is now requested correctly from the driver.
We’ve replaced the remaining DotRecast pathfinding and crowd simulation with our own implementation. In synthetic tests, updating the pathfinding queue was 8.4× faster, and creating and planning paths for 100 agents used 63% less memory on the calling thread. Agent updates can also run across multiple cores.
There’s a new `CalculatePathAsync` API too, alongside fixes for stuck agents, link traversal and navmesh generation.
Small edits to large prefabs were copying far more data than they needed. We’ve sped up override calculation and undo recording, making property/component undo capture roughly 4–5× faster, with about 75% fewer allocations in synthetic tests.
For a prefab with 500 objects and 1,500 components, recording a component edit for undo dropped from 383 ms to 78 ms. We’ve also fixed issues with scene meshes disappearing when applying or saving prefabs, alongside issues with nested instances and object ordering.
And finally, the documentation got a much needed face lift to make information more discoverable and readable. The sidebar now has a quick filter, content has a table of contents and overall more consistent font sizes and contrasting text color.
UI & CSS
Block layout - Add block flow, automatic margins, and margin collapse. facepunch/sbox-public@a7b5147 by @handsomematt
CSS Grid - Support explicit and implicit tracks, repeat, fr, minmax, named lines, and dense placement. facepunch/sbox-public@a7b5147 by @handsomematt
Inline text - Support styled spans, wrapping, links, and selection in text-only content. facepunch/sbox-public@a7b5147 by @handsomematt
Fixed positioning - Add root-local overlays with position: fixed, not separate OS windows. facepunch/sbox-public@a7b5147 by @handsomematt
Menus and menu bars - Add cascading submenus, checkable and disabled items, and keyboard navigation. facepunch/sbox-public@29c4c2c by @garrynewman
TreeView - Add a virtualized tree with multi-selection, renaming, keyboard navigation, and context menus. facepunch/sbox-public@36291e6 by @garrynewman
Rich tooltips - Add Panel.OnTooltip and rich tooltips for panel windows. facepunch/sbox-public@a8eb15a by @garrynewman
Scrollbars - Add opt-in draggable thumbs, track paging, and scrollbar-width, scrollbar-color, and scrollbar-gutter styling. facepunch/sbox-public@547dc51 by @garrynewman
Physics
2D physics - Add Box2D scene physics using existing bodies and colliders. facepunch/sbox-public@ae6d488 by @aylaylay
Navigation
Async pathfinding - Expose cancellable CalculatePathAsync as a public API. facepunch/sbox-public@7676d90 by @lolleko
Editor
PanelWindow lifecycle - Add ownership, modal lifecycle handling, cancellable closing, and HideOnClose. facepunch/sbox-public@ec73038facepunch/sbox-public@5cbe294 by @garrynewman
Window controls - Add display geometry, fullscreen sizing, opacity, and stacking controls. facepunch/sbox-public@fbfb348facepunch/sbox-public@5bde5af by @garrynewman
Mapping
Doorway primitive - Add camera-aligned doorways with an optional arch. facepunch/sbox-public@db79f71 by @bakscratch
Particles
Particle controls - Add initial rotation and scale controls, plus sprite sequence lifetime control. facepunch/sbox-public PR #11450 by @ledernierpoisson
Movie Maker
Keyframe editing - Add Shift-click-and-drag gestures to create and remove keyframes. facepunch/sbox-public@f186283 by @metapyziks
Movie commands - Add movie_stop and an optional filename for movie_save. facepunch/sbox-public@8850001 by @metapyziks
Main Menu
Game jam page - Show the active jam's theme, schedule, prizes, and entries, with submission and nomination controls. facepunch/sbox-public@f17e21e by @garrynewman
Platforms
macOS source support - Add Apple Silicon client and editor support in source; distribution is still being prepared. facepunch/sbox-public@a180420 by @sampavlovic
🧼 Improved
UI & CSS
Color picker - Add five layouts, alpha and HDR support, saved and recent colors, and numeric input. facepunch/sbox-public@76dc0e0 by @garrynewman
Keyboard focus - Traverse focus with Tab and Shift+Tab and scroll focused controls into view. facepunch/sbox-public@9a16c2c by @garrynewman
PanelWindow input - Support mouse capture and Mouse.Delta. facepunch/sbox-public@f9e9f84 by @garrynewman
Editor
Prefab comparisons - Cache comparisons and use shallow undo snapshots where appropriate. facepunch/sbox-public@d89639b by @lolleko
JSON diff and patch - Reduce copying and allocations. facepunch/sbox-public@6b75aa2 by @lolleko
Gizmo sprites - Batch sprite rendering. facepunch/sbox-public@5406dd3 by @aylaylay
Orthographic navigation - Pan with right-button dragging. facepunch/sbox-public@b1f126a by @handsomematt
Navigation
Navigation performance - Use custom pathfinding and reduce allocations in crowd simulation and navmesh generation. facepunch/sbox-public@7676d90 by @lolleko
Mapping
Bevel limits - Support bevels beyond the previous 256 limit. facepunch/sbox-public@2430f60 by @wheatleymf
Mapping workflow - Align stairs to the camera and add face visibility shortcut help. facepunch/sbox-public@db79f71facepunch/sbox-public@0366f4d
Materials
Shader property values - Allow typed values beyond declared ranges while keeping sliders clamped. by @wheatleymf
Rendering
Model normals and tangents - Improve precision with signed-octahedral and diamond encoding at the same four-byte size. facepunch/sbox-public@01cd545 by @wheatleymf
Ultra preset - Lower shadow and fog costs and use a more conservative 12 GB threshold for automatic selection. facepunch/sbox-public@9de061b by @lolleko
Shadow caching - Reuse shadow maps across compatible views and spread local-light shadow updates across frames. facepunch/sbox-public@8f20bf9 by @sampavlovic
Assets
FBX importing - Replace the Autodesk importer with ufbx. facepunch/sbox-public@9882bd5 by @sampavlovic
Movie Maker
Movie storage - Use a shared movies folder with improved naming and cross-game importing. facepunch/sbox-public@8850001 by @metapyziks
Export preview - Match the panel size, use fewer buffers, and default to 2x MSAA. facepunch/sbox-public@67cf084 by @metapyziks
UI & CSS
Font rendering - Fix font-face load order and text outline color bleed. facepunch/sbox-public@4ebacdefacepunch/sbox-public@63bddd0 by @garrynewman
Empty text lines - Prevent crashes from newline-only labels. facepunch/sbox-public@387f295 by @ryleigh
Texture drawing - Fix transparent backgrounds in Draw.Texture. facepunch/sbox-public@9723a2e by @xezno
Virtual panels - Fix scrollbar behavior. facepunch/sbox-public@a689e65 by @devultj
Style updates - Schedule layout after inline style changes and rebuild descendant rules after stylesheet changes. facepunch/sbox-public@683f18afacepunch/sbox-public@1718425 by @handsomematt
UI sounds - Respect cascade priority. facepunch/sbox-public@958aa91 by @handsomematt
Editor
Prefab updates - Fix geometry updates, nested ownership, and dependency refresh. facepunch/sbox-public@5d3edd9 by @lolleko
JSON patches - Preserve unchanged siblings. facepunch/sbox-public@f5996ca by @lolleko
Project startup - Fix template startup settings and handling of unresolved GameSetup scenes. facepunch/sbox-public@69849f9facepunch/sbox-public@7c3487e
Change tracking - Fix bounds undo and scene dirty tracking, and mark input action edits dirty. facepunch/sbox-public@00133defacepunch/sbox-public@318b13e
Curve editing - Clamp group dragging while preserving spacing. facepunch/sbox-public@e8faf7f
Variant enums - Fix enum handling in Variant. facepunch/sbox-public@e27b62a by @handsomematt
Launcher delay - Fix delay handling in locales that use decimal commas. facepunch/sbox-public@ca97128 by @garrynewman
Native tools - Avoid crashes when native tools are unavailable. facepunch/sbox-public@695cbe4 by @aidencurtis
Gizmo transforms - Fix scope transforms in batched gizmos. facepunch/sbox-public@a0738bb by @aylaylay
Mapping
Mesh pivots - Fix pivot undo, preserve pivots when duplicating, and fix pivot controls in vertex, edge, and face modes. facepunch/sbox-public@84c0cacfacepunch/sbox-public@8ce8976facepunch/sbox-public@0c7c5a7 by @aylaylay
Mesh conversion - Preserve edge smoothing when converting between meshes and models. facepunch/sbox-public@9b88779 by @aylaylay
Terrain
Terrain updates - Synchronize rendering, collision, and notifications on undo, and apply correct terrain transforms to keyframed colliders. facepunch/sbox-public PR #11666facepunch/sbox-public@5341a33
Navigation
Navmesh updates - Clear stale tiles on scene switches and empty regeneration, and correctly rebuild geometry when non-blocking navigation areas change. facepunch/sbox-public@7676d90 by @lolleko
Navigation agents - Fix agent recovery and partial-path handling. facepunch/sbox-public@7676d90 by @lolleko
Materials
Material creation - Fix Create Material producing empty materials, prioritize selected textures, and recognize additional texture suffixes including opacity. facepunch/sbox-public@0a2c0f0 by @wheatleymf
Material transmission - Fix transmission interpolation. facepunch/sbox-public@4ba53e4 by @handsomematt
Rendering
Display settings - Honor the selected exclusive fullscreen option and recreate the surface when switching VSync.
Monitor refresh rate - Fix monitor refresh-rate handling. facepunch/sbox-public@de0aa65
Vulkan frame pacing - Remove a main-thread wait to restore CPU/GPU overlap. by @lolleko
Upscaling - Fix crashes during rapid resolution changes and prevent auxiliary render targets from applying or repeatedly reinitializing the main view's upscaler. by @handsomematt
Bone writes - Guard against writes using invalid bone indices. by @lolleko
Particles
Particle preview - Stop non-looping previews from restarting. facepunch/sbox-public@b8b8025 by @handsomematt
Platforms
Linux runtime - Fix .NET 10 staging. facepunch/sbox-public PR #11744 by @arcevalis
Dedicated console - Handle negative console widths. by @handsomematt
File watching - Handle inotify limits gracefully. by @aidencurtis
Networking
Lobby privacy - Preserve LobbyConfig.Privacy unless launch settings explicitly override it. by @devultj
Reconnection cleanup - Destroy resources before unmounting on reconnect. facepunch/sbox-public PR #11742 by @thelime1
UI & CSS
Yoga layout - Replace native Yoga with Sandbox.Layout; change display: block to display: flex where code depended on legacy flex behavior. facepunch/sbox-public@a7b5147 by @handsomematt
Assets
Autodesk and FBX export - Remove the Autodesk SDK and Hammer FBX export; DMX and OBJ export remain available. by @sampavlovic
UI & CSS
Inline content - Text-only support does not include embedded controls, decorations, or mixed flow. facepunch/sbox-public@a7b5147
CSS Grid - Template areas and subgrid are not supported. facepunch/sbox-public@a7b5147
Menu shortcuts - Shortcut is display-only; applications must handle the keys. facepunch/sbox-public@29c4c2c
Physics
2D API coverage - Not all 3D shape and joint APIs are supported, including heightfields and upright/parallel joints. facepunch/sbox-public@ae6d488
Rendering
Editor upscaling - Upscaling is disabled in tools and the editor Game view.