I finished the last tweaking of resources in the economy system so that those used in projects are separated from those that aren't. The reasoning for this is that the game don't handle stacked production well if I don't do this. Stacked production meaning making more than 1 of an item (maybe 3x scouts or something) in one turn. The reason for this is that the game adds up consumption of all planets, upkeep, etc, then if there's a shortage, the "efficiency" of stuff using that resource are reduced by the amount of shortage. This don't work well for projects, because even at optimal consumption, it'd only factor in one item. If I try and add more items, it'd think the consumption is larger, and if there's a shortage, everything else suffers.
So I separated those two, and will make it so that project resources are "use it or lose it". If you have an excess production but no projects, you're wasting production. So now I can feed in the "Project Manager" saying "I have 600 industry, what do you give me?" and it can calculate that it'd make 3 scouts.
I plan to use the same Project Manager class across the three entities (Planet, Star System, and Empire) and same UI, but Planet will be a queue-based production while Star System and Empire will be a list-based production with sliders to indicate how much you're dividing up the resources between the projects.
Since there's no new screenshots for like forever, I decided to do a quick feature, the ability to turn on or off starlanes. Personally, I love starlanes, it creates chokepoints and strategic locations. But some despise it, so I added this feature. This is a screenshot showing starlanes off and on:
Thursday, December 27, 2012
Saturday, December 22, 2012
Micromanagement Part Two
In the past week, I played a few different games, some board, some video, and I think I may have hit on a sweet idea for reducing end-game tedium and micromanagement.
First, the games that I played? Castle Risk (board game), Eador: Genesis, and Heroes of Might and Magic 2.
In Castle Risk, each player has a Castle that he must protect at all cost. If he lose the territory that contains his Castle, he's out of the game, and his army is removed from the game, leaving the now unoccupied territories open for free invasions.
In Eador: Genesis, you start with a hero and a stronghold. The map is divided into Shards that is further divided into provinces (spelling?). A Shard is basically a whole game in itself as you don't transfer armies between shards. You can move units only with your hero, and you can capture provinces. However, even if you are in a province with an army (including hero), it is not fully explored at first. Maybe 5% or 10%, but sufficient to "claim" the province and its output.
In HoMM 2 (and all other games in the series), there are resources and stuff scattered across the map. There's lumber mills, gold mines, and so forth. There are few castles in relation to the map size. You can develop each castle by building stuff which adds new types of units that you can gather into your hero's army.
So here's my proposal. If I were to combine those elements, it will enhance the "Explore" and "Exploit" aspects of the 4X label for my game.
First, starting with exploration aspect. Let's say that you have a "FTL Carrier" which is an equivalent of heroes in HoMM and Eador, that can transport other ships with it, but it is not involved in battles (it will retreat immediately if you lose the battle). You can't explore other systems without a FTL Carrier. However, a FTL carrier will be very expensive to build, and pricey to maintain, so you won't have too many of them. They will have a limited capacity in the number and size of ships that they can transport, so over the game you will upgrade your FTL carriers to be bigger and faster.
When you arrive at a star system, there is a chance that you may encounter something guarding the system (Guardian, Space Monsters, etc), or not. If you choose to battle and is successful, or if there's no guardians, you claim the system, otherwise you retreat. Once claimed, you don't see all the planets and other stuff at once. You'll need to send some ships to explore (if you have at least one ship in the system idling, it will automatically explore). Some planets on discovery may require you to attack defensive satellites, baby eels, natives, or some other stuff before you can claim the planet. Once claimed, it is now open to development. People will automatically move to it, so that's how the "Colonization" will work in the game. There will be other stuff that you may discover, such as derelict ships that you can add to your fleet, ancient artifacts, stockpiled resources, etc.
Your home system will be your "Castle", and will have a planet that is unique to your race that can support a full "home". This means that most of other planets are really just outposts with some people on them, mainly for mining and production. If you lose your home system, you lose the game. So in late-game, you don't need to wipe out all the enemy's systems, just his home system.
If you own a system, and an enemy attacks it, the battle is for the whole system, not on per-planet basis. You will use all of your ships in the system, and it's only two sides in the battle (if two enemies attacks, you deal with each one individually). If you lose, the enemy now claims the system, but he will still need to explore it. If you added defenses to your owned planets, he will need to wipe them out before he can claim the planets, buying you time to get reinforcements and attempt to take the system back.
So a fully developed system will take quite some time for an enemy to fully conquer as opposed to a newly settled system. In real life, f you were to invade a country and topple its government, it don't mean that its people are now immediately under your control. You'll have to go to each city and battle it out, unless the country decided to surrender. However, if the government is totally toppled, it makes it much more easier to capture cities, so that's how it will be in the game. If you managed to capture a home system, it means that the player is out of the game, but all of his previously owned planets will still have defenses and such that he developed.
I believe that another part of micromanagement tedium is waiting for stuff to be built. In Eador, you can go to your stronghold and build a new building in a turn, paying the cost to build it though. In Beyond Beyaan, each turn is a year, so I assume that it shouldn't take more than a year to build a farm? :) So you can go to planet management screen, and filter out planets, then add buildings and regions to the selected planets' queue, and they will be built. However, the price will be deducted immediately when you assign a planet to build, even if it's not for a few turns. Every building and region will only take one turn to build.
As for ships, I think the idea is to have few small ships to defend and explore systems that they are in. You can upgrade a system to build larger ships, but those upgrades will be expensive, so most likely only a few systems will support that. Then you send FTL carriers to pick up those large ships and replace the lost or obsolete ships. If you see planets in your systems that are not claimed yet due to being heavily defended, you can wait until you build ships,
You design ships, then you can "buy" them (they will be built in a turn). However, ships will be expensive and high maintenance, so you won't have too many of them, and making it more of a incentive to retreat if a battle is going badly, getting rid of the "disposable ships" idea.
All in all, it will be similar to HoMM/Eador system, with a lot less fleet moving around, but emphasizing exploration and focusing on fun aspects that I mentioned in last post.
What are your thoughts? It maintains the strategic aspect of moving ships around and conquering, but with added emphasis on exploration and exploiting resources, and reduced tedium in waiting for stuff to be built. If you want more resource output, you have to decide between building ships, or developing planets, or buying technologies so you can improve your ship's designs, and few other things.
First, the games that I played? Castle Risk (board game), Eador: Genesis, and Heroes of Might and Magic 2.
In Castle Risk, each player has a Castle that he must protect at all cost. If he lose the territory that contains his Castle, he's out of the game, and his army is removed from the game, leaving the now unoccupied territories open for free invasions.
In Eador: Genesis, you start with a hero and a stronghold. The map is divided into Shards that is further divided into provinces (spelling?). A Shard is basically a whole game in itself as you don't transfer armies between shards. You can move units only with your hero, and you can capture provinces. However, even if you are in a province with an army (including hero), it is not fully explored at first. Maybe 5% or 10%, but sufficient to "claim" the province and its output.
In HoMM 2 (and all other games in the series), there are resources and stuff scattered across the map. There's lumber mills, gold mines, and so forth. There are few castles in relation to the map size. You can develop each castle by building stuff which adds new types of units that you can gather into your hero's army.
So here's my proposal. If I were to combine those elements, it will enhance the "Explore" and "Exploit" aspects of the 4X label for my game.
First, starting with exploration aspect. Let's say that you have a "FTL Carrier" which is an equivalent of heroes in HoMM and Eador, that can transport other ships with it, but it is not involved in battles (it will retreat immediately if you lose the battle). You can't explore other systems without a FTL Carrier. However, a FTL carrier will be very expensive to build, and pricey to maintain, so you won't have too many of them. They will have a limited capacity in the number and size of ships that they can transport, so over the game you will upgrade your FTL carriers to be bigger and faster.
When you arrive at a star system, there is a chance that you may encounter something guarding the system (Guardian, Space Monsters, etc), or not. If you choose to battle and is successful, or if there's no guardians, you claim the system, otherwise you retreat. Once claimed, you don't see all the planets and other stuff at once. You'll need to send some ships to explore (if you have at least one ship in the system idling, it will automatically explore). Some planets on discovery may require you to attack defensive satellites, baby eels, natives, or some other stuff before you can claim the planet. Once claimed, it is now open to development. People will automatically move to it, so that's how the "Colonization" will work in the game. There will be other stuff that you may discover, such as derelict ships that you can add to your fleet, ancient artifacts, stockpiled resources, etc.
Your home system will be your "Castle", and will have a planet that is unique to your race that can support a full "home". This means that most of other planets are really just outposts with some people on them, mainly for mining and production. If you lose your home system, you lose the game. So in late-game, you don't need to wipe out all the enemy's systems, just his home system.
If you own a system, and an enemy attacks it, the battle is for the whole system, not on per-planet basis. You will use all of your ships in the system, and it's only two sides in the battle (if two enemies attacks, you deal with each one individually). If you lose, the enemy now claims the system, but he will still need to explore it. If you added defenses to your owned planets, he will need to wipe them out before he can claim the planets, buying you time to get reinforcements and attempt to take the system back.
So a fully developed system will take quite some time for an enemy to fully conquer as opposed to a newly settled system. In real life, f you were to invade a country and topple its government, it don't mean that its people are now immediately under your control. You'll have to go to each city and battle it out, unless the country decided to surrender. However, if the government is totally toppled, it makes it much more easier to capture cities, so that's how it will be in the game. If you managed to capture a home system, it means that the player is out of the game, but all of his previously owned planets will still have defenses and such that he developed.
I believe that another part of micromanagement tedium is waiting for stuff to be built. In Eador, you can go to your stronghold and build a new building in a turn, paying the cost to build it though. In Beyond Beyaan, each turn is a year, so I assume that it shouldn't take more than a year to build a farm? :) So you can go to planet management screen, and filter out planets, then add buildings and regions to the selected planets' queue, and they will be built. However, the price will be deducted immediately when you assign a planet to build, even if it's not for a few turns. Every building and region will only take one turn to build.
As for ships, I think the idea is to have few small ships to defend and explore systems that they are in. You can upgrade a system to build larger ships, but those upgrades will be expensive, so most likely only a few systems will support that. Then you send FTL carriers to pick up those large ships and replace the lost or obsolete ships. If you see planets in your systems that are not claimed yet due to being heavily defended, you can wait until you build ships,
You design ships, then you can "buy" them (they will be built in a turn). However, ships will be expensive and high maintenance, so you won't have too many of them, and making it more of a incentive to retreat if a battle is going badly, getting rid of the "disposable ships" idea.
All in all, it will be similar to HoMM/Eador system, with a lot less fleet moving around, but emphasizing exploration and focusing on fun aspects that I mentioned in last post.
What are your thoughts? It maintains the strategic aspect of moving ships around and conquering, but with added emphasis on exploration and exploiting resources, and reduced tedium in waiting for stuff to be built. If you want more resource output, you have to decide between building ships, or developing planets, or buying technologies so you can improve your ship's designs, and few other things.
Wednesday, December 19, 2012
Code Commit Feed
Just a quick post. I added a code commit feed thingy on bottom of this blog. You can see 5 most recent code commits to Beyond Beyaan. I tried to put it in the side of this blog, or on top below the "buy" button, but this stupid blog won't let me. So for now, if you want to see the most recent changes, scroll to bottom and check out the commits.
Wednesday, December 12, 2012
Micromanagement
Sorry, no screenshots in this post, because I saw something on SpaceSector that caught my eye. The author discussed micromanagement in terms of managing colonies (http://www.spacesector.com/blog/2012/12/how-to-tackle-build-micromanagement-tedium-in-4x-games/), and while I made some comments there, I thought of another micromanagement issue: the end-game "final war" where you're either winning or losing, and the tedious task of going to each star system and ensuring that it's eradicated of your enemy.
Let's say that you're playing in a 200-star galaxy, with every star being inhabited by either you or your enemy, with about 50/50 distribution. And each star averages 4 planets each, that'd be about 400 planets to invade/bomb! This got me to thinking, what if that isn't the problem, but is actually how fleets are portrayed/managed in the game? It gets tedious sending a fleet to a planet, then attacking, then ordering it to attack another planet, or moving to next system.
I think the most fun aspects of a space 4X game are colony development/colonizing, research, ship designing, and space combat. Others are just fluff to help move the game along. What if the fleet management were minimized or even eliminated, thereby focusing on those fun aspects of the 4X game?
At this point, I realized that nearly all 4X space games have basically the same fleet management. No matter how they move, they're always represented in the galaxy view, and you have to issue orders one way or another for them to move to or attack a star system.
If we were to eliminate traditional fleet management, what are our alternatives that can perform the same tasks but are less tedious? Consider the fact that we want to support colonizing, exploring, transporting population/troops, attacking, and defending of planets.
Note, this is just speculation! I want to make the end game about as equally enjoyable as early game and mid game!
Perhaps we could try the idea inspired by Castles series (Castles 2: Siege and Conquest in particular) where instead of having army icons, the land is divided up into territories, and you select a territory then select an action (spy, attack, etc). You have a limited list of actions that you can perform at the same time. Would this work for this kind of game? Let me illustrate what it would look like:
Exploring would be done by "hiring" people to explore it for you. You select a star system, and click on "Explore". The price and time taken for this action will be based on distance from nearest owned system, and you confirm by clicking on "OK". This is then added to in-progress actions (actions are not arbitarily limited, it is limited by amount of resources that you have). If starlanes are enabled, then you can only explore systems that are connected to an explored system, and is not blocked by an hostile empire (blocked in the sense that they occupy a star system that connects your empire to the unexplored system.)
Colonization again would be done by "hiring" people to build a colony base on a planet. The cost and time will be based on distance and hospitality of the planet. Technologies can reduce either factors.
Attacking would be done by selecting a planet then clicking on "Attack". It will then prompt you asking which ships to send for the attack, then the cost will be calculated by the fleet's upkeep cost and time taken to arrive. After a successful attack, it asks you for three options (depending on what equipment your ships have): Bombard Planet (kill off all people, this have diplomatic repercussions, you'll be branded as participating in xenocide), Destroy Planet (same as Bombard, but more severe repercussions), or Invade Planet (no diplomatic repercussions, but more involved).
Transporting population can be partially eliminated by having people automatically migrate from crowded planets to less crowded/more hospitable planets. But for invasion, maybe you need to build up an ground army similar to Castles, then clicking on a planet and selecting "Invade". Invade would be similar to Attack, in that you select ships to escort your troops, and you select troops to attack.
Defending will be done by displaying list of planets being attacked, and which ships are attacking. You then select which ships to defend which planet, then resolve each battle. In this case, you have "home field advantage".
Spies can be used to find out the enemy's actions and see if they're planning an attack on you, or to find out intel such as explored systems, fleet strength, etc.
Your list of actions will be displayed in top right of the galaxy view, to remind you what you're doing.
Pros of this system:
A lot less management of your fleets, you don't have to worry about splitting fleets, moving them to defend a system, or attacking, or adding troops to a ship, etc.
More streamlined management of your empire. You're an emperor, you say "I want to attack this system", and it is done, you don't worry about supply lines or fleet formation, those are left to your underlings.
It scales with your empire size. More resources means that you can explore more systems at once, instead of having to build scout ships and sending them out.
It will be a lot simpler to program, meaning the game will be finished sooner.
It focuses on the fun features of 4X games - Exploration, Colonization, Battles, Researching, and Development.
Ships are now built at empire-wide level, because they're managed in an empire-wide level, which further reduces micromanagement. You can order up 10 battleships, and don't have to care about where they're built.
Cons of this system:
Less tactical decisions in the galaxy level. You'll feel a lack of micromanagement if you're a micromanagement freak. This is not a problem for me personally.
May be a bit imbalanced being able to attack one system on one end of galaxy, then attacking another system on the other end of galaxy shortly afterwards with the same ships. But this is offset with the ability to defend systems in the same manner. Again, not really a problem for me.
What are your thoughts? Personally, I find this to be very alluring, both in terms of simplicity for me to program, and in reduced management in general. If there are no major issues, then I will go ahead and attempt this venture.
Let's say that you're playing in a 200-star galaxy, with every star being inhabited by either you or your enemy, with about 50/50 distribution. And each star averages 4 planets each, that'd be about 400 planets to invade/bomb! This got me to thinking, what if that isn't the problem, but is actually how fleets are portrayed/managed in the game? It gets tedious sending a fleet to a planet, then attacking, then ordering it to attack another planet, or moving to next system.
I think the most fun aspects of a space 4X game are colony development/colonizing, research, ship designing, and space combat. Others are just fluff to help move the game along. What if the fleet management were minimized or even eliminated, thereby focusing on those fun aspects of the 4X game?
At this point, I realized that nearly all 4X space games have basically the same fleet management. No matter how they move, they're always represented in the galaxy view, and you have to issue orders one way or another for them to move to or attack a star system.
If we were to eliminate traditional fleet management, what are our alternatives that can perform the same tasks but are less tedious? Consider the fact that we want to support colonizing, exploring, transporting population/troops, attacking, and defending of planets.
Note, this is just speculation! I want to make the end game about as equally enjoyable as early game and mid game!
Perhaps we could try the idea inspired by Castles series (Castles 2: Siege and Conquest in particular) where instead of having army icons, the land is divided up into territories, and you select a territory then select an action (spy, attack, etc). You have a limited list of actions that you can perform at the same time. Would this work for this kind of game? Let me illustrate what it would look like:
Exploring would be done by "hiring" people to explore it for you. You select a star system, and click on "Explore". The price and time taken for this action will be based on distance from nearest owned system, and you confirm by clicking on "OK". This is then added to in-progress actions (actions are not arbitarily limited, it is limited by amount of resources that you have). If starlanes are enabled, then you can only explore systems that are connected to an explored system, and is not blocked by an hostile empire (blocked in the sense that they occupy a star system that connects your empire to the unexplored system.)
Colonization again would be done by "hiring" people to build a colony base on a planet. The cost and time will be based on distance and hospitality of the planet. Technologies can reduce either factors.
Attacking would be done by selecting a planet then clicking on "Attack". It will then prompt you asking which ships to send for the attack, then the cost will be calculated by the fleet's upkeep cost and time taken to arrive. After a successful attack, it asks you for three options (depending on what equipment your ships have): Bombard Planet (kill off all people, this have diplomatic repercussions, you'll be branded as participating in xenocide), Destroy Planet (same as Bombard, but more severe repercussions), or Invade Planet (no diplomatic repercussions, but more involved).
Transporting population can be partially eliminated by having people automatically migrate from crowded planets to less crowded/more hospitable planets. But for invasion, maybe you need to build up an ground army similar to Castles, then clicking on a planet and selecting "Invade". Invade would be similar to Attack, in that you select ships to escort your troops, and you select troops to attack.
Defending will be done by displaying list of planets being attacked, and which ships are attacking. You then select which ships to defend which planet, then resolve each battle. In this case, you have "home field advantage".
Spies can be used to find out the enemy's actions and see if they're planning an attack on you, or to find out intel such as explored systems, fleet strength, etc.
Your list of actions will be displayed in top right of the galaxy view, to remind you what you're doing.
Pros of this system:
A lot less management of your fleets, you don't have to worry about splitting fleets, moving them to defend a system, or attacking, or adding troops to a ship, etc.
More streamlined management of your empire. You're an emperor, you say "I want to attack this system", and it is done, you don't worry about supply lines or fleet formation, those are left to your underlings.
It scales with your empire size. More resources means that you can explore more systems at once, instead of having to build scout ships and sending them out.
It will be a lot simpler to program, meaning the game will be finished sooner.
It focuses on the fun features of 4X games - Exploration, Colonization, Battles, Researching, and Development.
Ships are now built at empire-wide level, because they're managed in an empire-wide level, which further reduces micromanagement. You can order up 10 battleships, and don't have to care about where they're built.
Cons of this system:
Less tactical decisions in the galaxy level. You'll feel a lack of micromanagement if you're a micromanagement freak. This is not a problem for me personally.
May be a bit imbalanced being able to attack one system on one end of galaxy, then attacking another system on the other end of galaxy shortly afterwards with the same ships. But this is offset with the ability to defend systems in the same manner. Again, not really a problem for me.
What are your thoughts? Personally, I find this to be very alluring, both in terms of simplicity for me to program, and in reduced management in general. If there are no major issues, then I will go ahead and attempt this venture.
Tuesday, December 11, 2012
Glasses and Economy
First, things are still busy at work, so I've only been able to put in 15 or 30 minutes worth of work at a time here and there. Hopefully in a month, everything will settle down, and I'll have more time to work on the game.
Now, how is glasses related to the game? Well, at about the same time that our second daughter was born, my first daughter broke my regular glasses (Pro-tip, don't go for those half-frame glasses, the strings holding the bottom part of lenses break easily, and repeatedly breaking those weaken the frame itself). So I ordered a new one from the internet. For the past 5 months I've been experiencing vertigo, anxiety, dizziness, headaches, etc. I went to doctors, but they couldn't find out anything. Then finally a week ago, at work I took off my glasses to rub my eyes, and I suddenly felt better! Turns out that my left lenses were made incorrectly, the prescription was flipped 90 degrees! That was the cause of all that pain! So I've ordered replacement lenses... This has negatively affected my efforts because often I didn't feel well enough to work on my game.
Now for some good news. The economy system is now finally done! You can specify starting resources on a race's planets. Races' food/resource consumption are calculated as a part of economy system (before it was separate). Racial bonuses/disadvantages are now finally used! Planets sharing resources are also implemented! The only things missing are projects and UI for displaying resources. Projects includes research, ship building, building regions, and regional improvements.
So the next post will finally have a new screenshot! :)
Now, how is glasses related to the game? Well, at about the same time that our second daughter was born, my first daughter broke my regular glasses (Pro-tip, don't go for those half-frame glasses, the strings holding the bottom part of lenses break easily, and repeatedly breaking those weaken the frame itself). So I ordered a new one from the internet. For the past 5 months I've been experiencing vertigo, anxiety, dizziness, headaches, etc. I went to doctors, but they couldn't find out anything. Then finally a week ago, at work I took off my glasses to rub my eyes, and I suddenly felt better! Turns out that my left lenses were made incorrectly, the prescription was flipped 90 degrees! That was the cause of all that pain! So I've ordered replacement lenses... This has negatively affected my efforts because often I didn't feel well enough to work on my game.
Now for some good news. The economy system is now finally done! You can specify starting resources on a race's planets. Races' food/resource consumption are calculated as a part of economy system (before it was separate). Racial bonuses/disadvantages are now finally used! Planets sharing resources are also implemented! The only things missing are projects and UI for displaying resources. Projects includes research, ship building, building regions, and regional improvements.
So the next post will finally have a new screenshot! :)
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!
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".
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!
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.
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.
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.
Saturday, October 27, 2012
Protip for 4X Developers...
Warning! Memory trip ahead! This is just me reminiscing on the development of Beyond Beyaan.
I also wanted the ship construction to be empire-wide, to reduce micromanagement. But then I realized, what if two systems are cut off from each other in middle, how do they contribute to the production? So I scrapped the fuel range. I also added production for empire-wide as shown:
Note that you determine how much each increment will contribute to the production. If you select 5, then each increment will add 5 BC to the production. This was very unwieldly and I ultimately scrapped that system. I then thought it'd be a neat idea to have nebulaes act as "friction" and your fleets will need to find the quickest path.
I then decided to follow MoO 1's slider system for planets. I also decided on stacked ships, just like MoO 1. And an identical transport system as well.
I started work on the combat screen, and other stuff, when I had the brillant idea of using scripts for equipment on ships, but I believed at the time that it won't work too well with stacked ships. So I scrapped the idea of stacked ships:
Later, I decided to make scripting even more flexible, and realized that this new system supports stacked ships, but the damage was already done. The UI is now designed around single ships. However, the combat process was pretty close to what I wanted it to look like (similar to MoO 1)
This new system required an overhaul of basically the entire data structure of ships and such. Deciding to take it even further, I made it possible to customize starting ships, planets, systems, etc. However, this consumed a lot of time with very little tangible benefits, making it hard to stay motivated to work on the game.
Then I finally decided that nebula as it was didn't look good, so I removed it and realized that what's the point of grid-based movement? It'd be a very rare thing to intercept someone in space, and there's nothing exciting in the empty spaces. So I scrapped that system and replaced it with star to star movement.
I then decided that I want the game to be even more moddable, so I changed how resources work. This was another overhaul, as well as my decision to change from sliders to regional developments.
So, looking back over all of those design changes and overhauls (I think the current overhaul of the data system to the final system will be 6th or 7th overhaul), I realized something. If I knew what I really wanted, and had the understandings that I do now, at the time when I started on this project, the game would probably be done by now. But that's the only regret. I don't regret all the learning and experiences that I've had with the process. When I made my first game, an asteroids clone, it took me 9 months to finally finish it. However, it was a very buggy game. Then a few years later, I decided to make the game again, to make a better version, and it took me a month to make an similar game but without the bugs. Then again a few years later I decided to remake the game as an way to learn C# and Gorgon engine. It took a month again, but I was able to add a LOT of new features such as varying types of asteroids, upgrades, etc.
So basically what I'm saying is that when I'm done with Beyond Beyaan, if I were to make another 4X game, it'd be a lot faster and less messy, because of the experiences that I've had with Beyond Beyaan. So here's finally the protip: If you're developing a game, know what you want in the game, and set limits on features based on your skill and experience.
Another problem with Beyond Beyaan is feature creep. Too often I'd go "Oh, that's an awesome idea, let's add that!". It's like building a house, then deciding that you didn't like a wall's position, so you destroy it and build a new wall in a new place. It will never be perfect, so you gotta decide on what you want, and what you are willing to put up with in terms of cut features.
The reason for this lengthy post is that I just started work on overhauling the code for handling the new final data files. The changes basically broke everything in the game, from the UI to the ships to the technology. I can't even compile it. I won't commit my changes to google source control until it's able to be compiled. It's like knocking down the whole house, and saving sections of it for re-use.
Tuesday, October 9, 2012
Final Ship Data Structure
I mentioned in my last post that I'm working on the projects and re-working technology system. What I didn't realize at the moment is that it'd require overhaul of the technology system AND data files. This occured when I was thinking about equipment in ships, and how should mounts and modifiers work? How do the game know to create a combo box, or a list of checkboxes?
I believe that I have figured out a system that will be final and flexible. This is how the data will look like (I've started work on updating the data files to match the new system)
ShipEquipments.xml - Contains three types of items:
ShipItem - The basic data about an item, it also have "modifiers" and "enhancers", that if a modifier or enhancer matches the type (For example, Laser would have beamModifiers and beamEnhancers as values), it is added to the UI in ship design. Can have more than 1 modifier and/or enhancer types.
ShipModifier - This is an item that can be used to modify ShipItem. It defines which types it can modify. Can modify more than 1 type. However, the item can only pick one modifier for a type. So if an item have "BeamModifier" and "BeamModifier2" types, it can only have one item for each type, totalling 2 modifiers.
ShipEnhancer - This is similar to ShipModifier, but in that multiple enhancers can be added (checkboxes instead of a combobox).
With this system, it's possible to create a game like MoO 1 (have all items be standalones, no modifiers or enhancers), MoO 2 (have firing arc modifiers and special attributes as enhancers), or MoO 3 (sized mount modifiers with special attributes enhancers).
I should have this new system done by end of week, if all goes well!
I believe that I have figured out a system that will be final and flexible. This is how the data will look like (I've started work on updating the data files to match the new system)
ShipEquipments.xml - Contains three types of items:
ShipItem - The basic data about an item, it also have "modifiers" and "enhancers", that if a modifier or enhancer matches the type (For example, Laser would have beamModifiers and beamEnhancers as values), it is added to the UI in ship design. Can have more than 1 modifier and/or enhancer types.
ShipModifier - This is an item that can be used to modify ShipItem. It defines which types it can modify. Can modify more than 1 type. However, the item can only pick one modifier for a type. So if an item have "BeamModifier" and "BeamModifier2" types, it can only have one item for each type, totalling 2 modifiers.
ShipEnhancer - This is similar to ShipModifier, but in that multiple enhancers can be added (checkboxes instead of a combobox).
With this system, it's possible to create a game like MoO 1 (have all items be standalones, no modifiers or enhancers), MoO 2 (have firing arc modifiers and special attributes as enhancers), or MoO 3 (sized mount modifiers with special attributes enhancers).
I should have this new system done by end of week, if all goes well!
Friday, October 5, 2012
Rejuvenated!
My baby passed several tests, so she no longer need oxygen tube or heart/lung monitor wires hooked up anymore! She's doing pretty well! Things are starting to stabilize in our family, aside from my older daughter (she's 3 years old) being jealous of attention that my baby receives :) I will post a picture of them soon :)
I've taken a break from Beyond Beyaan recently, with occasional updates and dabbling in UI work, and it has helped relieve some stress. I also played Torchlight II, which I highly recommend! All in all, I was able to relax and recover from the intense experience from past several months. Now I'm feeling refreshed and invigorated! I'm ready to tackle this project again!
While going over the game, I realized that I'm closer to the end than I thought! My goal was to get the game playable, and there's only several items that needs to be implemented, most everything is pretty much done. The rest is just UI work and polishing! I will split those into four stages:
First stage:
- Finish the economy model - It's nearly done, just need to have local, system, and empire production being consumed in projects
- Add projects system (which include researching items, buildings, etc, they will all use the same framework)
- Rework the technology system to work with the new project. Technologies will now be same as projects, the only difference is that they are empire-wide projects. They unlock rewards, such as new technologies to research, or items to use in ships, or empire-wide racial improvements, etc. It'll be possible for an "tech" to yield more than one reward. I'm also adding possibility for a technology to remove rewards. For example, if you research Laser Cannon II, it removes Laser Cannon I because II is cheaper and better. Or to remove other technology items available for research if you want to follow Master of Orion 2 tech system.
At this point, the empire management framework is done, you can build ships, develop planets, research, etc.
Second stage:
-Add several parameters in space combat so that each particle can process the environment (nearest enemy ship, nearest ship, etc). This will enable missiles and torpedoes.
-Finish the squadron framework - This means retreating, ending turn, "charging up" phase, basically the rest of stuff to have the combat fully workable. Also changing how you fire weapons for less micro/clicking.
-Add victory/loss checks, as well as UI for choosing which squadrons to fight with or against (you could have 2 empires against 1 for example, or 5 empire free for all)
At this point, the game is now playable, but not quite winnable yet.
Third stage:
-Add empire victory/loss script support (so you can customize how to win or lose. For example, if you want an economy victory, the first empire to reach 1 million BC wins in a game where there's no combat at all, only research and expansion)
-Add saving/loading of games.
At this point, the game is winnable, and will be almost ready for beta (beta meaning feature complete).
Fourth stage:
-UI work - this means reworking the remaining screens to work with the above changes. For example, new ship design UI to work with the new technology system, planet management screen to work with the new production screen (macromanagement), etc.
-Add support for AI scripting - This won't be finished until after the game is final, I have almost no experience with AI, so this will be a learning experience. AI will be dumb at beginning, but at least it'll give you something to play against :)
At this point, I will declare the game to be in beta stage. But wait! Some of you may notice that I didn't mention diplomacy. I plan on adding it during the beta stage because it's not vital to making the game playable. I do have some clever ideas that I think you may like. Beta will be basically polishing and adding the extra features that makes the game enjoyable such as random events and news reports, but are not required to have it playable.
---------------------------------------------------------------------------------------------------------
Now, another idea that I'm kicking around is starting a kickstarter project to raise funds to complete the game's assets. I'm thinking of doing it after first stage is done. The goal will be modest, but hopefully with kickstarter's popularity, I can finish the rest of assets (more race artwork, more icons, weapon graphics like missiles and beams, etc) and maybe even add an intro and victory/loss videos! If you have tips and advice for kickstarter projects, let me know!
I'm ready to start work on the game again! Hopefully I'll be back to posting an update a week again!
I've taken a break from Beyond Beyaan recently, with occasional updates and dabbling in UI work, and it has helped relieve some stress. I also played Torchlight II, which I highly recommend! All in all, I was able to relax and recover from the intense experience from past several months. Now I'm feeling refreshed and invigorated! I'm ready to tackle this project again!
While going over the game, I realized that I'm closer to the end than I thought! My goal was to get the game playable, and there's only several items that needs to be implemented, most everything is pretty much done. The rest is just UI work and polishing! I will split those into four stages:
First stage:
- Finish the economy model - It's nearly done, just need to have local, system, and empire production being consumed in projects
- Add projects system (which include researching items, buildings, etc, they will all use the same framework)
- Rework the technology system to work with the new project. Technologies will now be same as projects, the only difference is that they are empire-wide projects. They unlock rewards, such as new technologies to research, or items to use in ships, or empire-wide racial improvements, etc. It'll be possible for an "tech" to yield more than one reward. I'm also adding possibility for a technology to remove rewards. For example, if you research Laser Cannon II, it removes Laser Cannon I because II is cheaper and better. Or to remove other technology items available for research if you want to follow Master of Orion 2 tech system.
At this point, the empire management framework is done, you can build ships, develop planets, research, etc.
Second stage:
-Add several parameters in space combat so that each particle can process the environment (nearest enemy ship, nearest ship, etc). This will enable missiles and torpedoes.
-Finish the squadron framework - This means retreating, ending turn, "charging up" phase, basically the rest of stuff to have the combat fully workable. Also changing how you fire weapons for less micro/clicking.
-Add victory/loss checks, as well as UI for choosing which squadrons to fight with or against (you could have 2 empires against 1 for example, or 5 empire free for all)
At this point, the game is now playable, but not quite winnable yet.
Third stage:
-Add empire victory/loss script support (so you can customize how to win or lose. For example, if you want an economy victory, the first empire to reach 1 million BC wins in a game where there's no combat at all, only research and expansion)
-Add saving/loading of games.
At this point, the game is winnable, and will be almost ready for beta (beta meaning feature complete).
Fourth stage:
-UI work - this means reworking the remaining screens to work with the above changes. For example, new ship design UI to work with the new technology system, planet management screen to work with the new production screen (macromanagement), etc.
-Add support for AI scripting - This won't be finished until after the game is final, I have almost no experience with AI, so this will be a learning experience. AI will be dumb at beginning, but at least it'll give you something to play against :)
At this point, I will declare the game to be in beta stage. But wait! Some of you may notice that I didn't mention diplomacy. I plan on adding it during the beta stage because it's not vital to making the game playable. I do have some clever ideas that I think you may like. Beta will be basically polishing and adding the extra features that makes the game enjoyable such as random events and news reports, but are not required to have it playable.
---------------------------------------------------------------------------------------------------------
Now, another idea that I'm kicking around is starting a kickstarter project to raise funds to complete the game's assets. I'm thinking of doing it after first stage is done. The goal will be modest, but hopefully with kickstarter's popularity, I can finish the rest of assets (more race artwork, more icons, weapon graphics like missiles and beams, etc) and maybe even add an intro and victory/loss videos! If you have tips and advice for kickstarter projects, let me know!
I'm ready to start work on the game again! Hopefully I'll be back to posting an update a week again!
Friday, September 21, 2012
Less is More
For the past couple of months, I've been gnawing on the planet window UI. I want to display all the important information, but wasn't sure on how to do it in a clean way. If you look at an earlier post, I had an idea that I started on. But it wasn't good enough for me.
I've spent hours thinking about this problem. As Mark Twain said "I don't have the time to write you a short letter, so I'm writing you a long letter" (or something like that), it is hard to come up with a good UI design that is both functional and informative, without overwhelming the player. I don't want my game to look like this.
I needed to be able to display planet information, production/consumption, population, regions, etc. Then last night as I laid on my bed, a brilliant idea struck me. "Less is more!" The extra information that isn't absolutely critical can be put into a tooltip that shows up when hovering over something.
For example, I can just display "50 Population" without needing to display the amount for each race, that can be put in a tooltip. Using this approach, I was able to actually reduce the window size! The UI is mostly done now, I need to add some display text (I added them in MS Paint for the screenshot to illustrate what the final version will look like). After this UI is done, I will then upload both the code changes and the new version on Desura. At this point, both Desura and source code will be in sync.
Here's what it looks like, I welcome your feedback!
I've spent hours thinking about this problem. As Mark Twain said "I don't have the time to write you a short letter, so I'm writing you a long letter" (or something like that), it is hard to come up with a good UI design that is both functional and informative, without overwhelming the player. I don't want my game to look like this.
I needed to be able to display planet information, production/consumption, population, regions, etc. Then last night as I laid on my bed, a brilliant idea struck me. "Less is more!" The extra information that isn't absolutely critical can be put into a tooltip that shows up when hovering over something.
For example, I can just display "50 Population" without needing to display the amount for each race, that can be put in a tooltip. Using this approach, I was able to actually reduce the window size! The UI is mostly done now, I need to add some display text (I added them in MS Paint for the screenshot to illustrate what the final version will look like). After this UI is done, I will then upload both the code changes and the new version on Desura. At this point, both Desura and source code will be in sync.
Here's what it looks like, I welcome your feedback!
Sunday, September 16, 2012
Source Code Uploaded!
I've just uploaded the source code for Beyond Beyaan to
http://code.google.com/p/beyond-beyaan/!
Now, before I explain the structure for the game's code, I would like to take a moment and share the reasons for lack of development progress the past couple of months.
On July 3rd, our baby Marie was born 10 weeks early. Ever since then, our life has been hectic. Sometimes I have some free time to work on the game, but that was rare. I needed to support my wife both physically and emotionally. And so my motivation for working on the game declined. After all, it's just a computer game, it's not as important as our newborn. I can go back to the game later when things gets better. There were some scary situations when our baby required antibiotics to fight a deadly infection, and requiring a blood transfer. Then there's the period when she wouldn't keep the milk down. But the good news is that she has recovered, and has just arrived home with us today! So hopefully in a month or so, our lives will be stabilized enough for me to resume work on Beyond Beyaan.
I know that you all are waiting for the next Master of Orion game. It sure seem like the MoO 2 curse is working hard against me, but I won't let it succeed! There will be a complete version, the game will be playable! :)
Now, about the source code. I've tried to keep it clean and easily refactorable. So I'll explain how all of it is organized.
First up is the "GameMain.cs". This is the core of everything, it stores the galaxy, the empires, etc, and is located in the same directory as the project. All of the UI refer to it. GameMain.cs stores the different parts of the game, and each of those parts (such as "EmpireManager") handles the logic internally. The UI is responsible only for updating the values and displaying them. So it's critical that major components are stored in GameMain.cs, and that the UI does not have game logic in them.
Then there's four directories:
Utility - static classes that assists in different calculations (such as line/circle intersection and so forth), all static classes/functions goes here.
Data Modules - Data classes that both stores and processes data. For example, "planet" class stores data about a planet, and has functions for processing data such as population growth, production, etc.
Data Managers - This is a collection of classes that helps in managing the data classes. An example is the EmpireManager class. It stores which Empire is doing its turn, all of the empires in the game, assists in the end-turn processing by going through each empire and calling their "ProcessTurn" function.
Screens - This is the UI for the game. Each screen is an independent class, with each screen being able to contain and display other classes. An example is the GalaxyScreen class. It displays the galaxy screen where you see the stars, fleets, starlanes, etc. It also stores "SystemWindow", in that if a system is selected, it calls the "SystemWindow.LoadSystem()" then draws SystemWindow as a part of GalaxyScreen's drawing code. The GameMain class also manages which of the main screen is currently displaying. If the name is "Screen", it's a main screen. If the name is "Window", it's a sub-window that can be stored and displayed by another window or screen.
There's still a lot of work to be done. The assets on Desura is not yet updated to work with this version. My plan is to finish the planet screen UI, then update both demo and full versions on Desura so you can drop them into the project and run it.
Yes, the Demo version will be runnable by compiling this project. So what will be the difference between the full and demo versions? As of now, the demo has all the races (4 of them), while the full will have more added in the future. Also, there will be less technologies and artwork for space combat, so basically a limited version, sufficient to let people try it and taste the possibilities of the full game's version. However, it's possible that people not buy the game, and just download the source code and provide their own content. But if you want to support this project, please don't hesitate to buy it! The funds will go directly into adding new assets (new races, new technologies, etc).
Since the game's engine is now open source, and the only thing I profit from are assets, I'm considering merging my "ReMoO" project into this game's source code (For more details, go to this post: http://beyondbeyaan.blogspot.com/2011/10/phase-one-completed.html). What that means is that when I'm done with Beyond Beyaan's features, as in that it's a fully playable game, I'll look into adding the ability to load MoO 1's files directly, and you'll be able to play it without requiring DosBox. Maybe in the future, if multiplayer is added, people can finally play MoO 1 multiplayer and see how their strategies work against other people :)
If you're interested in using some or all of my game's source code in your commercial project, let me know and we can work out the licensing agreement. There's already one person who've expressed interest in using parts of my game's code for their project to help speed their development along. The truth is, I won't be able to inspect all of the available 4X development projects to make sure they're not ripping my code off. So I'm trusting you all to be honest :)
Have fun digging in my 23k plus lines of code! :)
Friday, September 7, 2012
Status Update
I've finished the economy framework! Now I just need to create UI for it...
Here's what I have done so far:
Population now consumes resources, and their growth/decline is based on the available resources. If there's a shortage, then all population that consumes that resource suffers from the shortage.
The growth formula is as following:
Growth/Decline = population count * 0.05 * (shortage - (Space Usage / Total Space))
The value for shortage is calculated as follows: Total available resource / Total resource consumption. So if you have 100 food, but 200 population, the shortage is 0.5.
The value for Space Usage is total population space usage on the planet's climate type, while Total Space is number of regions multiplied by 10. If a race's space usage is 1, then that race can have 10 units of population per region. It accounts for multiple races (it tallies them all up)
So if you have 0.5 shortage, and the planet is half-full, then there's no growth or decline. Nifty, isn't it? It's possible to have two races, one starving and one prospering if both consumes different resources (Ores for one, food for other)
I've also decided that instead of having the game automatically scrap items and potentially causing frustration for players (Dude, where's my scout? syndrome), the game will simply prevent the player from ending his turn if maintenance costs exceeds the available resources. Then the user can click on financial information and have a list of ships and buildings that consumes that resource so he can scrap any of them from this screen. This will make things a lot more simple both in front-end and under the hood!
The empire also now stores resources, or if they are not storable, converts them into a storable resource. Regions now produce and consume resources. Everything's there, just need the UI...
Here's what I have done so far:
Population now consumes resources, and their growth/decline is based on the available resources. If there's a shortage, then all population that consumes that resource suffers from the shortage.
The growth formula is as following:
Growth/Decline = population count * 0.05 * (shortage - (Space Usage / Total Space))
The value for shortage is calculated as follows: Total available resource / Total resource consumption. So if you have 100 food, but 200 population, the shortage is 0.5.
The value for Space Usage is total population space usage on the planet's climate type, while Total Space is number of regions multiplied by 10. If a race's space usage is 1, then that race can have 10 units of population per region. It accounts for multiple races (it tallies them all up)
So if you have 0.5 shortage, and the planet is half-full, then there's no growth or decline. Nifty, isn't it? It's possible to have two races, one starving and one prospering if both consumes different resources (Ores for one, food for other)
I've also decided that instead of having the game automatically scrap items and potentially causing frustration for players (Dude, where's my scout? syndrome), the game will simply prevent the player from ending his turn if maintenance costs exceeds the available resources. Then the user can click on financial information and have a list of ships and buildings that consumes that resource so he can scrap any of them from this screen. This will make things a lot more simple both in front-end and under the hood!
The empire also now stores resources, or if they are not storable, converts them into a storable resource. Regions now produce and consume resources. Everything's there, just need the UI...
Thursday, August 30, 2012
Design Document
With the impending event of the source code becoming open source, I've started work on the design document for the game. I will be as detailed as possible, so hopefully this will answer most of your questions on how a feature should be added.
If you spot a potential issue or improvement, feel free to let me know! If the document is not clear enough, go ahead and ask questions. The goal is that you can help me complete this game.
So far, I only have two pages (I just started today). But I foresee it going up to 50 or so pages easily. There'll be a lot of details to cover. I think in a way, it will help me avoid feature creep if I establish the boundaries in the design doc :)
Here's the link to the document:
Beyond Beyaan Design Document
If you spot a potential issue or improvement, feel free to let me know! If the document is not clear enough, go ahead and ask questions. The goal is that you can help me complete this game.
So far, I only have two pages (I just started today). But I foresee it going up to 50 or so pages easily. There'll be a lot of details to cover. I think in a way, it will help me avoid feature creep if I establish the boundaries in the design doc :)
Here's the link to the document:
Beyond Beyaan Design Document
Tuesday, August 28, 2012
Slight revision to economy system
While working on the UI for planet screen, I noticed that there are a lot of managing for a planet. First, there's the regions that you develop, as well as buildings for it and specials for them. Second, there's sliders, one for each region type.
I'm also working on the underlying data structure for the economy system, and I'm having issues with having both regions and sliders. There are three types of outputs: Outputs that are generated automatically by population (similar to MoO 1/2's BC, each population creates BC automatically, regardless of what output they are in), outputs generated by population (you assign them to do this output via slider), and outputs generated by regions. I've been trying to brainstorm on how to handle this in the code. Then I realized something.
It's too much micromanagement for marginal benefits. Which would be easier, telling your planet to develop 3 farming regions then forgetting about it. Or telling your planet to develop those 3, then when they're developed, assign a segment of population to that output? What's the difference? The ability to "overproduce" that's already punished by inefficiency? The ability to assign to different outputs for a slightly increased output of a type? Those are insignificant in the grand scheme where you have 100+ planets.
So I'm going to rip out the sliders idea from the regional system. There won't be sliders, and the outputs will be calculated automatically based on the available resources and the population size. Let's say that you have a planet with 6 regions, and 3 are farming, 3 are undeveloped. It can hold 60 Humans, but have only 30 humans. Therefore, it is operating at 50% efficiency (30/60) across all regions. So each farming region outputs only 50% of its optimal output, and the undeveloped regions are outputting nothing. In order to get the most out of a planet, it need to be fully developed (all regions developed), and fully populated. That is a simple concept that players will understand.
Also, if it happens that a planet have more population than it can support (120/60), then it will use the inefficiency formula across all the regions. This can occur if a disaster strikes causing the planet to degrade to another type, or you landed more people than it can support. Population growth will then go negative.
So the "Population Allocation System" is now just regional systems similar to MoO 3, but in that population aren't restricted to a region. I still plan on "Output Allocation System" where there's sliders, but there won't be regions (similar to MoO 1) later after the basic game's done.
This should be a lot less micromanaging, and you can assign regions from planet list screen as well. Each region can have improvements and buildings to improve its output.
I'm also working on the underlying data structure for the economy system, and I'm having issues with having both regions and sliders. There are three types of outputs: Outputs that are generated automatically by population (similar to MoO 1/2's BC, each population creates BC automatically, regardless of what output they are in), outputs generated by population (you assign them to do this output via slider), and outputs generated by regions. I've been trying to brainstorm on how to handle this in the code. Then I realized something.
It's too much micromanagement for marginal benefits. Which would be easier, telling your planet to develop 3 farming regions then forgetting about it. Or telling your planet to develop those 3, then when they're developed, assign a segment of population to that output? What's the difference? The ability to "overproduce" that's already punished by inefficiency? The ability to assign to different outputs for a slightly increased output of a type? Those are insignificant in the grand scheme where you have 100+ planets.
So I'm going to rip out the sliders idea from the regional system. There won't be sliders, and the outputs will be calculated automatically based on the available resources and the population size. Let's say that you have a planet with 6 regions, and 3 are farming, 3 are undeveloped. It can hold 60 Humans, but have only 30 humans. Therefore, it is operating at 50% efficiency (30/60) across all regions. So each farming region outputs only 50% of its optimal output, and the undeveloped regions are outputting nothing. In order to get the most out of a planet, it need to be fully developed (all regions developed), and fully populated. That is a simple concept that players will understand.
Also, if it happens that a planet have more population than it can support (120/60), then it will use the inefficiency formula across all the regions. This can occur if a disaster strikes causing the planet to degrade to another type, or you landed more people than it can support. Population growth will then go negative.
So the "Population Allocation System" is now just regional systems similar to MoO 3, but in that population aren't restricted to a region. I still plan on "Output Allocation System" where there's sliders, but there won't be regions (similar to MoO 1) later after the basic game's done.
This should be a lot less micromanaging, and you can assign regions from planet list screen as well. Each region can have improvements and buildings to improve its output.
Tuesday, August 21, 2012
Preview of the new planet screen
To show you all that I'm still working on the game, here's a preview of what the planet screen looks like. This is when you have a system selected, then select a planet:
Let me explain what each region is. Starting with the left side: In top is the name of the planet, you can rename it by clicking on the textbox, if you own the planet. Under that is the display of the planet and its description (this same planet art will be used in space combat FYI)
Second from bottom is the planet's specials which will be displayed as icons. The plan is when you hover over a special, a tooltip will pop up explaining what the special is.
Bottom is the consumption and production list. It will display what your planet are consuming and producing.
Now on right side. The top area is list of regions, I plan on adding more details to it such as how much it can produce per unit of population, as well as how much it consumes.
Under the regions is the planet's current project. It could be terraforming, building a building, or building a region.
Finally the bottom area will be for sliders. There will be a slider for each region type. So if you have 3 mining, it will only have 1 slider for mining, and the production will be averaged between the 3 mines.
The bottom four areas that are blank right now are not implemented yet. I'm still working on the resource system, then when that's done, I will add sliders and productions/consumptions. Then specials and flesh out the region list. At this point, the economy should be working, but other UI (planet list, project list, etc) won't be done, so you can't build anything yet.
Over the past week, I realized that you can create a pretty complicated economy system with this implementation. Let's say you want to imitate production in real life. You research "Laser Cannon", but when it's researched, you get two technologies: Laser Cannon and Laser Cannon Production Region. Then you need to build a region for producing laser cannons, and you design a ship with Laser Cannon. It would require that you build laser cannons before you build the ship. And the laser cannons will have their resources that they will consume (crystals, alloys, gasses, etc). Then you research a new beam weapon, so you replace the region to produce the new beam weapon, along with its resource requirements, and so forth.
However, in default gameplay, I will keep things simple and just have ships require raw materials and labor.
Let me explain what each region is. Starting with the left side: In top is the name of the planet, you can rename it by clicking on the textbox, if you own the planet. Under that is the display of the planet and its description (this same planet art will be used in space combat FYI)
Second from bottom is the planet's specials which will be displayed as icons. The plan is when you hover over a special, a tooltip will pop up explaining what the special is.
Bottom is the consumption and production list. It will display what your planet are consuming and producing.
Now on right side. The top area is list of regions, I plan on adding more details to it such as how much it can produce per unit of population, as well as how much it consumes.
Under the regions is the planet's current project. It could be terraforming, building a building, or building a region.
Finally the bottom area will be for sliders. There will be a slider for each region type. So if you have 3 mining, it will only have 1 slider for mining, and the production will be averaged between the 3 mines.
The bottom four areas that are blank right now are not implemented yet. I'm still working on the resource system, then when that's done, I will add sliders and productions/consumptions. Then specials and flesh out the region list. At this point, the economy should be working, but other UI (planet list, project list, etc) won't be done, so you can't build anything yet.
Over the past week, I realized that you can create a pretty complicated economy system with this implementation. Let's say you want to imitate production in real life. You research "Laser Cannon", but when it's researched, you get two technologies: Laser Cannon and Laser Cannon Production Region. Then you need to build a region for producing laser cannons, and you design a ship with Laser Cannon. It would require that you build laser cannons before you build the ship. And the laser cannons will have their resources that they will consume (crystals, alloys, gasses, etc). Then you research a new beam weapon, so you replace the region to produce the new beam weapon, along with its resource requirements, and so forth.
However, in default gameplay, I will keep things simple and just have ships require raw materials and labor.
Thursday, August 16, 2012
Consumption code done!
The algorithm for calculating the amount of consumption for each planet is done! It's about 100 lines of code, and this is just for getting how much a planet can consume if the resources are available. This economy system is turning out to be more complicated than I thought, but I've broken it down into parts, and I believe that when it's all done, it will be very powerful and flexible. This is the steps involved in processing a turn for economy:
1. Subtract resources consumed by population (food, etc). If insufficient resources, then they starve.
2. Calculate the maintenance costs from all ships and buildings
3. Subtract the maintenance costs from available resources
4. If insufficient resources for maintenance, then disable buildings that require that resource, if that is still not enough, place the active squadrons that is idling adjacent to friendly system into reserves (different maintenance costs between active and reserve), if that still is not sufficient, scrap buildings that used that resource in its development, and add the recycled resources, if that is still not sufficient, scrap the ships in reserve that yields that resource, if that is still not enough, scrap the equipment from active squadrons that are not adjacent to friendly systems that yields that resource. At this point, there won't be any buildings or ships with equipment that consume that resource, so the economy is now stabilized.
5. Calculate the optimal consumption from all planets that are not blockaded. - This step is mostly done, don't have check for blockade yet. It was a bit tricky handling multiple races with different region space usage and sliders for each region type, but I think this was the hardest step.
6. Compare the total consumption to available resources, and assign percentage to the resources that are not sufficient to cover the consumption. For example, if your empire needs 20 Ores, but only have 10 Ores, then set the Ores to be 50% for all of your empire's consumption.
7. Finally produce outputs, using the penalty. For each region that consumes one or more resource, check to see if any have a penalty (i.e. 50%), and take the lowest percentage, both consumption and output are multiplied by that penalty. So Industry that consumes 10 Ores and generates 10 Industry will now only generate 5 industry, and consumes 5 ores. If a bioorganic factory have 75% penalty in Ores, and 50% penalty in food, it will produce and consume with 50% penalty. The outputs are then added to the empire's resources for next turn, it is not used in current turn's consumption.
8. Any remaining resources that are not consumed this turn (and is from current turn, not the new resources just generated) are then added to the empire and planet projects. For example, Research Points are not consumed in step 7, so you have 100 research points and 25 radioactives left, it is then assigned to the Empire Projects where research are done. Let's say that you have two research projects in Projects, first one costs 50 research points and second costs 75 research points, but also 50 radioactives. It assigns the resources to the first project, which then deducts 50 RP, completing the project. Then it assigns the remaining resources to the next project, which uses up all of research points and radioactives, leaving it with 25 RP and 25 radioactives to complete the project. Another example is if first costs 200 RP, and second costs 100 RP and 50 radioactives, and you have 100 RP and 25 radioactives, the first project consumes all of the RP, leaving 100 RP before completion, and the second project consumes the 25 radioactives, leaving 25 before completion, but didn't get any RP, so it still have 100 RP before completion.
This is a cascading system, and you can change the order of projects at any time to prioritize one above others if needed. Same will be of system and planet development. System development builds ships and other system-wide structures, while planet development builds buildings and terraforms.
9. Any remaining resources will be finally stored or converted if it is not storable for next turn.
Whew! The hardest step is done, with calculations for optimal consumption. I can now copy the algorithm for step 7. The rest of the steps are easy to do, except for 8 which will change the research system. Then I will implement the UI for regions in planets. At this point, I will finally upload the source code.
Thursday, August 9, 2012
Resources and Consumption
Here's an update on the resource system:
As you may know, I've added resources in a XML file, so players can create their own resources, whether or not it's preservable (food can't be stored since they only last a year for example, so excess are converted into some money). Also regions are defined in XML file, so players can create different regions, what restrictions they have (for example, Radioactive Mining regions are restricted to only the planets that have Radioactives special), and what resources they consume or produce.
While this may seem a simple system, I realized that the math behind this is very complicated. Each planet can have different regions, and different races. Planet specials and race bonuses may affect the output/consumption. The more you produce something from a planet, the more that region need to consume. Resources are interchangeable between planets, so if one planet is a mining powerhouse, it can supply other planets with ores/minerals.
The problem is now this: How do the game know how much you're producing, and how much you're consuming? Let's say that there's three regions defined:
Mining - Produces Raw Minerals
Refining - Produces Alloys, Consumes Raw Minerals
Industry - Produces "Production", Consumes Alloys
To correctly calculate the output and consumption in the same turn, it must loop through every planet, checking its output and consumption. So first loop will discover that Mining produces Raw Minerals, but since there's no raw minerals beforehand, Refining wouldn't be producing anything, and same for Industry. Then on second loop, it will say "we now have Raw Minerals, which regions use it?" and go through the same process again. Now Refining produces Alloys. Third loop will finally determine that Industry can produce Production.
Now, what happens if the player changes slider so that the mining no longer produces Raw Minerals? It'd have to go through the loops again. Due to the regions/resources being able to be defined by the player, it could become a complicated economy system with 5 or so iterations before the goods are usable by projects. Some region may consume two or more resources (for example, bioorganic factory consumes Ores and Food), some region may produce two or more resources (Radioactive Mining will produce radioactives and ores). Not to consider racial/regional/planet bonuses that affects the whole thing as well. How many loops do the game need to perform? How do it know when to stop?
So the system that worked in MoO 2/3 can't work here because in MoO 2/3, the resources are pre-defined (MoO 2 has command points for ships, and BC, MoO 3 has only Mining and Industry, a simple system). So I'm proposing a different system that will make things easier under the hood, and makes things interesting for the player: Turn-Based Processing.
What is Turn-Based Processing? Let's use the above example of Mining, Refining, and Industry. First turn, you don't have any Raw Minerals, nor Alloys. So Refining and Industry won't be producing anything. However, Mining will produce 10 Raw Minerals this turn. You then hit end turn, and proceed to second turn. Now you have 10 Raw Minerals, and the game tells the regions that "we have 10 Raw Minerals, tell me what you're making". It will report that the Refining can produce 10 Alloys, and consumes 10 Raw Minerals, and Mining will produce 10 Raw Minerals. You hit end turn, the game consumes all the resources by regions, then produces the goods from regions. You're now on third turn. You now have 10 Raw Minerals (from mining last turn), and 10 Alloys. The Industry region now finally can produce "Production" because you now have Alloys.
One interesting side effect from this is that if your mining planet was attacked and destroyed, you won't feel the effects until a few turns later due to the chain of production.
If the resources are not preservable, they last only one turn, long enough to be consumed. They usually have another resource that they change into (for example, each unit of food left over will be converted to half a BC) on end of second turn.
As you may know, I've added resources in a XML file, so players can create their own resources, whether or not it's preservable (food can't be stored since they only last a year for example, so excess are converted into some money). Also regions are defined in XML file, so players can create different regions, what restrictions they have (for example, Radioactive Mining regions are restricted to only the planets that have Radioactives special), and what resources they consume or produce.
While this may seem a simple system, I realized that the math behind this is very complicated. Each planet can have different regions, and different races. Planet specials and race bonuses may affect the output/consumption. The more you produce something from a planet, the more that region need to consume. Resources are interchangeable between planets, so if one planet is a mining powerhouse, it can supply other planets with ores/minerals.
The problem is now this: How do the game know how much you're producing, and how much you're consuming? Let's say that there's three regions defined:
Mining - Produces Raw Minerals
Refining - Produces Alloys, Consumes Raw Minerals
Industry - Produces "Production", Consumes Alloys
To correctly calculate the output and consumption in the same turn, it must loop through every planet, checking its output and consumption. So first loop will discover that Mining produces Raw Minerals, but since there's no raw minerals beforehand, Refining wouldn't be producing anything, and same for Industry. Then on second loop, it will say "we now have Raw Minerals, which regions use it?" and go through the same process again. Now Refining produces Alloys. Third loop will finally determine that Industry can produce Production.
Now, what happens if the player changes slider so that the mining no longer produces Raw Minerals? It'd have to go through the loops again. Due to the regions/resources being able to be defined by the player, it could become a complicated economy system with 5 or so iterations before the goods are usable by projects. Some region may consume two or more resources (for example, bioorganic factory consumes Ores and Food), some region may produce two or more resources (Radioactive Mining will produce radioactives and ores). Not to consider racial/regional/planet bonuses that affects the whole thing as well. How many loops do the game need to perform? How do it know when to stop?
So the system that worked in MoO 2/3 can't work here because in MoO 2/3, the resources are pre-defined (MoO 2 has command points for ships, and BC, MoO 3 has only Mining and Industry, a simple system). So I'm proposing a different system that will make things easier under the hood, and makes things interesting for the player: Turn-Based Processing.
What is Turn-Based Processing? Let's use the above example of Mining, Refining, and Industry. First turn, you don't have any Raw Minerals, nor Alloys. So Refining and Industry won't be producing anything. However, Mining will produce 10 Raw Minerals this turn. You then hit end turn, and proceed to second turn. Now you have 10 Raw Minerals, and the game tells the regions that "we have 10 Raw Minerals, tell me what you're making". It will report that the Refining can produce 10 Alloys, and consumes 10 Raw Minerals, and Mining will produce 10 Raw Minerals. You hit end turn, the game consumes all the resources by regions, then produces the goods from regions. You're now on third turn. You now have 10 Raw Minerals (from mining last turn), and 10 Alloys. The Industry region now finally can produce "Production" because you now have Alloys.
One interesting side effect from this is that if your mining planet was attacked and destroyed, you won't feel the effects until a few turns later due to the chain of production.
If the resources are not preservable, they last only one turn, long enough to be consumed. They usually have another resource that they change into (for example, each unit of food left over will be converted to half a BC) on end of second turn.
Monday, August 6, 2012
The Harsh Reality and The Important Decision
I'm sure that many of you are aware of the "MoO II Curse", but for those that don't, let me explain. Many people loved MoO II, and started on their game project in an attempt to create the next MoO II. However, they usually fail for a reason or other.
Why am I bringing this up? I think I've reached the point where I need outside help in completing this game. My newborn baby is still in NICU (she's doing well, just need to learn how to suck milk then she can go home!), our washer just broke down, and my free time is dwindling. It's getting harder and harder for me to devote time to this project, and I DO NOT want to see this fail like countless other projects.
So I'm planning on making Beyond Beyaan to be open-source, where people can download the game's code and compile it themselves. They just need a couple of free downloads, the Microsoft Visual Studio 2010 Express and SlimDX June 2010 Development SDK, and be familiar with C# and HLSL (shader) languages. However, the art assets won't be included, so you'll need to buy the game to get the assets. And the general population will have read-only access, if they want to help, they must make a "svn patch" that contains the code changes, and send it to me. I will then review the changes, and if it passes review, I will then apply it. I will include appropriate credit to contributors in the code. Over time, the policy may change, such as giving write access to trusted contributors.
The reasons why I'm doing this are:
First, I don't have as much time as I used to, so if you have time and talents to help out, it makes the development time shorter!
Second, my friend's server on which my code control has been residing has failed, and he's not going to set it up again. So now I have no source control, all the changes are now on my one machine. So I will set it up on google's source control (their requirements are that it be open source)
Third, in order to obtain outside help, they will need to be able to look at the game's code and add their contributions. It would be hard to restrict access to source code if I have anonymous internet people helping me out, it just takes one to pass around login credentials.
Fourth, there are so many MoO 2 clones that failed, and I don't want this to be another one of those. By providing this source code, they can contribute to this, and finally make one that's finished.
Fifth, there's another open source 4X project, the FreeOrion. However, the problem is that the combat is not turn based, it's not very similar to MoO 1/2. Beyond Beyaan is the closest clone that I can see. If you think I'm wrong, feel free to show me the game that's closer. I would be ecstatic if there's another game that's like MoO 1/2, but so far I'm disappointed. So I'm opening up the possibility of having a MoO 1/2 remakes/expansions using Beyond Beyaan as the base.
I plan on making a list of tasks that need to be done to make this game feature-complete, then those who want to contribute can pick one of those tasks and complete it. When a person contributes sufficiently that I can trust him/her, I can give him/her write access so he/she can contribute to the game directly. I will continue to work on the game, but I'm now at the point where I want it done so I can move on with other parts of my life.
My plea is now this: If you're working on your own MoO 1/2 clone, please consider putting it on hold and contribute to this project so that we all can finally get that MoO 2 game we want. The goal for Beyond Beyaan is to be able to support different features, so people can turn on/off features, so they can re-create any of the old classic 4X games. Maybe you can even re-create your game with Beyond Beyaan!
For those who may be upset about this, please consider the advantages:
1. The code is now accessible to everybody, so they can create their own 4X game, using this as a starting base (with the limitation that the game be not commercially used meaning the game is free for everyone)
2. People may think of new features, and contribute to Beyond Beyaan, making it more capable and flexible. Such as multiplayer and AI, both of which I'm not experienced in. Also, I'm incapable of programming or debugging sounds since I'm deaf.
3. Beyond Beyaan may be completed in a shorter time frame than if I'm to work on it alone. I've started work on this on Dec 2009, so it's almost 3 years since then, and I estimate that if everything goes smoothly, about a year before I finish the basics (UI, combat, etc), then another couple of years of polishing and balancing. With the new baby, I cannot promise even that.
If you feel ripped off for financially supporting the game, I hope that this may make you feel better:
I've received $256 in donations before Desura was set up, and $213.48 from Desura sales, totalling $469.48. This is before Paypal's deductions on both of those (Desura pays through Paypal). However, Desura will not pay me until I've reached at least $500 for each payment. So the amount in Desura is in limbo for now. While that may sound like a decent amount of money, it is nowhere near the amount I have spent on the art. I added up all the art payments, and the total was $1,436. I don't regret the payments, I wanted to show you that I've invested a lot into this game, and I want to see it succeed.
Again, the art and data assets won't be available unless you buy the game, you can't run the game without those. And if I actually start turning a profit, I will add more races and artwork to the game. So all the money earned from this game will go back into it (unless a fluke happens where it becomes the next minecraft and I make insane profits :) )
If people contribute artwork to be used freely, it will be included in the open source. I plan on adding the current assets once I recoup all the investments made, as a way to help expand the 4X userbase, and make the game available to everyone.
-----------------------------------------------------------------------
The plan is that when I'm done with regions implementation (economy system up and running, the sliders working in planet UI, etc) I will upload the new version to Desura. Then I will upload the source code to Google's source control. I will then create a list of tasks that needs to be done to make the game feature complete, both as a reference for myself, and for others who wish to contribute. Then I will resume work on the game as usual, but hopefully with contributions to speed the development up. I will post the instructions on setting the development environment up, complete with links to all downloads you may need.
I know this is a drastic change in how things are done, but I believe that this will benefit many more people than if I remained with the status quo.
Why am I bringing this up? I think I've reached the point where I need outside help in completing this game. My newborn baby is still in NICU (she's doing well, just need to learn how to suck milk then she can go home!), our washer just broke down, and my free time is dwindling. It's getting harder and harder for me to devote time to this project, and I DO NOT want to see this fail like countless other projects.
So I'm planning on making Beyond Beyaan to be open-source, where people can download the game's code and compile it themselves. They just need a couple of free downloads, the Microsoft Visual Studio 2010 Express and SlimDX June 2010 Development SDK, and be familiar with C# and HLSL (shader) languages. However, the art assets won't be included, so you'll need to buy the game to get the assets. And the general population will have read-only access, if they want to help, they must make a "svn patch" that contains the code changes, and send it to me. I will then review the changes, and if it passes review, I will then apply it. I will include appropriate credit to contributors in the code. Over time, the policy may change, such as giving write access to trusted contributors.
The reasons why I'm doing this are:
First, I don't have as much time as I used to, so if you have time and talents to help out, it makes the development time shorter!
Second, my friend's server on which my code control has been residing has failed, and he's not going to set it up again. So now I have no source control, all the changes are now on my one machine. So I will set it up on google's source control (their requirements are that it be open source)
Third, in order to obtain outside help, they will need to be able to look at the game's code and add their contributions. It would be hard to restrict access to source code if I have anonymous internet people helping me out, it just takes one to pass around login credentials.
Fourth, there are so many MoO 2 clones that failed, and I don't want this to be another one of those. By providing this source code, they can contribute to this, and finally make one that's finished.
Fifth, there's another open source 4X project, the FreeOrion. However, the problem is that the combat is not turn based, it's not very similar to MoO 1/2. Beyond Beyaan is the closest clone that I can see. If you think I'm wrong, feel free to show me the game that's closer. I would be ecstatic if there's another game that's like MoO 1/2, but so far I'm disappointed. So I'm opening up the possibility of having a MoO 1/2 remakes/expansions using Beyond Beyaan as the base.
I plan on making a list of tasks that need to be done to make this game feature-complete, then those who want to contribute can pick one of those tasks and complete it. When a person contributes sufficiently that I can trust him/her, I can give him/her write access so he/she can contribute to the game directly. I will continue to work on the game, but I'm now at the point where I want it done so I can move on with other parts of my life.
My plea is now this: If you're working on your own MoO 1/2 clone, please consider putting it on hold and contribute to this project so that we all can finally get that MoO 2 game we want. The goal for Beyond Beyaan is to be able to support different features, so people can turn on/off features, so they can re-create any of the old classic 4X games. Maybe you can even re-create your game with Beyond Beyaan!
For those who may be upset about this, please consider the advantages:
1. The code is now accessible to everybody, so they can create their own 4X game, using this as a starting base (with the limitation that the game be not commercially used meaning the game is free for everyone)
2. People may think of new features, and contribute to Beyond Beyaan, making it more capable and flexible. Such as multiplayer and AI, both of which I'm not experienced in. Also, I'm incapable of programming or debugging sounds since I'm deaf.
3. Beyond Beyaan may be completed in a shorter time frame than if I'm to work on it alone. I've started work on this on Dec 2009, so it's almost 3 years since then, and I estimate that if everything goes smoothly, about a year before I finish the basics (UI, combat, etc), then another couple of years of polishing and balancing. With the new baby, I cannot promise even that.
If you feel ripped off for financially supporting the game, I hope that this may make you feel better:
I've received $256 in donations before Desura was set up, and $213.48 from Desura sales, totalling $469.48. This is before Paypal's deductions on both of those (Desura pays through Paypal). However, Desura will not pay me until I've reached at least $500 for each payment. So the amount in Desura is in limbo for now. While that may sound like a decent amount of money, it is nowhere near the amount I have spent on the art. I added up all the art payments, and the total was $1,436. I don't regret the payments, I wanted to show you that I've invested a lot into this game, and I want to see it succeed.
Again, the art and data assets won't be available unless you buy the game, you can't run the game without those. And if I actually start turning a profit, I will add more races and artwork to the game. So all the money earned from this game will go back into it (unless a fluke happens where it becomes the next minecraft and I make insane profits :) )
If people contribute artwork to be used freely, it will be included in the open source. I plan on adding the current assets once I recoup all the investments made, as a way to help expand the 4X userbase, and make the game available to everyone.
-----------------------------------------------------------------------
The plan is that when I'm done with regions implementation (economy system up and running, the sliders working in planet UI, etc) I will upload the new version to Desura. Then I will upload the source code to Google's source control. I will then create a list of tasks that needs to be done to make the game feature complete, both as a reference for myself, and for others who wish to contribute. Then I will resume work on the game as usual, but hopefully with contributions to speed the development up. I will post the instructions on setting the development environment up, complete with links to all downloads you may need.
I know this is a drastic change in how things are done, but I believe that this will benefit many more people than if I remained with the status quo.
Wednesday, August 1, 2012
Population/Region issues resolved!
This will be the last "brainstorming" post, since I think I've resolved all the issues. The good news is, racial population limit on different planet types can be implemented! Here's how it will work:
Instead of having each region be managed individually, all of the same regions are lumped together in one slider for each race. So if you have two mining and one research regions on a planet, there will be only one mining slider and one research slider for each race.
But what about population limit? Let's say that for Zero People in Arctic type, they have 15 limit per region, and humans have 5. Each region have "10" space, and the space is equally divided between the two races, and there are 4 regions on the Arctic planet. So there will be 30 zero people and 10 humans on the planet.
Let's say that the planet has two mining regions, and two others. If I assign 100% of the zero people to mining, it's 30 people in the mining. If I assign 100% of the humans to mining, it's 10 people in the mining. However, what if I assign more than the regions can handle, say, 100% of both zero people and humans in the mining? This is where I take the idea of MoO 3's diminishing return here. For every unit of population up to the maximum capacity, they produce the full capacity. Then for every unit of population up to twice the maximum capacity, they produce half capacity, then fourth capacity after that, then eighth after that, and so forth.
So if the planet have 1 mining region, and 3 undeveloped regions, and it is fully populated, then 25% of the people will produce full capacity (15 ores for 15 zero people), 25% will produce half capacity (7.5 for 15 zero people), 25% will produce fourth capacity (3.25 for 15 zero people) and finally 25% will produce eighth capacity (1.625 for 15 zero people), for total of 27.375 ores. If you build a second mining region, it will drastically improve the output. It will now have 50% of zero people producing full capacity (30 ores for 30 zero people, already surpassing the one mining region's capacity with full population), and the last 50% producing half capacity (15 ores for 30 zero people), for total of 45 ores, which is about the twice amount of output if you had only one mining region! If 3 regions are mining, the total output will be 52.5. If all 4 regions are mining, then the total output will be 60 ores. The side effect is that there's also diminishing return on developing more regions to be of the same output, to encourage diversity! Is it worth building that last mining region for 7.5 more ores, or to build a research region?
The game will handle spaces automatically, so you just assign your races to whatever output you want them to be in. There won't be a hard limit to a output's capacity, so if you need extra food in an emergency, you can assign more people to food production, but it won't be as effective as actually building a farming region.
This will reduce the micromanagement a lot, and resolves the UI issues with different population limit! You can still build improvements for different regions. The output will be averaged between the regions with the same type of output. If a region produces 2 ores per unit of population, and another only 1 ores, assigning 10 to mining will result in 15 ores ((10 * 2 + 10 * 1) / (2 regions)), so there's incentive to improve all of your regions!
This will be how the population allocation work. The output allocation (like the one in MoO 1) will not apply diminishing returns.
Another note, the region development will be based on the population number, due to several reasons. First, there won't be any sliders on an undeveloped planet (no developed regions), so how to allocate the "production" of the population? Second, it makes sense that the more people you have, the faster a region will develop. So the "cost" for a region will be the "manpower". An example, if a mining region requires "50" manpower, and the planet has 10 people, it will take 5 turns to build that region (5*10). Different regions may have different amount of manpower requirement (research will require a lot more manpower than a farming for example). So even if you're a rich and powerful empire, you can't just "buy" a region, so the best way to do that is to transport people to that planet!
Last several notes, there won't be any regional specials, since it will clutter the UI and overwhelm the player, so there will be planetary specials only.
Each region type will be a technology, with the Mining, Research, Industry, Agriculture, and Commerce being the starting region types (level 0), and there will be different region types in the future to exploit different materials. For example, if a planet has Radioactives, you can't mine those until you research Radioactive Mining/Purification region, then you'll have to sacrifice one or more regions to be devoted entirely to this output. Then you can easily manage the planet output from the planet list screen.
Alright, I think this covers all of the region/planet economy design! Once this concept is implemented, I will attempt to publish the new version on Desura!
Instead of having each region be managed individually, all of the same regions are lumped together in one slider for each race. So if you have two mining and one research regions on a planet, there will be only one mining slider and one research slider for each race.
But what about population limit? Let's say that for Zero People in Arctic type, they have 15 limit per region, and humans have 5. Each region have "10" space, and the space is equally divided between the two races, and there are 4 regions on the Arctic planet. So there will be 30 zero people and 10 humans on the planet.
Let's say that the planet has two mining regions, and two others. If I assign 100% of the zero people to mining, it's 30 people in the mining. If I assign 100% of the humans to mining, it's 10 people in the mining. However, what if I assign more than the regions can handle, say, 100% of both zero people and humans in the mining? This is where I take the idea of MoO 3's diminishing return here. For every unit of population up to the maximum capacity, they produce the full capacity. Then for every unit of population up to twice the maximum capacity, they produce half capacity, then fourth capacity after that, then eighth after that, and so forth.
So if the planet have 1 mining region, and 3 undeveloped regions, and it is fully populated, then 25% of the people will produce full capacity (15 ores for 15 zero people), 25% will produce half capacity (7.5 for 15 zero people), 25% will produce fourth capacity (3.25 for 15 zero people) and finally 25% will produce eighth capacity (1.625 for 15 zero people), for total of 27.375 ores. If you build a second mining region, it will drastically improve the output. It will now have 50% of zero people producing full capacity (30 ores for 30 zero people, already surpassing the one mining region's capacity with full population), and the last 50% producing half capacity (15 ores for 30 zero people), for total of 45 ores, which is about the twice amount of output if you had only one mining region! If 3 regions are mining, the total output will be 52.5. If all 4 regions are mining, then the total output will be 60 ores. The side effect is that there's also diminishing return on developing more regions to be of the same output, to encourage diversity! Is it worth building that last mining region for 7.5 more ores, or to build a research region?
The game will handle spaces automatically, so you just assign your races to whatever output you want them to be in. There won't be a hard limit to a output's capacity, so if you need extra food in an emergency, you can assign more people to food production, but it won't be as effective as actually building a farming region.
This will reduce the micromanagement a lot, and resolves the UI issues with different population limit! You can still build improvements for different regions. The output will be averaged between the regions with the same type of output. If a region produces 2 ores per unit of population, and another only 1 ores, assigning 10 to mining will result in 15 ores ((10 * 2 + 10 * 1) / (2 regions)), so there's incentive to improve all of your regions!
This will be how the population allocation work. The output allocation (like the one in MoO 1) will not apply diminishing returns.
Another note, the region development will be based on the population number, due to several reasons. First, there won't be any sliders on an undeveloped planet (no developed regions), so how to allocate the "production" of the population? Second, it makes sense that the more people you have, the faster a region will develop. So the "cost" for a region will be the "manpower". An example, if a mining region requires "50" manpower, and the planet has 10 people, it will take 5 turns to build that region (5*10). Different regions may have different amount of manpower requirement (research will require a lot more manpower than a farming for example). So even if you're a rich and powerful empire, you can't just "buy" a region, so the best way to do that is to transport people to that planet!
Last several notes, there won't be any regional specials, since it will clutter the UI and overwhelm the player, so there will be planetary specials only.
Each region type will be a technology, with the Mining, Research, Industry, Agriculture, and Commerce being the starting region types (level 0), and there will be different region types in the future to exploit different materials. For example, if a planet has Radioactives, you can't mine those until you research Radioactive Mining/Purification region, then you'll have to sacrifice one or more regions to be devoted entirely to this output. Then you can easily manage the planet output from the planet list screen.
Alright, I think this covers all of the region/planet economy design! Once this concept is implemented, I will attempt to publish the new version on Desura!
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!
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!
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!
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):
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!
Subscribe to:
Posts (Atom)