1. Wayward Terran Frontier: Zero Falls
  2. News
  3. Development update

Development update

[p]I got really distracted by a series of projects and didn't make a blog post about new upcoming features. I plan more of those in the future because I'm not done talking about new things that are already in the engine. However, the projects that have kept me very distracted for the last few weeks are worthy of their own discussion so here's a breakdown of everything I've been doing recently. It all started with...[/p][p]...So I got an art asset for the hangar bay.[/p][h3]Remapped every station[/h3][p]It's nice and big and looks like where you would land your ship in order to have it packed into an item so that you might go and do some shopping. That means I got to spend a good deal of time remapping EVERY SINGLE STATION IN THE ENTIRE GAME. Which was loads of fun. Also created some new stations while I was in there.[/p][p]I've now got all the stations that need to be placed by world generation ready to go. That includes:[/p]
  • [p]Single corp item shops[/p]
  • [p]Mining stations[/p]
  • [p]tier 1 mega mall trade hub station[/p]
  • [p]tier 2 mega mall trade hub stations[/p]
  • [p]university stations[/p]
  • [p]libraries[/p]
  • [p]habitat stations[/p]
  • [p]farming stations[/p]
  • [p]hospitals[/p]
  • [p]factories[/p]
  • [p]military bases[/p]
  • [p]etc.[/p]
[h3]Made shop categories[/h3][p]Having recently remapped every single station asset in the entire game I started thinking about the shipyards and the shops that would sell items in the stations I was mapping, as well as the trade goods that you would buy and sell at the trade depots. This lead me to spend some time making a whole lot of different shipyard and item shop categories tied to various corporations in the game.[/p]
  • [p]Tier 1 ship venders[/p]
  • [p]start station sells specific ships[/p]
  • [p]tier 2 ship venders[/p]
  • [p]faction reputation reward military venders[/p]
  • [p]specialist shops that sell tweaked and tuned ships with remapped interiors[/p]
  • [p]shops that sell turrets[/p]
  • [p]shops that sell consumables[/p]
  • [p]shops that sell tools[/p]
  • [p]shops that sell crafting recipes[/p]
  • [p]etc.[/p]
[p]These shop categories are defined in sqlite database tables with the goal being to make it as easy as possible for mod makers to define their own shops.[/p][h3]World-gen algorithm[/h3][p]I also started thinking about how these shops would be placed into the world and came up with a fancy new system for actually filling world engine with content. if World Engine is a framework for streaming content into the session that is generated by stories, what I needed to make was a system for building those stories. Specifically my system had to solve some as yet unsolved problems like..[/p]
  • [p]what trade items are produced and what trade items are needed?[/p]
  • [p]how many mining stations should exist in a system based on population?[/p]
  • [p]how will mod makers design their own procedural star civilizations using only database fields?[/p]
[p]That last one was the most interesting to me. Basically, I had made some hard-coded stories that would just place shops and mining stations and other items into systems, but what I really wanted was for players to be able to provide the input parameters that would determine how a civilization procedurally generated its space.[/p][p]The system I came up with uses internally a deck of cards and some weighted priorities for different star systems and it basically works like this:[/p][p]First you define which stars will be occupied by your star empire. This means putting some X and Y coordinates into a sqlite database table representing the coordinates of star systems that are owned. At the same time, each star is assigned a priority which is just a number representing how "developed" that star system should be.[/p][p]Next you define a deck of "population" cards. Each card represents a type of population that has a specific effect on a star system's development. For instance a retailer card creates a market district if one does not already exist, and then adds a shop selling specific items. A prospector card sets up a mining district and adds a mining station to it. A settler card colonizes a planet, or raises the population of a planet by 1.[/p][p]The system then plays cards on the systems assigned to the star empire they are assigned to in order to build up those systems with populations and infastructure.[/p][p]These cards also create and consume resources system-wide. So districts know that they have a local desire for certain item types, and star systems have a list of items they are short on or that they produce in abundance, and that allows for procedural trade routes to be created that will send NPC agent trade ships flying around the galaxy.[/p][p]Also (and this is one of the most important point of all this) this system lets me set the prices of trade goods at trade good depots procedurally. I do NOT want to set every price in the galaxy by hand. However I do want you to be able to make a profit by buying trade goods for cheap in one location and selling them for more in another.[/p][h3]Mod support[/h3][p]The cards are defined in a database table as a bunch of string values that are super easy to modify, and the cool thing about cards is that each one defines a name field for their corporation, the asset that population should use, and the shop category it should create. When used by world generation these fields determine what art asset will be placed into the world, and those art assets are also defined in the database, meaning you can just insert your own custom ship and station art, give it a unique name, and assign it to any card.[/p][p]The result is that star empires build up all of their stations and all of their npc agents using assets that come from the world parameters database, and mod makers can define an arbitrary number of world parameter database to be included in world generation.[/p][p]That means that all you need to do is modify some tables in an sqlite database and you can build an entire star empire with custom art assets for every station and ship and the contents of every shop and the ships used by the military and the reputation rewards and the warlords etc.[/p][p]These assets live in the world engine database, meaning the engine supports as much custom content as you can fit on your hard drive. Every asset that gets displayed in a session is loaded in real time from the database and the only constraint on memory or vram is the quantity of stuff spawned into a single session at any given moment. There should be no limit to how big or complex you can make a custom world generation aside from the amount of time world generation will take when building the world.[/p]