Pre-Order the Game!

Desura Digital Distribution

Thursday, November 22, 2012

Life Status

In Sept, my work made the decision that if we're to meet our goal of releasing a new version of our product by Feb, we'll have to work overtime every other week.  So far, we've reached a mostly stable version, but there's at least 500 defects that we need to iron out (we have about 50 developers or something like that).  So we've been working a lot of extra hours, which is partly why the progress on the game is so slow.

So, while we're here, I thought I'd share what I'm grateful for:
I'm grateful for the doctors and nurses that helped us through our preemie experience and cared for our daughter.
I'm grateful for my wonderful wife who supports me in my ambitions (she have to put up with me spending time on my game, away from her and the kids)
I'm grateful for many people whose works have inspired me, such as Steve Barcia's Master of Orion, Gene Roddenberry's Star Trek, Gurney Williams III for "Zero People" book, Diane Duane's "So You Want To Be a Wizard" series, and many many others.
I'm grateful for my family, especially my parents, in that they learned to cope with my deafness and learned sign language so they can communicate with me.
There's many other things that I'm grateful for, but this blog primarily about Beyond Beyaan, so I'll keep it short :)

Here's some pictures of us!

Our baby, in comparison to the picture taken when she was just born (it is to scale!)


Our two beautiful daughters!  Can you forgive me for spending time with them instead of the game? :)


Family picture!  Contradictory to popular beliefs, nerds do get hot girls ;)




Saturday, November 17, 2012

Dealing with resource shortages

In an earlier iteration of my game, if you don't have enough money to pay the maintenance cost, then the "End Turn" button is greyed out.  However, during testing of game, I found this to be very annoying.  This was before the resource overhaul.  So I've been thinking of ways to punish the player for not having sufficient resources that isn't annoying.

I would like your feedback on the following idea.  This is partially inspired by MoO 1's subtle handling of maintenance.

There are three layers of economy in this game: Planet, System, and Empire.  Planets consume resources first, then system, then finally empire.  If a planet do not have sufficient resources to pay the maintenance or consumption requirements of a region, then its efficiency is reduced to the percentage of available resources vs required resources.

For example, if a region with two buildings requires 10 BC total, (with one building requiring 10 BC in maintenance, and the other building don't require maintenance, neither do the region), and produces 20 Industry.  The region normally give 10 Industry, and the first building gives 2, but the second gives 8 (this one is the same one that requires 10 BC maintenance).  If you only have 5 BC available, then the region will produce 16 industry because the region and first building don't require BC, but the second building does, and it gets only 50% of required resource, so its output is 50% as a result.

For the System level, resources are consumed in projects, so it directly affects the length of the project's completion.

For the Empire level, the only things that require resources are trading, ships, and leaders.  Let's say that you've set up an trade agreement to trade 20 research points for 30 BC.  Then on one turn you only have 10 research points (Trading is deducted first before projects deducts theirs), so as a result, you only get 15 BC. That way, you can set the maximum amount of what you want to trade, and if you suffer shortages, it automatically adjust the trade.

For ships, they also suffer penalties.  An example: if they only get 50% of their upkeep cost, then they move at 50% speed both in galaxy and combat, and perform at 50% efficiency during combat, by halving the weapon damages and movement speed and other stuff.  Some ships may not suffer penalties if they have sufficient resources (a ship with an exotic drive may be suffering from penalty of lack of exotic fuel, while others don't).

Leaders likewise reduce their performance, and increases the chance of them quitting.

With this system, if you cripple an empire's economy, you cripple basically everything else.  So spies will play a bigger role than in traditional 4X games with this system.  A spy may destroy or steal resources from another empire, destroy ships, destroy infrastructure, steal technologies, frame other races, etc.  My goal is to have different ways of playing the game to be rougly equally balanced.  If you're a spy race, you can destroy empires via spying (usually not possible in other 4X games).  If you're a trader race, you can drive other empires to poverty via unfair trading (if they're really desperate for a certain resource, you can charge exorbitant rates for it) and monopolizing resources.  If you're a warmonger race, you can capture other planets and do generic war stuff to exterminate other empires.

This system will be simple enough for casual players to easily learn, but will require a lot of practice to master.  I'm seriously considering working on the strength of my new economy system and add a lot of diverse resources to enhance the economy factor.  For example, instead of having abstract fuel ranges, you actually have to mine those fuels and supply your ships with those fuels (such as "Dilithium Crystals" or Plutonium for nuclear engines, etc).  Researching new engine types will allow you to use different fuels.  Maybe your empire only have access to a certain fuel, so you'll want to enhance your engines that use that fuel to be more faster and efficient.  So yes, there will be wars over resources, and trading for resources.  Same for weapons, buildings, research, etc.  Some weapons may require exotic materials that are available in limited quantities, and you can only build 1 or 2 ships at a time.

Your technologies will be determined by what resources you have access to.  While you may unlock technologies for research, you can't research them unless you have the appropriate resources.  This is where spying and trading comes in.

So, what do you think of this?  It will balance out the races, so even if a race is very good at researching, they'll be helpless if they don't have access to resources, and may need to trade research points for those resources!  Trading races will actually be more powerful in that they can use economy to their advantage, instead of generic "+10 BC in Trading".

Saturday, November 10, 2012

Resources and how they're handled

First, let me tell you that it've been a major pain in the neck setting up economy in my game.  The biggest reason for this is that I decided to have resources themselves be moddable.  So I have to design the data structure around that.  But I think I've stumbled onto an accidental but cool feature.

As you know, I'm implementing "Delayed Consumption" (not sure what it's called) where one turn you produce resources to be consumed the next turn.  So for example, if you produce research points on this turn, it won't actually be used until next turn.  It's possible to create a very complicated supply/manufacturing chain, but for my game, it'll be simple.

While implementing this concept, the problem is how do I store the resources?  Do I store them empire-wide?  But what if some people want to limit certain resources to be planet-only in that it never leaves a planet?  An example would be industry points in MoO 1 (they only go into producing ships and stargates), and is not passed to other planets.  So I added a property to each resource that you can specify to be planet only, system only, or empire wide.  Planet is what I just described.  System is a resource that's limited to a star system and not other systems (in my game it would be ship production since ship production will be system-wide).  Empire is able to be shared anywhere, and can be traded with other empires.

After implementing this, I realized a very interesting side effect.  The game calculates the amount of resources based on EACH planet's resources.  Each time the game updates the amount of resources you have, it clears every system's resources and empire's resource, then goes to each planet and adds up resources.  So if a planet have 10 BC (empire), and 5 industry (planet), the 10 BC is added to the empire's resource, but is not deducted from the planet.  Empire's resources is just a cache of the total of all planets' resources.

You may be thinking, "So what?  It don't matter to me because it's the same to the player in the end, it displays the total resources for the empire.  How is that different from other 4X games?".  And to that, I ask, "What happens if you lose a planet?"

Yes, that's right, if you happen to lose a planet, you lose all the resources on that planet.  Or if it was captured, the resources could be captured as well!  This will make ground invasions MUCH more desirable and not just capturing planets for buildings and technologies, but for their resources as well!

Let's say that you have a very rich planet that has 1,000 BC, which is half of your empire's total BC, and it was captured by an enemy.  This can be a deciding factor in the outcome of your war (half of your money gone into the enemy's hands).  So with this system, you'll not just determine which planets to defend based on their buildings and population count, but as well as their amount of resources!

Monday, November 5, 2012

Demo Assets added to source control

I decided to include the demo assets in the source control so that people who want to contribute to the project can just check it out and build it, with everything in the right place.  Right now, the full version and demo version are identical because I stripped out the 30 turn demo restriction from the code.  However, in the future, new races, particles, AI (other than a very basic one), etc that's added will be only in the full version.

I also fixed crashes in loading, and crashes during the game, so it's now playable again, but you'll notice that fleets and ships are missing.  I'm done stripping out stuff, now I'm starting to add new stuff back in :)  You can now run the game and check out the starlanes and regions.

Sunday, November 4, 2012

Changes committed!

Today I decided that I need to have the game compilable, even if it's in a very bugged state.  So I fixed up most of the technology functions to work with the new system, and commented out rest of it that I plan to fix later, and commented out most of anything that has to do with technologies which includes the tech screen, ship design, etc.  You can look here for changes log: http://code.google.com/p/beyond-beyaan/source/list

I looked at last time I committed, and it was in Sept 16th.  It's been a long time since I committed something.  However, from now on, there won't be any more major overhauls.  So from now on, the commits should be more frequent, and I won't post about it unless I committed something significant.

Saturday, November 3, 2012

Final Technology Data Structure

In an earlier post I explained about ship items.  Now here's the technology system and how it all works together.

There will be two types of technology research supported.  The first type is the classic technology research from MoO and MoO 2 where when you research an item from a field, it unlocks the next bracket of technologies (for MoO if you research the newest bracket of technology, for MoO 2, if you research something in a field).  Another type is the "tree" where researching an technology will directly unlock the next technology (or technologies)  Think of X-Com, researching Laser Weapons unlocks Laser Pistols.  You can pick one of the two types to use in your game mod.  The game will load it in appropriately, it will look for certain data in one type, and a different type of data in another.

There are also three options for how research is handled:
One at a time - You can only research one technology at a time, like MoO 2 or Civilization
One per field - You can research one tech for each available field, like MoO 1
No restrictions - You can research whatever visible technologies you want, no count restrictions.

While overhauling the technology system, I added support for mods to define their own types and fields.  If you recall, each "technology" can unlock items for use in your empire (For example, researching Laser Cannon will unlock Laser Cannon Item and Light Mount).  So the items and technologies are now separate types of data.  You can define what type each item is, and the game will handle the display for you.  Let's say that you have only two technology fields, "Physics" and "All Other", and you just put one of those for each technology.  The game will load in technologies, and at the same time, compiling a list of fields.  So make sure you don't misspell the type, or there'll be two duplicate types (Physics and Pysics would be two separate fields for example).

Same thing for ship items.  You can define the type of ship items, and they'll be automatically categorized into those types for the UI when designing ships.

I'm kicking around the idea of adding ability to set ship restrictions and requirements.  For example, a ship can only have one item that are of "Engine" type, or a ship must have at least one "Life Support" item.  But I'm putting this under "Nice to have" and will work on it after full release.

I'm almost done overhauling the technology data system.  Another week or so then it should all work together.  I'll then need to update the UI.  Thanks for your patience while I work on the overhaul.