This week, we bring your more behind-the-scenes dev team insights into Star Wars Galaxies. We hope that you enjoy learning more about how the game works from the inside Today AdeptStrain stops by to talk about our spawning system!
Hello all! Ever wonder how that that Womp Rat scuttling along the ground got there? What about that Rancor who is chewing on the head of your brand new 60 point mutated Blistmok? Well, with Game Update 15 we expanded our spawning system a bit and I thought it would be nice to give you a little peek under the hood at how that system functions.
The Region Spawning Tool
Behold, the Region Spawning Tool! Crafted by Teesquared eons ago (with some help from Microsoft Visio); this tool allows designers to control the various region types on any planet. This includes no-build regions, spawning regions, and the newly created GCW regions. While at first glance it may look like some form of torture for anyone who didn't enjoy geometry class in school, the tool actually does a great job of laying out information in a visible format that is easy to edit and understand. By selecting a region and editing its spawn properties, we get a look at what creatures/spawns a region is able to use.
Fun Fact: the 'specs' of colors on the region map above are an actual snapshot of player housing that Teesquared took from a server to help us get a vague understanding of where players are placing their homes. This map happens to be for Tatooine.
Regions in Star Wars Galaxies have a list of any number of spawns to pick from. Each spawn can consist of any number of creatures as you see in the editor below.
Each spawn can then have properties set like the area size needed to create the spawn, limits to how many can be spawned (if any), the weighting to use in the selection process (which I'll explain in a moment), and the object to use to represent the lair of a spawn (if any). In Game Update 15 we added GCW options to the spawn parameters, meaning you can decide if a particular spawn can be chosen depending on the current GCW standing of any region or the planet itself. If a region contains GCW options but the current situation doesn't meet the region's requirements, the region is not considered for that round of spawning.
So how does the system choose which spawn to use? When it comes time to create a spawn (generally caused by a player wandering into an unpopulated area of a region), the system compiles a list of potential valid spawns. Now, here is where the weighting comes into play. Say we have 3 potential spawns: Cupa spawn with a weighting of 5, Womp Rat spawn with a weighting of 5, and AdeptStrain's mystery creature with a weighting of 10. This basically means there is 25% chance of a Cupa spawn, 25% chance of a Womp Rat spawn, and a 50% chance of spawning the harbinger of doom known as AdeptStrain's mystery creature. So now we can use a value between 1 sum total of all the weights to find out what to spawn:
Fairly simple, right? Obviously there is a lot more to the system (retries when a spawn fails for whatever reason, checking against server constraints, dealing with spawns across sub servers, etc) but this is a high level view of the spawning system and how spawns are chosen.
I hope you all have enjoyed this little look at some of the tech that makes the virtual world around you move and function. We definitely have some very interesting creatures/spawns coming down the pipe sometime this year that will have some of us busy with this tool for quite a while. Oh, and in case you thought I was joking about the mystery creature here's a piece of it.
Till next time!
-Matt "AdeptStrain" Boudreaux
__________________
<Please insert something witty of your own choosing here>