Raph recently gave an interview at the Austin Game Developer Conference, during which the topic of Star Wars Galaxies and its resource system came up. It didn't take much for me to start thinking about the way I wanted to handle resources in Tile Tactics, or the more idealised version in my 'dream mmo'.
When I say 'resources' I mean materials that are used to make items in a game, specifically ores extracted from the ground.
Most massively multi-player games tend to keep this aspect of game play simple, using 'resource nodes'; an object in the game world that you walk up to, click on a few times to swing your pickaxe at, and then loot your resources before moving on. So it is very much like a monster that doesn't move and that doesn't fight back. The location of nodes are typically static, so even if a node disappears due to being mined out one may typically reappear in the same location (or very near it) a short while later.
Some 'worldy' game worlds take it a bit further. EvE Online is an entirely space based game, where you play as a spaceship, so it has you extracting resources from asteroid belts.
My old mining barge. Now probably a pile of rust!
As with all things in EvE this is a much more time intensive activity. By effectively shooting the asteroids with your mining lasers you slowly take quantities from the rock which are placed in to your cargo hold. Each asteroid has a finite, yet varying, quantity of units each, so once you extract everything it will disappear (when asteroids are gone from a belt they may not reappear again for a few days).
Efficient mining in EvE is all about effective time management. The large mining lasers may cycle for a few minutes before they return any resources to your hold, so you need to know when to prematurely deactivate your lasers should the need arise; you don't want to have gone through three minutes of a cycle to find out you've only picked up one unit of ore! That means keeping an eye on how much is left in the asteroids while also making sure your cargo hold doesn't fill up (and making sure your massive-cargo-hold transport ship buddy keeps coming by to pick up your ore to bring back to the nearest station) and keeping and eye out for NPC pirates (or other players in lower security space).
While it may not be the most intensive activtiy in gaming, it is not exactly something you can walk away from for a few minutes.
Star Wars Galaxies was a bit different altogether.
With other games finding the resources is typically very easy, but with SWG finding the resources was half the fun.
The best image I could find of the SWG survey tool interface (the bit in the background)
There were a number of different resource types, ranging from minerals to 'wind' to animal hides. Animal products like hides and meat had to be taken from dead creatures, so that was a resource gathering game for the combat orientated players; the rest you had to survey for, which was the domain of the 'artisan'. There were survey tools for each main type of resource, listing all of the currently available resources for the planet you were currently on. In most games iron is iron is iron, it is always the same, but with SWG each time a resource spawned it was unique. The system would procedurally generate a new alloy/variant of one of the main resource classes (iron, copper, inert gases, woods, etc), giving it a unique name and stats (which ranged from 0 to 1000 for various attributes).
It would also generate a unique distribution map for where the resources could be found on each planet it had spawned on (the same resource was typically on more than one planet). You would have to use your survey tool to scan the surrounding few hundred metres, which would then display the concentrations on a small top-down map on the survey tools user interface. You would then have to travel in the direction where the displayed percentages were rising to try and find a hotspot of the resource vein, avoiding nasty creatures along the way (and to a dedicated crafter everything is nasty!). You could end up following a vein only to have it max out at 60%; if the numbers were rising too slowly as you covered ground it was a good bet that you were chasing down a dead end. What you really wanted was the coveted high 90's spots, that way you could make the most of your mining time while the resource still hung around, because after a while that resource would vanish from the galaxy never to be seen again. When that 999 Conductivity, 999 Overall Quality Copper suddenly makes an appearance it creates a gold rush, because when it's gone it will be gone for good! Everyone and their ewok would be looking to get in on a piece of that action.
"There are fields, endless fields, where resources are no longer born, they are... eh, grown?!"
(From Raph's interview above he states that resources could be 'mined out', which means they would last for a shorter period of time if enough people were mining it right away. So there could only ever be a finite amount of any particular resource. I was a bit surprised by this as I figured it was an infinite source with each resource lasting about one week. Although I guess it does explain some unreasonably
short spawns!)
When you found your spot you could place some mining installations to extract the resources for you, so that it could do the gathering while you go off and do something else. All you'd have to do is check in ever once in a while to empty the hopper and top up it's power and maintenance reserves. You could also do manual sampling, which many people did do (when they didn't strictly have to after levelling up their skills) typically using macros so that they themselves could then get away from the keyboard while their character pulled in ore.
The extraction rates worked on the basis of a mining installations Base Extraction Rate and what concentration of the resource it was placed over. A BER of 14 placed on a 90% site would yield 12 units per minute. With around ten installations you could get over one million units of the resource before it vanished. So other than upkeep, you could pretty much place and forget.
Tile Tactics had resources pretty much at its core;
it was the descendant of a game all about 'digging' after all.
Resources were distributed across the map in a way similar to SWG, but it went one dimension further by using numerous layers. The first four layers were to be accessible to manual digging by avatars, but the four extra layers below that were only to be accessible by a mining structure placed on the map
. The deeper you went the more likely you were to find the rarer ores. The multiple layers also allowed for the possibility for three dimensional veins of a single resource, with the quantity of each layer in each tile being finite.
Mines would first extract the ore from directly beneath them and then begin to move out in ever increasing circles on the X/Y plane, with the further from the centre it went the less efficient its extraction rate became. The player would have the option to focus the mine in a particular direction in order to follow a vein, providing fewer inefficiencies the more focused the direction. The not-entirely-fleshed-out thinking was that this would force miners to make strategic decisions on where to place their mines and which veins to follow.
Veins were intended to stick around for a while with them only slowly vanishing as they were mined out. The presence of the resources is what gave any particular tile value and hence was the incentive for a player, or groups of players, to want to have territorial control over that area.
There were also to be regularly generated 'challenges' whose winning conditions would be along the line of "control the most land that contains the most of ore X for the longest period of time over the next week". The rewards for such challenges included the "Genesis Device", a stackable item that would allow the players to have some form of control over how resources would be re-spawned in an area (the bigger the stack, the greater the control).
The algorithm for
reseeding resources was pretty straight forward.
- A random tile within the spawn area (on the target layer) was picked.
- If no resource currently existed at that location a search, out to a certain range, from that point was made.
- If no resource was found in the outward search then the resources were added to the original tile.
- If a resource was found in that search that location was then used to add more resources to the map; either adding to the resource in that tile or to an adjacent tile.
- If the found tile was 'full' the adjacent layers on that tile were also examined for the possibility of placing the resource there too. This would then act as a seed/anchor when resources were spawned on those layers
- Repeat up to the threshold limit
The seepage from one layer to another at 'full' locations is what would create the 3d veins but also allow for veins going in different directions per layer, but merging at hotspots. This means the decision of where to place a mine wouldn't be so straightforward as to place on a simple 99% concentration spot.
As previously posted, Tile Tactics never got put through its paces to any degree, so I never really found out if any of this was feasible. But I'm still curious as to how this would play out, so I started putting together a small protoype in Metaplace.
I used Metaplace to connect to the same 'genesis' php script linked above; but outputted in xml. This didn't quite work out with a 50x50 map with 4 layers as I hit barriers on the Metaplace end with memory allocation and Infinite Loop detection errors, so I'm start with 25x25 and 2 layers; "Metaplace: we talk the web... just don't talk too loudly or too fast!"
At the moment it is very simple; place a mine, turn it on, and watch it mine out an area outwards from its location (at a very fast rate).
After I get the mines to extract from a set direction, mining across layers, distance inefficiencies, and get multiple layers working on a larger map, I'll start a 'game' where each player can place one mine on the map and then see who can extract the most in a set time (or very quickly processed set number of cycles), where the strategy or skill is in picking the correct placement given multiple rich veins across multiple layers.