Anarkis Gaming Wiki

Documentation Center for our games and mods

User Tools

Site Tools

[ Wiki Home ] - [ Anarkis Gaming Studio ] - [ Forums ] - [ Unending Galaxy Manual ]


ug:trading_system

This is an old revision of the document!


Trading System

Unending Galaxy uses a relatively straightforward economic system. Factories produce wares out of basic resources that can be found in some sectors of the galaxy (solar energy, various ores). More advanced factories build finished goods (ships, weapons, trading goods) with those wares. Stations lacking resources will buy at a higher price tag than those with an overflow.

Station Types

Factories

The factories produce wares periodically using resources, very similar to X. Except that coding wise, anything in the game is a ware, including ships, weapons and so on. So ship producing facilities can be put into the galaxy without additional coding.

Trading Stations

Trading stations collect wares produced by factories and act as the main trading hub of each sector, they can also act as resource sink if there’s an overflow of a particular product. And, of course, sectors lacking a particular product will buy it for an higher price than sectors having too much of it.

Trading AI

Each factory manages transport ships to buy resources and sell products. In UG, most of the decision process (where to buy, where to sell) is not done by the ships but by the stations. It can be compared to a mission board, factories post missions like “need 100 energy cells” or “10 javelin missiles available” to this board when needed. Then, at both the station AI level (local trading) and the faction AI level (inter sector trading), those missions are attributed to the most suitable trading vessels available. It’s fast and scale very well with crowded maps. Also, it can be incorporated into the mission system for the player with little effort.

Wares

Unending Galaxy, in its base form (not-modded), probably won’t feature as many wares as X3, firstly because I lack graphic assets to have a bazillion factory types, and secondly because I don’t really think it’s needed to have 10 or so variants of the same exact product. More isn’t necessarily better.

Ship Production

While ships can be bought directly from a 3rd party, they can also be produced. My game engine allows for individual ship (or weapon, shield..) production from factories, however this is not the approach I use here. Instead there's “Ship Parts” components that are produced by a relatively long (depends, it can be faction specific) production loop. Those parts, when transferred to a shipyard can then be converted into ships. How many parts are needed is ship dependent (bigger ship = more parts).

This system makes things much easier for the AI to keep ship production running and estimate its military strength accurately. Also it could lead to the implementation of interesting behaviors, like attacks of supply transports to keep an enemy war machine down.

Player Economy vs AI Economy

Like the AI, the player will be allowed to build stations and factories, have ship production units and so on. Micro management will be kept at a low level, as your trading empire will mostly be automated. There's no major difference between player and AI empires on the economic front.

ug/trading_system.1388417873.txt.gz · Last modified: 2014/04/26 12:57 (external edit)