Thursday, 26 April 2012

Loot problems!

Hey folks! Sorry it's been a bit quiet here, we've been having a few issues with various core gameplay knick knacks, discussions about the way forward as well as converting our code base from javascript to C#. However we're going to try our best to keep this blog updated more regularly!

Here's a write up of an issue we've been having:

Loot collection!

One ongoing gameplay problem has been about the method for getting items and metal to the player, which is a very significant element in the game.

There are two important primary contexts in which the player will be killing enemies and getting loot: directly (being there in person) or indirectly (not being there in person). While there might be an easy solution for getting the items over to you (giving it directly to the player), it's just too easy and not necessarily the most fun. We want a nice raw physical method, in chime with the way the player deploys items by crudely lobbing crates.

So, for the economy to fully circle remotely away from the player, they must have a definitive solution for retrieving loot from any location. Otherwise, if one of the player's turrets out in the desert kills an enemy, the enemy will drop their loot in an arbitrary location that your system simply will not know about or have any capacity to predict, and more unfortunately, neither will you. The orphaned loot pick-ups will just time out and die, which is just lost income to the player, given that they spent money to kill the enemies in the first place. So we came up with several possible solutions to cover this economy gap.

At first we thought about an environmental method, how the player could use walls to funnel the enemies into a specific area so that when they die they will drop their loot around that choke point. However, we figured that it would be too situational and limit the system to a certain structure, which is just no fun. We want to give the player as much control as possible while keeping the requirements of a "system" to be as minimal as possible.

After that, we tried a various selection of radius checking magnets that pull loot towards your system by force, but these had to have a rather small radius as large area checks are significantly expensive for the CPU. Due to this restriction it required a lot of them to cover a sizeable area which is just as bad computationally, not to mention them conflicting amongst themselves and with over movers.

By this point we came up with a way to define what we are trying to do and why: we figured that for the movers, we can refer them as being either "specific" when you know exactly where the item is coming in from and where its going to go (conveyor belt) or "unspecific" when you have no idea where it's coming from but you do know where it's going.

From that, the "item collector" deployable came about, which seems to have nicely solved the issue. Item collectors are tower-like buildings that will pluck loot from an enemy death triggered by the player, from anywhere in the world within a distance, transporting the items from where they are to a single nearby point specified by the player. From that point, the player will be able to ferry the loot to their movers now that they know where it's all going to go. The item collector is going to be the rudimentary catalyst for all trapping systems.

Q & A time!

“What about the camera? Will it be 1/4 views, free view or static?”
We've experimented with different cameras but we're planning to implement a direction focus camera similar to a lot of 3rd person console games, perhaps with an additional automatic alignment based on the player's relative move direction.

“Will there be a friendly fire mode? aka will your own traps harm you?”
We are currently playing around with friendly fire and damage masks. However, in terms of traps and the player, being able to fully interact with your traps will help you test it properly but that is just the general idea so far.

“I'm guessing that the lever can only be used by the player, but is there a way to set the proximity and pressure triggers, to be activated by the player only/enemies or both?"
The lever can be used by anyone but at the moment there's no way of filtering usage. That would be a nice idea though, we'll add that, thanks!


  1. Hehe, when I was reading the whole issue description and I was thinking the same thing you decided as a solution. Also about robot collectors for some stupid reason =/

    What intrigues me a bit is how the enemies will interact with the buildings/deployabes.

  2. C#... So there is no chance for native version for linux? Ouch...

    1. Regardless, Unity has no Linux builds anyway :(

  3. Because I just bought it on Good Old Games recently, I'm going to waffle at you about my favourite loot collection mechanic ever.

    In the 90's DOS game Magic Carpet, everything you kill explodes into large golden balls called 'Mana'. They pull towards each other ever so slightly, and when they touch, they combine into a larger ball. (or a larger sprite of a ball!) So you have all these golden balls that slowly collect in nooks and valleys and on the shores of rivers and lakes.

    To collect mana, you tagged it with your colour. that's it, it belongs to you and contributes to your score. But Other players and NPCs can tag your mana back. So - a hot air balloon departs from your castle (you have a castle), floats over to a your tagged mana and collects it. It moves around the map collecting mana until it is full, and it returns to base where the mana is protected. (unless someone levels your castle to the ground).

    The reason this was so fun, was because you got to race around tagging other players mana, even as their balloons collected it. Or track down an enemy balloon and kill it, then taking the mana it was carrying for yourself.

    But this also led to a sometimes annoying game of micromanagement, as you darted between various pools of mana warding off other wizards in a tagging war until your balloons showed up.

    Anyway, I love the mana and balloon mechanic so much I will happily spew forth about it at any and every opportunity.

  4. Another suggestion.
    I'm assuming you'll have both NPC's and other players. When a player dies and drops their loot, don't let it be collectable (or at least, not completely eg. some special item that gets drop doesn't get sucked up by your collector towers).
    Instead notify everyone of the fact an item's dropped.

    This would create a brilliant cost-benefit analysis situation. Do I go for the item, knowing someone's just died to something there? Do I leave it, but it might be an opportunity to get something good, or better yet I can use it to lure out another player and get them!

    Of course, I don't know the full spec of your game, but it could be a good opportunity!