Search Unity

Games Scraps: Modular Vehicle Combat - Vehicle combat with buildable vehicles

Discussion in 'Works In Progress - Archive' started by Nition, Dec 8, 2012.

  1. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I'm going try putting out scheduled fortnightly news on what's going on with Scraps. That way you can stay informed on what's happening, and if anything it might help make sure I'm always working on something significant as well. If there's a builder demo update to release, I'll probably do it at the same time. Right now things are in the middle of big changes, and things aren't stable or tested enough to release just yet.

    I've heard that in the USA the word "fortnight" has fallen out of common usage and "biweekly" is often used instead. Biweekly can be a little confusing - even some dictionaries have definitions both for "every two weeks" and "twice weekly" - so let's stick with the glorious Commonwealth and have fortnightly updates.

    Code, performance, bugs
    So what have I been doing recently? Mostly code cleanup and code refactoring so the game has a better base to move forward from. Some things were a bit of a mess internally, not horrible, but enough that it was letting random bugs start to creep in. This stuff has a little bit more work to do on it, then hopefully that'll be all that's needed for a while and I can focus heavily on new content. I don't want to be one of those people that spends forever optimising their code and never actually releasing games.

    Anyway, there's now a massive performance improvement when building large vehicles. No more long delay when adding or removing parts from vehicles that have hundreds of them. No short delay even. Parts and snap points now go into a couple of custom dynamic octrees, which lets me calculate stuff like "will this part collide with that part?" or "is there a snap point nearby?" much more efficiently. It's a big tree graph of what's in the world divided up into cubes, which divide into smaller cubes etc. If I draw in the edges of the cubes it looks like this, which the redder cubes being inside the bluer ones:



    For those who know octrees, the Scraps implementation splits or merges nodes as needed (when enough parts are added or removed), grows or shrinks the outer bounds as needed (when the vehicle gets bigger or smaller), and is a "loose" octree (which helps with stuff on the line between regions). It also converts any internal positional data to cancel out the position and rotation of the vehicle base, so the octree doesn't need to be updated if the vehicle base moves around.

    That last point (and some related work) also means that the vehicle no longer has to snap to a flat position when holding a part. Time still freezes, but it makes things a bit smoother. If Unity would let me compare oriented bounds instead of AABB bounds, this would have been possible sooner.

    More stuff:
    • Rewrote the whole system for checking weapon range availability. The old system started off simpler but had too many annoying edge cases to cover. All the vehicles I know of that had issues with the old system get correct results now. Hopefully that means everything does. The calculation of the "best" option for reducing the range to fit is also sometimes a little better now.


    • Bullets don't look like they're firing with their casings still on anymore. Oops. Bullets and their separate casings (large cannon, medium cannon, and casings only for the machine guns):


    There's also a crash bug in the current builder demo release where the game can crash going from the test map back to the build screen. Fortunately for players, but unfortunately for me trying to fix it, it happens very rarely. It also doesn't have any clear steps to reproduce. It happened to me once, so I've at least confirmed it, but repeating seemingly the same steps gave me no luck reproducing it again. I need to take a deeper look at it - it looks like something to do with the physics loop trying to reference something that's just been deleted as the test map scene unloads.

    The only other crash I've heard of is a crash right on startup, which is caused by an issue between the engine the game runs on (Unity) and some antivirus software. More info on that one here.

    M.A.V. - Sort of like Scraps with mechs
    A few people have asked for walking mech bases in Scraps. Although Scraps will eventually have a few more propulsion options (tracks, hover, maybe others), it won't have mechs exactly, but you might like to check out M.A.V.. You build a mech and fight other people's creations, it's also made by just one guy, and he's got functional multiplayer that looks pretty great. It's not available for purchase just yet but it's currently running a Kickstarter campaign, and doing pretty well by the looks of it too. Chromehounds and MechWarrior fans will feel especially welcome.
     
  2. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Managed to track down the owner of the defunct @Nition account on Twitter, who was happy to transfer the name. I'm no longer @_Nition, now @Nition!
     
  3. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Huzzah! It's the little things right?
     
  4. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    For the past few weeks I've been working on fixing bugs, improving performance where it was particularly bad, and generally cleaning things up to make way for smooth future development. That work is complete for now, and since it's all underlying mechanics stuff, it can also be ported into the builder demo release.

    Consequently, the builder release version 0.2.9.0 is now available for download with the following changes:

    2014-02 - 0.2.9.0
    Changes:

    • Significant internal code cleanup and refactoring to make way for smooth future development
    • Major performance improvements for building very large vehicles. Still room for further improvement
    • Vehicles no longer need to freeze to a flat position while adding parts
    • Bullets no longer look like they're firing with casings attached :]
    • Vehicle speed readout is now the total magnitude of your speed, not just the forward/backward speed
    • Improved snap point availability checking
    • Minor save file format changes (old vehicles are still compatible)
    • Improved the "tilt check" that automatically freezes the physics on the build screen if the vehicle tips too much
    • Removed two of the medium chassis front-side snap points as they were impossible to actually use except for placing armour (which clipped with the wheels when turning). Tried moving the wheels instead but they can't *quite* fit with room to turn in the 1.25m space available.
    • Power now starts fully charged, instead of fully depleted
    Bug Fixes:
    • Rewrote the whole weapon available range calculation system to use a new method. The old system was initially simpler, but seemed to have endless edge-case bugs
    • Fixed ramp position bug on test map
    • Fixed double-clicking on the save/load screen not working when the grid was scrolled down
    • Fixed suspension being linked when a vehicle is loaded if a vehicle was saved with suspension unlinked, but front and rear suspension values the same
    • Fixed SFX volume preview always playing at the old volume level
    • Fixed dropdowns closing when the scrollbar is dragged with the mouse
    • Fixed vehicle view zooming in the background when mouse-wheel scrolling in a save/load dialog
    • Other minor fixes and, let's be honest, probably new bugs too. Lots of internal code changes here
    Those of you with vehicles where your weapons weren't calculating their available movement range correctly, check them out (hover over the weapons on the build screen) and hopefully they should be better now. Keep in mind that weapons do need to be able to shoot straight forward to be allowed to shoot at all.

    Those of you with massive vehicles with hundreds of parts, try adding and removing parts on them now. It should be much much faster (especially compared to what it was), though there's still room for even further improvement in the future.

    I'm now moving back onto new features - multiplayer integration, new maps, Kickstarter rewards stuff, plus lots of other things to do. This may be the last builder demo update for a while since most of what's coming up only applies to the full release, but I'll keep everyone updated on what's happening behind the scenes. Major bug fixes etc will still be ported across as usual.
     
  5. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Found a pretty serious weapon rotation bug in yesterday's release unfortunately. I've now updated it with a fix, but if you've already downloaded it then you'll need to please get it again. Sorry about that.
     
  6. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Looking pretty good man keep it up. It's definitely feeling a lot more solid with each update ;)
     
  7. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    This week has been a little disrupted and the next two weeks are going to be worse, because I'm moving house. However:



    Dust Bowl
    Dust Bowl is a multiplayer map I'm working on, and I'm pleased to note that it's not just random lumpy hills scattered around like current the Test Map! It's a large sandy crater with repair pads around the perimeter.





    It's around 1km per side, which is pretty significant. Looking across the crater, a vehicle on the other side can be hard to spot, and not just because of the dust.

    Repair pads send up a beam of light, and allow you to call for evacuation to the build screen where you can repair and rebuild.



    The pillars of light also make repair pads easier to find when hidden behind terrain. On this map, two repair pads have decent shelter from surrounding hills, but it's a steep climb to get there. The other two pad are more easily accessible, but more open to enemy fire. As always, things may changed based on future play testing.

    That's all for now!
     
  8. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Just wondering, what's going to stop people from camping the repair pads? I mean, you can't really STOP people from doing it I suppose,
     
  9. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    So, at the moment a "repair pad" is actually more like an "evac pad". It doesn't repair your vehicle just by sitting on it (although potentially it could).

    Instead, when you enter a repair pad's circle, it "calls an evac" which in game terms means you've called a dropship to beam you up but it'll take a few seconds for it to arrive. In real terms it means that when you enter a repair pad, a five-second countdown starts. If you stay on the pad for the entirety of that five seconds, then you get "beamed up" back to the build screen where you can repair and rebuild using any scrap you've collected (collected scrap just turns into money to spend). If you leave the repair pad, the evac is cancelled.

    So, I'm at least avoiding the situation where you can just sit on a repair pad and get constant healing benefits from it. If you're repairing, you're not on the map. Players could still try and block it so that other players can't escape. I need to see how it works in practice - things can always be tewaked.
     
  10. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    A few bugs have been found and fixed in the builder release since I last mentioned the version 0.2.9.1 release, some more serious than others. I also managed to reduce the download size a bit so it's only around 40MB now instead of 60. Nothing's removed, it's mostly just got better compression.

    Fixes since 0.2.9.1:
    - Fixed a minor bug with part snapping and rotated parts
    - Fixed a weapon rotation range calculation bug
    - Fixed in-game camera clipping through objects and doing other weird stuff
    - Fixed a vehicle spinner bug
    - Fixed jittering of snapped (but not placed) parts while the vehicle is moving
    - Stopped mouse being grabbed on the initial loading screen
    - Fixed a bug with picking up parts in stacks in certain situations, which would leave the parts on the vehicle but remove their mass

    http://www.scrapsgame.com/download
     
  11. suruz

    suruz

    Joined:
    Jun 4, 2011
    Posts:
    36
    you have done massive development here... waiting for next update :)
     
  12. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Oh I meant more, camping to prevent the players from even reaching the bad, but that's cool :)

    Well, you could have it kind of like Planetside/Section 8 where you could choose a place on a map to drop?
     
  13. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Spawn points are separate from repair pads - you don't get to choose where to drop in but there are predefined locations that are usually near but not on a repair pad. We'll see how it works out.

    Anyway, as mentioned in the last update, work in the last couple of weeks has been a bit disrupted since I was also moving house.

    Here's a video showing a bit of new content though:


    What I called "Repair Pads" last time should probably be called Evac Pads. I could allow them to repair your vehicle just by sitting on top of it, but there are a few potential issues with that system:

    - It could repair damaged parts, but it probably shouldn't magically re-create destroyed parts
    - You'd have no opportunity to spend collected scrap metal on new parts, only on repairs
    - Most importantly I think, it'd be easy for one player or team of players to sit on a repair pad and gain a big advantage against everyone else trying to get to it

    So at the moment at least, repair pads are "evac pads." Entering its area of influence "calls an evac", which starts a countdown timer until the evac arrives. At the end of the countdown, the actual evac starts and you're beamed up back to the build screen, where you can repair, rebuild, and then re-deploy at any time. You can exit the evac pad at any time during the countdown or beam up sequence to cancel the process.
     
    Last edited: Mar 23, 2014
  14. Alarconte

    Alarconte

    Joined:
    Jan 8, 2014
    Posts:
    32
    LOVE the concept and playability (just test the demo). Wish lots of good work and luck in your project,
    Hope to see lots of building parts, and good gameplay.

    But also hope to see more thing than just vehicle combat (like base building, research, special missions..)
     
  15. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I'm the only one working on the game, so I necessarily have to keep things fairly simple or I'll be working on it forever (feels like I already am, just about). I would like to do at least some different game modes though.
     
  16. Alarconte

    Alarconte

    Joined:
    Jan 8, 2014
    Posts:
    32
    I'm in the same situation as you with my game, Just try to keep it possible but If you want to make a name/money, after the core of the game is done, some additional months of work for giving extra features that can call much more people, will pay all effort ;)
     
  17. prophet

    prophet

    Joined:
    Sep 8, 2009
    Posts:
    211
    I am looking forward to when you get this closer to release. Love the concept and its 1 of only 2 games on Greenlight that I subscribed to (The other is a robot builder).

    Edit: Wasn't this game on Steam Greenlight? Or am I delusional?
     
    Last edited: Mar 25, 2014
  18. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Yep yep, Scraps was on Greenlight and got Greenlit a while ago as well.

    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 - 0.2.10.0
    - 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 (some more info on that in this 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 here) 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.



    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.
     
    Last edited: Apr 21, 2014
  19. Chemaxmax

    Chemaxmax

    Joined:
    Jan 27, 2014
    Posts:
    204
    This game will be awesome :D I love the car builder but I miss more objects to destroy at the test screen :(

    I'll watch out for updates :cool:
     
  20. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Seems like that update had a crash bug in it that would occasionally happen when loading vehicles. :(

    I've updated the download with a fix that should put a stop to it.

    I suspected that it would be something to do with the new vehicle price previews I've added, but it turned out to be a recurrence of an older crash bug that I've seen elsewhere in Scraps before. Unity devs, I've gone into more detail in this thread on the Unity forums. It's a Unity engine crash but no-one seems to have ever reported it before and I've had no success reproducing it in a simple test project, so for now I've just worked around it (which luckily wasn't too hard).
     
  21. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
  22. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Looking good Nition, keep it up!
     
  23. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I opened up Scraps support for foreign language translations, and I'm seeing way more support than I expected, which is awesome although it's also creating a bit of extra work making sure everything is supported correctly. I didn't really expect anyone to do translations for free!

    This is the main thread for it on the Scraps forum: http://forum.scrapsgame.com/t/scraps-language-translations/139
     
  24. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I've put my octree implementation that I made for Scraps on GitHub: https://github.com/Nition/UnityOctree

    It's a dynamic, loose, general-purpose octree. Someone can probably make it faster and better than I managed, but it may be useful to some. It's easy to use and pretty efficient.
     
    Last edited: May 9, 2014
  25. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Seems like this is progressing nicely... if you need someone to do an English language translation, I'd be happy to help ;)
     
  26. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Haha, I've probably made some mistakes in the English translation somewhere.

    I've updated the main builder demo download to have the new multi-language support and a few other minor fixes. More info here.
     
  27. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I see the Unity forums have updated and destroyed the formatting on the first post. I've cleaned it up a bit but you don't seem to be able to have multiple images on the same line anymore (despite it showing as such in the post editor) so it's still not great. I removed some screenshots so it's no quite so stretched out.

    Anyway. recently I've been working mainly on multiplayer in Scraps. Here's a video update on what's done so far and how things are working:


    I've also put up a minor update to the builder demo (0.2.10.4), mainly because it includes a couple more language translations, but it also has a few bug fixes as well. Demo changelog:

    2014-06 - 0.2.10.4
    - Updated engine from Unity 4.2 to 4.5
    - Added Dutch and Norwegian language translations (likely to be some issues with layout in some places, but the text is there)
    - Canged weapon default link state to All instead of None
    - In-game camera control tweaks
    Bug Fixes:
    - Fixed projectiles flying through the glass on edge walls
    - Fixed a texturing bug on the medium chassis
    - Fixed centre of mass bug with rotated parts (thanks Carbon on the forums for finding this and the one below)
    - Fixed a bug with snap points being disabled in places where armour could actually fit
     
  28. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    Is your idea based on Robocraft, or did they steal it from you? Or is it just a coincidence that they look alike?
     
  29. NutellaDaddy

    NutellaDaddy

    Joined:
    Oct 22, 2013
    Posts:
    288
    Remind me of Kerbal Space Program. This is going to be the land version of KSP when it comes to building ,but being able to combat with your vehicles is going to add all the more fun. I love all the art styles you've shown us. This is a great looking project that I can't wait to see finished! This needs to be greenlit!
     
    Last edited: Jun 22, 2014
  30. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I think we both started making our games at about the same time. I put my game up before robocraftgame.com existed but I doubt they knew about Scraps when they started making their game. They're a bit ahead of me now because they have a team and I'm only one person.

    Scraps has a bit more of a focus on functional parts, and Robocraft has more focus on freeform designs. In Robocraft if you've got wheels they power themselves, your weapons just work etc. One of the main goals of Scraps is that most of what you put on your vehicle actually means something, in the sense that you need power for your weapons, and engine to drive you etc. I'm hoping that means you can be a bit more creative with what systems you use, and more tactical with what you target in a match as well. Think more MechWarrior than Lego Racers.

    Thanks! And I'm pleased to say it's already been Greenlit, I've just gotta finish the game now.
     
  31. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    Good to know. To be honest, I did not like the overal feel op Robocraft that much. You game looks better and with more depth.

    Good luck!
     
  32. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Thanks!
     
  33. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Oops, I had a fix for this but I forgot to merge it into the recent build. If your text caret (the little vertical bar) and selection highlighting is offset from where it should be in the save dialog, like this:



    I've just updated the build to put it back in the right place. It doesn't break anything - it was just a minor visual issue.
     
  34. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Wreckage

    Testing wreckage spawning with placeholder wreckage models.

    A scrap is a fight, but scrap is also junk that can be reused. When a vehicle part is destroyed in a Scraps game, it'll drop some wreckage. Nothing like the amount you see above, but enough that maybe you can scavenge some and get back to an evac pad, where you can spend it on improving your vehicle.

    To pick up scrap, you'll need something to put it in. So far, I've made this tall container:


    Pretty much like something you'd buy at Storage Box.

    The white fill bars and plastic viewing window help you - and your enemies - see how much scrap you're carrying. The lid also bounces around as you drive:



    Scrap that you pick up is divided evenly between all your containers. Scrap does have some weight, so putting all your containers on one side may not be a good idea.

    I'm going to anticipate someone suggesting an even cooler way of handling scrap collection by both proposing and debunking it as an option now: Wouldn't it be cool if the scrap you collected actually went into your containers? Like, the actual scrap piece sat in a container with its own physics, instead of this abstract representation on how full your containers are?

    Yes it would. It would be the coolest. You could try to carry too much while driving carefully like a combat version of Tricky Truck. You could ram people who were carrying too much to topple some of their scrap and steal it.

    There are two reason why that wouldn't work unfortunately, one much bigger than the other:
    • Minor reason: Getting physics-based scrap into containers. Dropping scrap correctly into containers on moving vehicles would be hard, but working out where there's space to spawn scrap inside a container would be a lot worse. There'd probably be some cases where you picked up some scrap but it didn't make it into the container properly even when it clearly should have.
    • Major reason: Network bandwidth. When scrap is spawned as a part is destroyed, it does its own special deterministic physics, ignores anything moving, and the server tells it exactly where to go (it's partly random, but the server sends a seed to use, like how putting a seed into Minecraft always gets you the same "random" map).
      Using actual physics-based scrap pieces flying all over the place, with Unity's physics being non-deterministic as well, would just be impossible. If scrap was just cosmetic, it'd be fine because it wouldn't matter if the server's scrap pieces didn't match the clients, but it can be picked up by anyone. So the positional data of every active piece of scrap on the map would have to be synchronised over the network all the time.
    So that's why I'm using a more abstract representation here. You can still destroy their container to get the scrap that's in it!

    Blocks

    New: Half-height blocks and slope blocks.

    I also made a few more cosmetic blocks this week. I will put these into the demo, but not right now: It's not in a good place to update right now because my demo branch is getting too out-of-date to merge changes into, but in the main game the vehicle building and testing process is a little broken and not tested properly since I've made lots of changes. When things are more stable I'll be able to put this stuff into the demo.


    This isn't Minecraft - We have slopes! This would be even better if the game calculated aerodynamics, which is a future possibility.

    I have one issue with half blocks that I'm not sure of the ideal way to solve. It's easiest to show via image:



    Any clever suggestions are welcome. For now, I've omitted snap points from the sides of half-blocks, which limits some arrangements but at least everything sits nicely.
     
    NomadKing likes this.
  35. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    I think it's an unavoidable problem that you'll encounter with this sort of system at some point of another. I don't really see there being an elegant fix-all solution that will work for all arrangements - at least not one I can see at 10am on only 2 cups of coffee!. Omission by design, like you've done, is probably the best way to go.

    Liking the scrap containers :)
     
  36. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi,

    Refactor the block units / attachment points to cover 1/4 the area (half as long, half as wide- power of 2 reduction in area), so the half height block is now 1 unit high by 2 wide, rather than .5 by 1. Otherwise have the .5 unit long axis actually 1 unit long in the system, but with .5 visual length.
     
  37. Phillsend

    Phillsend

    Joined:
    Jul 8, 2014
    Posts:
    6
    Very nice, loving the design here. Is it just you on this project?
     
  38. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Just me yep.

    Someone suggested this possible solution which is quite nice: http://i.imgur.com/XsU1cqD.jpg
    I'm wary of adding complexity to the build process but that would add it in a fairly intuitive way.
     
  39. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Over the last two weeks one of the major things I did was rewrite the underlying health system to be more universal, so any object in the world can have a health script that gives it hit points and destructibility, and health now works in single-player as well as multiplayer. To test the new system, I made the cubes on the test map destructible. They also drop some wreckage if they're destroyed. You can pick up wreckage now too:



    The pick-up effect if a bit silly, but at least it's obvious when you're collecting it. Parts of this stuff still need to be implemented fully in multiplayer.

    I did some bug fixing. Here's a fun one: When I picked up a container off a vehicle, the lids on every container would frantically fly around.



    My fault for trying to be clever and add hinge joints I guess. Anyway, this bug was easy to fix, so bouncing container lids are safe.

    Although I had destructible vehicle parts working in last fortnight's update, they wouldn't check for reliant parts. Now when a part gets destroyed, all reliant parts are destroyed as well. For example, hitting this extender block also takes out the containers:



    Right now they all drop as wreckage, but I'm going to make it possible for complete parts to drop in this sort of situation. There'll be an element of luck as to which type drops, so you can potentially get lucky and get a whole part to use rather than lesser-value wreckage to spend. It might be just the part you want, or it might not. I hope this system also inspires crazy franken-vehicles with a bunch of scavenged parts on them.

    What else... I did some work on the object pooling that Scraps does. I noticed that performance with vehicles that have tons of guns is often not too bad, but when their weapon hit effect plays sometimes performance stutters. This was partly because the explosion effects were created each time. Now they're kept and put away to be re-used which is a bit more efficient than creating them each time, and I also made the whole object pooling system more universal (I was already using it for projectiles) so I can easily pool just about anything.
     
    NomadKing likes this.
  40. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    NomadKing likes this.
  41. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
  42. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    I like longish posts!

    It's nice to read about the flow of how a standard game will play out. The color coded repair mode is a nice touch too :)
     
  43. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Thanks, I've been trying to write a decent news post every couple of weeks. It sucks when people just don't update for months, although given how long it takes to write up a news post sometimes, I've also gained some more sympathy for them.
     
    NomadKing likes this.
  44. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    PAX Australia is at the Melbourne Convention and Exhibition centre this year. There are two mandatory exam things that everyone doing anything at the centre has to fill out. The questions are... not very relevant to showing a computer game. Some questions from one of them:

     
  45. leoxs

    leoxs

    Joined:
    Jul 22, 2014
    Posts:
    21
    It's awesome, I want it. You are going to make it like a Moba?
    remembers me Robocraft, made in unity too
     
  46. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Well it's Multiplayer, and you can play Online, and you Battle in an Arena. So, sort of?

    And yeah, it's sort of unfortunate that Robocraft appeared not long after I started making Scraps. But there's been such a lack of customisable vehicle combat games in the past, I think the world can support two of them. They're also fairly different past the superficial vehicle building + combat similarities.
     
  47. leoxs

    leoxs

    Joined:
    Jul 22, 2014
    Posts:
    21
    Can I suggest a game mode?
    towers, if you destroy the 3 (or X) enemy towers, you win
    robocraft has only one game mode, so a lot of people will play your game with new modes :)
     
  48. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Initially there'll just be the melee mode which is your standard deathmatch sort of thing, although unlike Robocraft's game mode you can scavenge scrap from destroyed parts are get your vehicle out to repair or upgrade it before it's destroyed.

    But I fully intend to add more game modes in the future. There's heaps of cool stuff that could be done. For instance imagine a mode where one person can build a giant mega-vehicle and everyone else plays against them.
     
    NomadKing likes this.
  49. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    Boss mode! Sounds fun.

    Gotta love those 'general' questions from the convention centre. I encounter forklifts and oxy-acetylene equipment every day in Unity... don't you? :p
     
  50. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    I feel like I should be building a giant metal vehicle from Scraps since the convention centre is obviously expecting that sort of thing. Of course I'm only paying for an exhibit area that's about 1m^2 in size.
     
    NomadKing likes this.