The Rust backend

After Rust took off we spent a week improving the back-end. Previously, deploying new versions was slow and bug ridden. It was compiled on someone’s computer (usually Pat’s). The whole thing was an ordeal – and a lot of the time Pat was the only one that could actually do it.

So, improvements were needed. Here’s what happens when we change something now.

Something Is Committed

Someone commits something to SVN. This can be code, or a model/texture/material/sound/etc change.

A build is triggered

Jenkins polls the SVN every minute. If a change is detected it tells the Windows build server to download the changes and build.

We have different jobs for the server and client. This means that the server and client can be built at the same time – halving the time it takes. Building was taking 40 minutes before on Pat’s PC. On our windows build server it’s taking less than 10.

A lot of this time is spent constructing bundles. We don’t want the player to have to download 300mb each time. So we create 60+ bundles – and try to keep the size under 5mb. We have found that if the size is under 5mb the browser will cache them – like it would an image – so the client doesn’t have to download them. These bundles are created and a manifest file is created – to signify which bundles are needed, and which order they should be loaded.

When it builds it commits the binaries to a different SVN.

Upload Client

Another Jenkins job. When it detects changes on the client SVN, it runs a php script. This script loads the manifest file and turns the renames the bundles to be crc hashes. Then it uploads the files to Amazon S3, so we can serve them nice and fast. We use CRC hashes because sometimes the bundles don’t change – so the client can keep using that bundle. But if it does change we want to be sure as shit that the client is getting the updated version. This was a fault we had previously – and causes a whole bunch of problems.

Once the bundles are uploaded, the PHP script sends the manifest file to our playrust server – and playrust creates a new version.

Testing New Version

Admins can test the new version immediately on the website. They have this box visible under the webplayer.

It shows the current ‘live’ version (green flag) and clicking on one of the versions allows them to switch to that version.

Make It Live

Once that’s done we can make it live in the admin section on the website.

The Future

Hopefully this whole system will mostly become redundant. It’s our hope to get on Steam eventually – and what I’m doing here pretty much re-creates the steampipe system. We don’t have a system for updating servers yet – we just use SVN – which has worked OK so far.. but probably won’t work so great once we let other people host servers.

With the Steam stuff – I think we’re going to go through the greenlight system. This is for two reasons. First of all I’d feel kinda like I was stepping on all the other people on greenlight if we went around it, and second of all – if it doesn’t get greenlit then it shouldn’t be on Steam in the first place.

Alpha Papa

The demand for alpha keys has been immense. Totally totally immense. We want to start selling access as soon as possible.. but we obviously can’t open that up for everyone or we will be swamped. So we will probably be putting a limit on it, so only so many keys a day will be available.. Hopefully that limit will increase over time as we optimize and make the servers support more people, get more regional servers of our own online, and start supporting third party servers.

77 thoughts on “The Rust backend

  1. Is it possible to even get a beta/alpha key anymore D: i’l have been looking everywhere! no 1 is selling them anymore/giving D:

  2. Ah i see so the game engine is unity right? But isn’t that webplayer and I thought Garry want to get it in Steam? Or will it be a standalone game in future?

  3. Unity is an engine, and it has a browser plugin so that games using Unity can be played in your browser.

  4. Just wanted to say I’ve been banned on face punch for telling people it was my birthday and wanted a few people to wish me a happy one, a ban for this? Seriously? Bit over the top moderators on there…

  5. Garry i love Gmod its the only game i really play on steam i saw it at a frineds house and bought it for my self i love your work and think its great how interactive you are with the players and the game. Im haveing a problem i keep getting error sings for a lot of the things how do i updae if thats the prob??

  6. ive been looking and your new game named rust and it realy looks good and id love to get a chance to try it out so i would love it if i could get a key thanks garry love g mod love you m8 keep up the great work on the game

  7. I would like this game i’m impatient to buy it . Pre-Alpha and its already amazing . Bye !

  8. This game looks amazing. Can’t wait to be able to purchase it. Anyone have an idea of the price?

  9. Hi Garry great job so far on Rust ! I am having difficulties locating where to make propositions as id like to help out as I can. So yeah here it goes :
    1) Crafting Levels, sure you can drop BP (and its easy but kinda kills the life of the game), instead have some bp unlocked by crafting levels.
    2) Craftable Compass (it shoes where your friends are but as a simple dot on the compass so that it doesnt get too unrealistic but still useful) Maybe it has limited range of 100m or so ? your the boss
    3) Missions (this is to give an objective to the game and give it with 1) a longer game lifespan. Missions could be obtained as various ways : message in a bottle (maybe if water and fishing is implemented), Sos message carved on random trees,
    4) Perhaps in the manner of Anarchy Online, dungeons that can either be discovered at random open locations that close when the dungeon has been completed (to avoid Player killers to camp static dungeon entrances), some of those dungeons could be mission related. Entering a dungeon would mean loading a different environment (cave, secret lab, prison etc….). Check out Anarchy Online because it was pretty awesome !
    5) Someway has to be found to limit the size (rather the amount) of buildings one player can create at a time, specially when one player is forced to create 20 fortress because his previous home was raided. perhaps it can be limited to a number of house components… based on the craft lvl, or the number of players gathered together to build (say i can only craft one floor, my friend crafts the second floor). Finally a building could be destroyed by killing its core (bf2142 style), it would look like a fireplace. The fireplace is responsible for controlling indoor lights.
    5bis) implement indoor lights, candles with animal fat, very slow burning, put inside the fireplace. or straight wood.
    6) Regarding combo lock doors, if you put door down you’re its admin you give a code that friends type in once and from then on they don’t need to input it every time unless you (the door admin press E for a long time and select “change door code”). Or pressing E creates a consumable called Key that you throw to your friend and they consume it. Pressing E on a door can either Create new key or Change lock.
    7) Buyable (yeah you need to earn money on this project for your team to keep working on it) skins (realistic skins not funky sh***) color taints for clothes, houses etc…

    Good luck and thanks for this awesome game base.

  10. Hi garry, Rust is great … realy !!! we are a french linux community who want to play on a private server and it’s hard to have some … so if you have 1 minutes … after you ;)

    SYA and realy ggod game … it’s hard , it’s fun and it’s cool …

    kill or not to kill that’s the surviving garry’s mod :)

  11. Hi Garry, I know you guys are away for the Steam Dev Days but I read some interesting things for the Zombie controversy / replacement. As I mentioned in a previous post on this thread, the game requires higher level objectives (i think caves/dungeons could be interesting in the long term).

    Regarding Zombies, each radtown could have its own occupying faction :
    – a military group
    – animals (wolf pack perhaps)
    – primitive tribe

    Killing one of these factions gives you point in the other factions ex : killing military gives points for animal faction, killing primitive tribe members gives military group appreciation and killing animals gives primitive tribes respect.

    Each faction has different combat aspects skills and stats, military group is slow (armored) but strong at a distance. Animals are super fast and very high damage, perhaps they come two by two, primitive tribe is a mix “in between” of the two previous, average speed, average armor and average damage.

    When you reach certain faction levels you are able to learn competencies (which are craft objects) :

    Military can teach you Sentry-Gun, hard to build but super lethal (like the robots in Portal 2) they can really protect your base. maybe even wall upgrades to really protect your base.

    Animals can teach you an object called perhaps “colar” which allows you to tame the wildlife. Having a wolf or a bear with you allows you to attack environment or players from a distance or track an enemy across a distance. You can bring it in your house and it stays in to protect you when you log out. (so it gives good offense advantages, but not as good as a defense as the sentry when it comes to protecting your house). maybe you could even control it in first or 3rd person and run around fast speed with it to explore your surroundings (this would make your body exposed to environment and players). The death of the animal forces you to retam an animal to make sure nobody spams you.

    Primitive tribe teaches you camouflage and traps. Camouflage allows you to lower your heartbeat(in reality you are hungry not as fast so you can camp long hours) and appear as perhaps a rock or maybe for now just being invisible (but impossible to move until you attack) Only bow can be used when in camouflage and breaking camouflage has a delay of a few minutes after you broke it. Traps are low tech traps (like vietnam war kind of stuff) and don’t require too much resources but limited in term of how many you can place in an area (perhaps an algorithm : the more you place traps close together, the further away you can then place new traps. like another region or something).

    On the longterm factions can teach you more and more stuff craft different armor, ex Kevlar, wolf armor (makes you run a bit faster, and makes animals unaware of you), ritual armor (medium armor but fast life regeneration or perhaps immune to bleeding)

    Perhaps it is through the factions that you can get new crafts and missions to access loadable dungeons (like Anarchy Online, missions have different kind of objectives, kill a named NPC, find a named NPC and escort him out to your bed…because it may be easier to do a trigger at your bed…houses could be anybodies lol) or retrieve an object layed on the ground. Each missions has stuff to kill to put challenges and different loading environments like prison, cave, canibal/bloody horror themed lair, advanced research lab etc…

    You could learn up to two factions out of the three and the more you kill a faction the harder it is to get back to a respectable level with them. Each faction crafts and items give you a different playstyle in the world of rust.

    Faction Houses : as you learn different traps/defense/ability objects from faction, you could learn building types, say the tribals teach you to make tree houses, military teaches you metal houses for extra defense, animals teach you to do a simple weed hut that you can move with you (the crates you put in stay in the hut and it all unfolds wherever you put it) or perhaps its a rock house with lots of animals that pop around to protect it…. perhaps you start building a small rock Igloo, and then place somewhere around a wolf dent which if you are attacked or someone is near your house will randomly send wolves chasing the invader’s arse. It would be awesome for a friend and me to play different factions, have different role in the gathering of resources and the defense of our kingdom because or difference in abilities through faction crafts.

    Anyways I just think that at this stage, the game is getting boring once you know how to do explosives, please don’t allow people to craft it because it kills the game and makes building houses useless. We can’t really justify glitches (like puting a crate on a spike wall) to be player creativity because it is a bit unrealistic and not fair (30 wood for a create – 200 for a large spike wall). Or make houses harder to build but close to impossible to destroy unless you get explosive from air drop. We want to have one base that we defend till the end, reconstructible if necessary. The way the game is : as soon as someone knows where your house is and raided it you have to move elsewhere or build s***loads of doors.

    Hope you can contact me id be happy to skype if you wanted to discuss further in detail objectives and end game possibilities.

    Have a great trip.

Comments are closed.