Pre-Order the Game!

Desura Digital Distribution

Monday, July 30, 2012

Resources and Population

I'm in progress of implementing "Resources" into the game.  Instead of having resources hard-coded, they are defined in a xml file.

Each resource type have several attributes:  "Storable" (can be stored between turns, or be converted into another resource type), "ConvertsTo" (which resources it converts to if it's not storable, as well as how much of that resources it converts to).  It also defines which icon and display text to show.

For example, food would have "Storable = False", and "ConvertsTo = "Billion Credits,0.5", so for each extra food not consumed this turn, you get 0.5 BC.

Region types, region specials, and planetary specials also defines which resources they produce and consume.  There are six attributes that you can define for each region/special/building:  "produces", "consumes", "multiplyProduce", "multiplyConsume", "addProduce", and "addConsume".  Produce types are resources generated, and Consume are resources that are consumed.

The base "produces" and "consumes" are how much of resources consumed per unit of population.  So if a mining region has this: "produces=Ores,2", it would produce 2 Ores resource for each 1 unit of population.

MultiplyXXX multiplies the amount produced or consumed.  So if you have an automated factory that doubles the industry generated, but also consumption, it would have "multiplyProduce=Industry,2" and "multiplyConsume=Ores,2"

AddXXX adds the amount after the population factor has been calculated.  If the above automated factory adds 3 industry and consumes 3 ores regardless of population in the region, it would have "addProduce=3" and "addConsume=3"

Races also can have those attributes as perks/weaknesses.  For example, Zero People have no use for food, so they have "multiplyProduce=Food,0" which forces the race to never output any food.  The only way is if the region or planet has a building that "addsProduce=Food,X".

This will allow people to really mod the regions, resources used, and racial perks.  Also, I plan on having research projects consume resources (Research Points will be a resource), so I can have some technologies require some exotic materials such as radioactives or rare gems to research.


Now, for population.  I've been kicking around the idea of having each race define how much population per region they can have for each planet type, instead of having the planet type define the amount.  As an example, right now, it have 15 population per region for terran planets.  So if a terran planet has 8 regions (as shown in previous screenshots), it has 120 max population.  If Zero People prefers the Arctic planet type (they love the cold, it's good for electronics), Humans prefers the Terran, Space Hamsters prefers Steppe, and Salix Cybornia prefers Jungles, it'd make for a more racial feeling, instead of making them be the same except for attributes and graphics.

I could then have them define different regional population limit for each planet type, but then the problem arises.  If Humans and Zero People occupy the same planet, and shares all the regions, and the climate is Arctic.  The humans would then have a population limit of 5, and Zero People have limit of 15 per region.  Obviously it don't make sense to add them up for a limit of 20, or you'd just fill every planet with every race.  The question then is, how do it allocate the "space" between the two races?  If I use a "space percentage" in that Zero People uses 25% less space for arctic (base of 10, so it uses 7.5 space for 10 population, and 10 space for 15 population), and 100% more space for humans (base of 10, but have 5 population since each uses 2 space), it could work, but would be so complicated that the players would just get confused.  There's no simple answer to this, aside from restricting each region to have only one race.

If there's only one race for each region, there will be UI issues that I will need to resolve.  So, unless a good solution is found, I will scrap this idea of having different racial region max population for each planet type, and just keep it the way it is now, with the planet type defining the max population.

Ideas and suggestions are welcome!

Sunday, July 22, 2012

Regions and direct routes

I've fleshed out the system window out a bit more, this is what it looks like normally (as if no planets have specials), so don't expect any more major changes for this window in the future:

I've also taken the opportunity to implement "Invisible Starlanes", or a lane connecting every star to every other star that won't be drawn.  I also implemented "speed modifiers" so you can modify starlanes and "off route"'s speeds in data files.  Currently, going direct, off road, costs 5x as much time as a normal starlane.  I also added a keypress (control button) to determine if you want a direct route or fastest route.  Sometimes you want to use direct route to surprise your enemies.  What this means is that the game now supports either starlanes (aka MoO 3) or no starlanes (aka MoO 1/2).  Here's what it looks like with either option:

Fastest route:

Direct route (with control key pressed):

I still need to add amount of turns indicator, but that's for later.  Next up is the planet management UI!  Feedbacks are welcome about the UI or design approaches.  I want this to be a worthy successor to MoO 1, so I'll need your opinions!

Saturday, July 21, 2012

Regions implemented, mostly

Whew, this has been a big task implementing regions.  Here's a preview of the new system window that shows the planets with their regions:

There's a bug with planet naming which I will fix later.  But for now, let me explain the new region view.  Any inhabitable planet will display a region circle that shows the type of region.  The first planet has 7 regions, second has 10, my planet has 8, and last planet has 7.  The region alternates brightness, starting from middle left, and goes clockwise.  Unfortunately with first and last planet, the first and last region have the same shade, making it look like one big region.  However, I consider it unimportant, since players will get used to that.  My planet's first 2 regions are Industry, and you can see two yellow regions, one a bit darker than the other.  Then farm, research, and mining, with last three undeveloped.

You now can specify the starting planet's regions in the data files, the result is what you can see from the above screenshot.

I'm not done yet, as I've had to rip out the old production system as well as the old specials, which means you can't build stuff now.  I hope to get production up again soon!  But first, I need to implement specials for planets (radioactives, special minerals, etc) and finish the UI stuff for the system window.  I want each planet to show its population and specials, as well as a numerical display of number of regions.  Then I'll work on the new UI for Planet management.  At that point, the planet management will be final and won't be changed for the rest of development.  Yay!  Then System/Empire production where you can actually build ships and research new technologies, yay!

This new system also resolved an design issue.  I wanted to allow renaming of planets, but with the old system showing only planet numbers, I couldn't figure out how to do that.  This new UI solves that!

Let me know what you think of the new UI!  For now, I'm off to bed!

Thursday, July 19, 2012

Revisions of my previous post

While running the planet management ideas through my mind, I realized several issues with my last post.

If a region is "purchasable", and immediately producing full outputs on next turn, empires with large pockets will have an advantage over those with poor economy.
Racial perks/negatives would be limited because regions' outputs are independent from population.
Planets will lose their uniqueness because you can just spam mining or industry regions without consideration to the racial population.

Therefore, I'm revisiting my region approach.  Instead of "buying" a region, each region will have population capacity.  The more people there is in a region, the more the region produces its output.  Also, the population in a region will be responsible for developing regional buildings.

So I will implement two exclusive systems:  Population Allocation and Output Allocation.  Let me explain what those are, then I'll explain why I'm adding two systems.

First, Population Allocation will be a list of sliders for each region (undeveloped regions included), one slider for each race.  This is not the same slider system as in MoO 1, rather, this is more like MoO 2's system of population allocation.  Except that each region have population limit, and you can define which output each region produces.  If all regions have full population, then the sliders will be all the way to the right for each region.  However, if the planet's population is not maxed, you can allocate population between each region.  Beyond Beyaan default gameplay will use this system.

Output allocation is similar, in that there's a slider for each race in each region.  The difference is that this follows MoO 1's system in that all sliders added up equals to 100% allocation for each race.  If you were to make a MoO 1 clone, each planet would have 5 regions when settled, (defense, research, industry, environment, and ship), and you can allocate outputs between those 5 regions.  The bonus is, if you make a MoO 1 clone, you can have multi-racial output (assigning all Psilons to research, and all Klackons to industry for example)

All sliders can be locked/unlocked for ease of management.

Why two systems?  So you can mod the game to use one of the two approaches.  If you were to make a MoO 2 mod, you'd want the "Population Allocation" system.  If you want MoO 1 mod, you'd use "Output Allocation".

In either system, each region must be first built before it can produce output.  You can tweak the colonization process so that it creates one or more regions automatically on colonization (so for MoO 1 mod, it'd create 5 regions, they can't be changed to other regions, and every planet have only 5 regions).  Beyond Beyaan will have colony ship land and have no regions developed, and no population, it's basically an outpost.  I will implement migration so that people will automatically flow from crowded planets to new planets to ease micromanagement.  Again, this can be modded to have no migration if you want.

There will be buildings.  I know that I stated earlier that there won't be buildings, but then I realized that part of the fun of 4X space games is development of planets.  So there will be region-wide and planet-wide buildings.  Region-wide buildings impacts that region, while planet-wide buildings impacts all regions.  For example, if you have a building that adds 50% population cap to a region, each region that has that building have its population limit increased.  If you have a building that generates a planetary shield, it reduces damage taken for all regions during a planetary bombardment.

And finally, the region's output will be affected by racial bonuses.  Let's say that a region produces 1 research point for each 1 population in the region.  There are 6 "Scientists" with +0.5 research point bonus, and 2 "Brutes" with -0.5 research point penalty, and 2 Humans with 0 bonus. It would be 1 * (10 pop) + (6 * 0.5) + (2 * -0.5) + (2 * 0) equaling 12 total research points.

If you invade a planet, you have a chance of capturing the developed regions.  For each region captured, there will be a chance of acquiring a technology.  If a building exists that you don't have technology for, there's a high chance of obtaining that building's technology.


With that out of the way, I'm currently working on overhauling the planets in code.  I just wrote a pixel shader that allows me to draw a circle around a planet showing all of its regions in their respective color when viewing a list of planets in the system.  For example, if a planet have 6 regions, and 2 are military (red), 2 is industry (blue), 1 is research (yellow), and 1 is mining (brown), then you'll see a circle with 6 sections with those colors.  I've drawn a sample picture to illustrate (this is not the artwork for in-game, just concept art):

This will allow you to take a quick look over your planets and see what they're producing at a quick glance.  Undeveloped regions will be gray.  I will also update the planets list window where you view a list of all planets to use this as well.  I hope to have an in-game screenshot soon!

Sunday, July 15, 2012

Planets and economy

As you may know, often when I'm not working on the game, I think about it and how to solve different issues.  Ever since I proposed the idea of three separate economies (planet, system, and empire), with research being rolled into empire production level, I've been gnawing on several issues:

First, with those layers of production, there's a lot of micromanagement.
Second, planets don't feel as special.  It'll end up whoever gets the most planets wins.

I really dislike tedious micromanagement, but love rewarding micromanagement.  What I mean by that is tedious micromanagement like in MoO 2 where every planet have the same queue, you repeatedly queue up the same buildings to build, and you can't queue up everything because there's limited queue spots.  By rewarding micromanagement, when you micromanage something, and it gives you an instant reward that is not repetitive.  For example, assigning scouts to explore stars, it's repetitive, but yet rewarding because every star is different.  So how to have planet micromanagement that is rewarding instead of tedious?

Another aspect to consider is that if planets only have +/- 50%/100% output in certain fields, planets become a blur, you just gobble up the best planets, and leave the worst ones for last, and terraform them to the best planet in MoO 1/2.  Artifacts planets are very rare compared to rich/very rich planets, so those are more important, but still it leaves something to be desired.  How to make each planet feel special?  MoO 3 tried to do this with DEAs and environment/gravity, but the end result is messy.

Just last week, a friend introduced me to a card game called "Race to the Galaxy" (Which is a very excellent game, I recommend it!) and it had an interesting concept.  Different planets can produce different goods, or produce goods on other planets, or have other specials.  That's when the new planet/economy idea started to take root.  So ever since, I've been analyzing it from different perspectives, and trying to think of all potential issues/caveats, and how to resolve them.

Since I'm about to revamp the economy/planet to use scripts more, this is a perfect opportunity for me to implement this new idea, I think I will put squadrons UI on hold (right now they're still the same as fleet, in that you can colonize or move people, only the mechanisms for selecting and moving has changed), and develop this first.

Now, what's the idea?  First, I want to explain the "special" planet feel.  I want each planet to feel different from each other, and have some planets be highly desirable, not just for "100% production" that can be achieved by two normal planets, but rather for unique resources that they possess.  So I'm going to introduce different materials that your empire can utilize.  For example, "Gems", "Radioactives", "Heavy Metals", "Inert Gasses", and so forth.  In empire/system production, different projects will require different materials, so if you don't have a planet that can produce a certain material, you'll have to either find a planet, or trade for it (making a trade agreement for 2 radioactives in exchange for 1 Inert Gas for example).  This will make some planets very desirable as they may be the only ones in the whole galaxy that can provide a certain material.  I really liked this aspect from an old game called "Planet's Edge", you have to have certain materials before you could produce firearms or armor for your guys.

However, that sounds like it'll add more micromanagement, but fear not!  I liked the idea of MoO 3's DEAs, but disliked how it automated development of basically everything.  This is where the "rewarding micromanagement" comes into play.  Different planets will have different number of "Regions" that you can exploit.  When you explore a planet, it may have various materials in different regions.  Materials are of two types, one-time and renewable.  One-time is when you settle the planet, it automatically consumes that material.  Examples include ancient artifacts, native inhabitants, etc.  Renewable includes food, ore that you can mine, etc.

Each region can be different from other.  For example, in one region, you may mine radioactives, while in another of the same planet, you can harvest inert gasses.  When you first settle a planet, all the regions will be undeveloped.  Instead of "queuing" development, you click on a region, and it will prompt you which type of region you want it to be.  When you select a type, it will deduct the cost for developing that region, and it will start on the next turn (each turn is 1 year, so 1 year should be long enough to develop a region?).  For example, if you want a region that's rich in radioactives to be a "Mining" region, you click on that region, then click on "Mining", and it will deduce, say, 100 BC then next turn it will start producing radioactives automatically.

In a sense, it's rewarding instead of tedious because each region is different, and you have to examine which type of region you want it to be.  If you chose mining on a region that can also produce food, you lose the food capacity, but gain the mining.  However, if you want to change your mind, you can later change it to farming, which will gain the food production, but lose the mining.  So that way, you enjoy the thinking process, weighing the pros and cons, along with the actual cost of development.  If you're short on money, you want a "Commerce" region.  If you need more production, you want "Industry".  If you want to build defenses such as missile bases, you want "Military", and so forth.

One thing that I liked from MoO 1 is how it asks you after completing a research such as planetary shield, if you want to start development of that on each planet, with % of development allocated to it (0, 25, 50, and 75).  With the regions, I plan on something similar.  Instead of going to each region individually to build buildings, you can go to planet list screen, and select a region, then "add building" and select the building you want to be built on every region of that type.  It will be then added to the development queue for that region.

Now, production of each region is independent of amount of population on the planet.  The reason for this is that you don't need millions of people to operate a mine, especially if it's an automated one.  Those regions are actually "government" owned, so they don't require much people to operate.  However, the number of population do affect how much taxes you collect, how much food are required to sustain them, how many people will be defending your planet in case of an invasion, and the development time for building buildings on regions.  New assigned regions will automatically follow the queue that you've created for that type.  For example, if you add hydroponics farming and automated farming in "Farm" queue, every "Farm" region that don't have those buildings will then build them.  If you decide that a building is too expensive, or obsolete, you can remove it from queue to prevent new regions from building it, or you can order it scrapped on every planet.  Let's say that there's two buildings, but they are mutually exclusive.  One doubles the industry output, and the other triples it.  You have the first one on some planets, and you want to replace it with the newer triple one, you first order the first scrapped on every planet, and add the triple to the queue.  Presto! Easy management.

The balance of having regions produce their full production from first turn is the cost of developing them.  So you will have to manage your finances carefully, do you develop planets, or build expensive ships, or trade for those rare materials?  The decision is up to you.

I'm having a very good vibe with this approach, instead of assigning population units (aka MoO 2), or sliders (aka MoO 1), the planet management is now more involved, but yet less involved, if you know what I mean.

Tuesday, July 10, 2012

Squadron UI

For those who are curious, our baby is doing well!  She's stable, so we're happy about that.  For Beyond Beyaan, it've been a while since I last posted a screenshot of something new.  So here's a progress update!

As you see, the old fleet window with preview of ships in each fleet is gone, replaced by this new UI.  You can see that there's 15 squadrons (I copy and pasted two squadrons in data files to test various stuff) visible, and that you can select multiple squadrons.  When you have more than one squadron selected, it will automatically assign the slowest squadron's speed to all selected squadrons when you send them off, so that they will all arrive at the same time!  You also can name each squadron for easy reference to what their intended mission or composition are.

You can select multiple squadrons by pressing either control or shift key (control adds one squadron, while shift will adds squadrons from last selected to the current one, similar to Windows' icon selection).  There's still bugs to be worked out, but I'm pleased with the result.

On bottom right of the new UI are two buttons, population transfer and new squadron.  Population transfer will now be per-ship basis, because when you engage in combat, the game will know where the people are, so if you lose that ship, you lose those people.  New squadron button will allow you to create a new squadron from the star system's reserve ships.

In the plans are squadron preview, so when you hover above a squadron in the list, it will show that squadron's ships in its layout, then "new squadron" button with all the ship dragging stuff, then finally population transfer UI.  At that point, the overhaul is done, and I'm back to a similar position before I converted from fleet to squadrons.  Then I can add combat resolution and finish up space combat!


Here's one music that was submitted by the sound composer that I mentioned earlier.  Since I'm deaf, I'm having my friend Spencer handle the sounds/music part of the game, and he has posted the music on his website.  I would like to hear your feedback on the music:

Thursday, July 5, 2012


Things are quite busy now.  My wife's water broke, so we got our baby 10 weeks early a few days ago.  Both mom and baby are doing well (it's a girl), but the baby is so tiny!  It's expected that the baby will stay in NICU (newborn intensive care unit) for at least a month.

Letting you all know that the development of the game will suffer temporarily as a result.  However, on the good news, I've worked out all the bugs with travelling/pathfinding.  So the only things left are the UI and combat resolution!  But when I will finish those is the question :)