Sandbox Logo
27 October 2020

New Engine

We switched engines again, but for the last time.
Garry Newman
Programmer
UK
It's a pretty open secret now that we've switched to Source2. 

I've got to start by saying a massive thanks to Valve for making this possible. It's easy to underestimate the amount of work that needs to happen to get something like this usable for people outside of the company. And especially during the pandemic when they're all working from home.. I have no idea how they're even managing that after having a glimpse at the size of their repos.

I've re-integrated the sandbox engine into Source2 and now I'm at the point where I was with the CSGO engine mentioned in the previous blogs. 

Well - technically I'm at a much better position because I've made a bunch of architectural improvements when porting.
A new codebase is like getting a huge mechanical horse dick dildo.

The first day you get it, you want to jump right in and jam it all inside you. But don't know what you're doing and you end up tearing yourself open and bruising your internal organs. You spend some time in hospital and have to tell everyone you were having your appendix removed.

Then you get home and see it sitting there. You want nothing to do with it. You've learned your lesson. You even consider whether buying the horse dick dildo was a mistake. Maybe you should have stuck with the smaller dildos.

But after a while the feelings of wanting something massive in your ass grow enough to make the risk of putting yourself in the hospital again seem smaller. Smaller - but not gone. This time you treat it with the respect it deserves.

So this time you're more careful. You consume it a bit at a time, you explore it properly and learn how it works before trying to use it. Every hour spent with a subsection of it gives you a greater knowledge of the whole thing.

After a few weeks of this you can see plainly what you did wrong in your original attempt and you feel like you're ready for another run at it.
The Panorama work I did using CSGO's engine translated to Source 2 pretty much perfectly.

I spent a couple of weeks a while back making a UI library with CSS styling in C# and made some pretty decent progress. It might be better for us in the long run to switch to that rather than using Panorama - but I'm not committing to that right now.
I've got it set up so when you edit code on the server it updates the code on the clients too. I found this useful in GMod, where you could open a listen server and have the game hotload around the clients while you develop live.

A couple of bonuses came from this. We should be able to have the stylesheets for the UI hotload too. And we should be able to let modders create their own custom string tables for whatever they want.
One big change in Source2 is the resource (models, material, textures) pipeline. My original intention was to have it so you could stick your fbx and png files in your addon and load them and it'd all be good.

On reflection I think S2's tools are way too good for us to discard. This is a lot of work because a LOT of code assumes you're using the game/content folder layout Valve use - and I don't want to work like that. So I'm working on bending it into a shape that will work for us all going forward.

This isn't to say that creating assets at runtime isn't going to be possible. It's still a big part of the plan.
I just wanted to this to be a quick update so everyone knows what's going on. 

We've only had the engine for a month and have been spending that time getting set up and exploring. I'm hoping to be able to post some progress and invite people to try it over the next few months.

I'm also looking for people to join Facepunch to work on Sandbox. Anyone with decent experience of Source1/Source2 - whether that's programming gamemodes/addons for Garry's Mod or creating maps.. at some point we're going to need people to help us make content. 

There's a job link in the header of this site if you think you fit the bill.