A builder demo update and some technical details

First of all, I’ve integrated some of my recent work on Scraps into the builder demo release, which as always is available here. In this release:

2014-04 –
– Weapon tracers are now a post-render effect. Improves visibility at distance, and faster to process
– Added camera shake effects
– Added more terrain dirt FX
– Removed skidmarks effect
– Some graphics tweaks
– Added a screenshot key (F2 by default).
– Price is now in scrap (S) instead of dollars ($)
– Further performance improvements for loading complex vehicles, and picking up or removing lots of parts at once
– Vehicle price previews in save/load/select dialogs
Bug Fixes:
– Fixed view clipping through some objects. General improvements to looking around in-game
– Part tooltips now show mass in the selected way (kg or lb), instead of always kg
– Added workaround for a bug which caused weapon hit effects to sometimes appear in the wrong place (related Unity bug: http://bit.ly/1ekF3EQ)
– Minor engine sound fixes

The skidmarks code was always bad (complex and performance-intensive) and it also didn’t port well to the way I’m doing FX now: Vehicles used to create their own terrain FX, but now the terrain creates FX for any objects on it (see last fortnight’s post). Skid sounds and smoke remain.

The skidmarks code was also probably the only thing in Scraps that I didn’t really write myself – It was modified code originally from the Unity Car Tutorial (Unity’s tutorial code is free to reuse), and they’d used an… interesting method of drawing the skidmarks. Their method was clever, but it basically created a 3D mesh out of all the skidmarks in the scene every frame and then threw it out and did it again the next frame. Those thrown-out meshes would then get disposed of by the C# garbage collecter, using up a whole bunch of frame time a couple of times every second.

Unity’s Car Tutorial shown here taking 25% of a frame to garbage collect all the old skidmarks. Scraps’ skidmarks code was based on this, giving it similar issues. One can only hope that their engine code is better than some of their scripting…

So that’s been thrown out, but some other new dirt FX are in. The new camera shake effect (also mentioned last time) is pretty nice and IMO adds a much better feeling of force to vehicles with big arrays of weapons. It does have limits on it, so it’ll never shake the screen to the extent that it becomes unplayable.

Camera shake!

I’m not adding anything super exciting (like new parts) right now because I’m focusing on getting the actual game working well first: I like the freedom of being the sole developer on Scraps but I do have to prioritise carefully. So, I apologise that these playable updates aren’t super interesting and probably won’t be for a while.

Behind the scenes, things are a bit more interesting. I’ve been working largely on the multiplayer lobby for the past couple of weeks. In the lobby the host can choose a map, select the scrap cost limit etc, and players can choose a vehicle, chat, and indicate they’re ready. The basic  networking setup is working and it’s possible to start games, connect to them etc, but the whole lobby area still needs some work before we can finally make it right into an actual game.

The multiplayer prototype I have is sort of the opposite of that – it’s like a stripped-down version of Scraps that’s pretty much only the in-game stuff. I’ve also been tweaking some of the networking system there, but that still all needs to be ported into the main game. In the prototype, everyone drives a set type of vehicle, which is much simpler than the main game where people’s vehicle choices need to be passed around, verified by the server, shown correctly on everyone’s computers etc.

The server needs to load up vehicles it receives to verify that they’re within the cost requirements and haven’t been messed with somehow (they shouldn’t have unknown parts, floating parts, or parts overlapping). It can skip the visual stuff, but it still shares most of the loading code with build-screen vehicle loading, so that’s spurred the further reduction in loading times that you’ll see with big vehicles in the latest builder update.

Playing Games

There are three options for a multiplayer game of Scraps:

Join: Find a game and join it via LAN or Internet.

Dedicated Server:  Scraps has a server application that can be run separately to the main game, so that a PC can host a game without someone playing. It has an optional GUI that shows settings and status messages, but can also be run in no-GUI mode where it’s all in the background.

Host: From Scraps, you can host a LAN or Internet game. Hosting actually starts a local no-GUI server in the background and connects you to it, but the process happens invisibly. You’ll be dropped into a game lobby where you can then choose the details of the game. This is similar to the Dedicated Server option except that the server PC also has a player, and that player has some extra privileges (namely, they can change game settings).

The intention is for Scraps to have a Master Server online, so that anyone can create an Internet game and register it with the Master Server for other players to find. People looking for a game to join can then search for games and find people’s servers. Of course you can also play locally on a LAN.

Bookmark the permalink. Both comments and trackbacks are currently closed.


  1. dsquiggl897
    Posted April 22, 2014 at 2:06 am | Permalink

    no more skid art :(

    • bill
      Posted April 22, 2014 at 9:05 am | Permalink

      I like skidmark FX, so I may do my own implementation later.

      • CaseyJay
        Posted April 26, 2014 at 5:50 am | Permalink

        I too love skid marks (though i always wished they’d stick around longer).. is there a way you could just hide it in the options menu?

        • bill
          Posted April 26, 2014 at 10:26 am | Permalink

          Unfortunately the old skidmarks system wouldn’t work very easily with the new way I’m doing terrain effects either. I need to write a whole new system that’s more efficient – at which point I could probably let more skidmarks show at once as well.

          • CaseyJay
            Posted May 4, 2014 at 3:11 am | Permalink

            Haha awesome, I’ll just cross my fingers. :) Can’t wait to get in to dustbowl and do this:

  2. Perq
    Posted April 23, 2014 at 10:31 pm | Permalink

    Gibe gaem. : D Now. I feel like this thing is going to be really good. You really do care about it, and I feel like you’ll going to threat feedback about multiplayer seriously. We’re having too many companies (balance teams) ignoring community feedback, and rather looking at “marketing plots” of some kind.

    The amount of love you’re giving to this game – wow. I’m your fan already. : – D
    Seriously, that is kind of game I haven’t seen for a while (wonder why too), and if I knew how, I’d make it myself.

    • bill
      Posted April 24, 2014 at 10:43 am | Permalink

      Thanks! I’ve wanted to play something like this for a long time as well. For some reason no-one ever seemed to quit be doing it.