Pre-Order the Game!

Desura Digital Distribution

Saturday, January 22, 2011

Nebulaes and Black Holes

In Master of Orion, if your ships move through a nebula field, their speed are reduced to 1 parsec per turn. This adds some minor tactics to the game, but don't really impact it. At most, it gives you or them opportunity to gather their ships for defensive purposes, but other than that, it does nothing really to affect the game play. I think if you fight in nebula field, it also renders your shields ineffective (not sure if that's in MoO 1 or 2, but I think it's 2)


I've thought on the topic of nebulaes for a while now, trying to figure out how to add "splashes" of nebulaes to the galaxy. While looking at noise functions, it occured to me, why not have the entire galaxy covered in one big nebula field, with varying densities in each grid cell? Then if your ships can move "20 units", and one cell have 10 density, and another two have 5 density, it means you can move 3 grid cells. If one cell have 20 density, you move one cell, and so forth. If the density exceeds your movement points, it'd take more than one turn to move one cell.


The pathfinding algorithm will find the quickest path, but with this new feature, it won't always be a straight path.


This idea led me to another idea, having different stars be "seeds" for the nebula field algorithm, so the nebula will look logical and "fits" in the galaxy screen better than random noise function. With this idea, I thought of black holes, and their roles in MoO 2/3. In MoO 2, it does nothing except block direct paths. In MoO 3, it does nothing at all.


I thought, how about having black holes be the maximum seed for the nebula? They will have 100 density, and pull up the density in surrounding fields, causing massive travel adjustments. So after all the stars are generated, a certain percentage of them are converted to black holes (later I will add an UI element that allows the user to modify this percentage). My art for black holes are crappy, it will be replaced by a better art later on, so don't worry about that. Now, with all those ideas implemented, the galaxy starts to look like a nice galaxy instead of boring black background. (I also don't have art for nebula, that will change later on)


Here's a screenshot. Note, the noise function still need tweaking, as there's square artifacts (you can see squares easily, and I don't mean the squares in the grid cell art, but square fields of density)


Monday, January 17, 2011

Victory Conditions

I think I should post on my design ideas, not just the programming progress. So I'll start a series of game ideas I plan on implementing in my game.

I'll start with the victory conditions. In order to understand the conditions, we need to know the backstory. The entire galaxy have been inhabited by the "Immortals". They are technologically advanced, so much that they've been looking for alternative types of entertainments. One proposed the idea of a gladiator-style arena in a cordoned off area of the galaxy. The players involved will use races that've been genetically created for the game. A player may decide to use a race that've been designed already, or to create his own. All races involved follow a set of rules, so no race is more advantaged or disadvantaged than others.

After all Immortals selects a race, the area is set up for the game, with special space monsters placed to guard valuable planets, and some technology artifacts to spice up the game. A system is set aside, called "Beyaan", that oversee the game and ensure that rules are followed. It is also guarded by the Immortals so the races can't invade it.

Now the victory conditions are the following:
Be the sole survivor - Wipe out all other races
Be the leader - You must be allied with races, and elected their leaders. All other races not allied with you must be wiped out
Kill the Immortals - Challenge the Immortals in Beyaan and crush them

Each of the victory will have a different ending. Sole survivor results in you winning the award. Leader results in the award being shared with other players. Killing Immortals results in your exile and you wipe out the immortals with the new superior race.

I've always disliked the diplomatic victory in MoO 1/2, I felt it was a bit too easy. Command a lot of planets so you can have a lot of votes for yourself, and bam! victory. In this, you are required to make and keep allies, and to convince them that you should be the leader. Not only that, all other races not allied must be either wiped out or form alliance with you.

Wednesday, January 12, 2011

Planet screen mostly done

Slider UI component wasn't hard to do. What was hard to do was the output allocation. For example, if I increase my Research allocation, another output must decrease so the total output is 100% (I can't have 35% in research, 35% in construction, and 35% in waste management, for total of 105%)


Last night I coded in the algorithm for output allocation, but it wasn't working. It was late at night and I thought I had a clever way of doing it. But today when I looked at the code, I was like "What was I thinking?" and had to scrap a lot of it. But the good news is, it's done! There's a bug with the arrow buttons not changing the amount, but I'm confident that it's a minor bug and easily fixed.


Note, I haven't added labels yet, but you can see the sliders in action! Note that the top two is a bit different color than the bottom four? It's because they're disabled (waste management and agriculture). You cannot modify those because those are required to keep your population healthy. Racial bonuses and technology improvements can increase the output, therby decreasing the required input.



The area above the sliders will be used for displaying the planet information (amount of population, planet terrain type, amount of infrastructure built, etc). The area below sliders will be the construction item that the planet is building. Note the multiple planets per star system, so many that there's a scrollbar required to be able to view all of them. This won't be normal, I recommend 0-6 planets for a normal game. But the functionality is there in case people want to play with more than 6 planets per system.

Tomorrow's agenda: Fix the slider's arrow buttons, add the planet info and labels in display, and add end of turn processing.

Monday, January 10, 2011

UI components nearly done

I've managed to tweak my scrollbar so it can be either vertical or horizontal, and it works without any problems. I'm in process of adding a bit more code so it can act like a slider if I tell it to.

I've also worked on the system display. It now lists the planets, and have a "system screen" on top right when a system is selected. When you select a planet that's owned by you, you see six sliders. The six sliders are for the following fields:

Construction (ships, defense, shield, etc)
Research
Infrastructure (get 1 unit of infrastructure per population unit for maximum output)
Revenues (Taxes, trade goods, etc, that pays for your expenses)
Agriculture (Need to feed your people, this slider cannot be adjusted)
Waste Management (All of the above fields generate varying amounts of pollution, this slider cannot be adjusted)

I've decided to change the ship construction from system-wide to planet-wide. This is less confusing for the players, and can prevent some kind of exploits against the AI players. My goal is to try and put both human and AI players on the same ground. in MoO 1, you could exploit the population growth (do one turn, then transport 2 or 3 people from your 50/100 homeworld to a new planet every turn) In Beyond Beyaan, people migrate on their own, so no population relocation exploit. Also, when you colonize a planet, it starts with no population, people will have to migrate there. So no free population from colony ships. They're just there to create an habitable environment for the people to move to.

Agriculture's slider cannot be adjusted because you must feed your people, and also to prevent any exploits that I may have missed over the AI players.

Infrastructure works like this: If a planet can support 60 people, it can have up to 60 infrastructure. Output works like this: (lowest of two fields (infrastructure or pop) + remaining pop, if any, default output without infrastructure)

So for example, if I have 50 pop and 75 infrastructure, I get 50 units of output. If I have 75 pop and 50 infrastructure, and the pop's default output without infrastructure is 0.5, then I have 50 + (25 * 0.5) = 62.5 units of output.

Those units of output can be applied to farming, revenue, waste management, construction, infrastructure development, and research. So it's better to have a full pop with full infrastructure for maximum output.

There will be technologies that increase the output of a particular field (construction for example) from each input unit. So if I have 20 units of production into research, without any bonuses or technology improvements, I'd get 20 research points. I research an improvement in research techniques which adds 0.5 output for each production unit, I now get 30 research points from 20 production points.

I should be done with planet development/sliders by end of this week, as well as End of Turn processing. Then after that, Fleet movement, exploration, and colonization, plus migration!

Sunday, January 2, 2011

Some art update

A friend looked at my game, and remarked that something was a bit off. After we deliberated on it, he found it. The stars weren't white in center. This posed an interesting problem, in order to have a white center, I can't just use a grayscale star bitmap, then shade it a certain color, because that'd lose the white center. So I had to draw different stars, one for each color, and render those instead.

I'm not good with pixel art, but I'm proud of my star art :) I realized that I haven't posed any screenshots in a while, so I'll show the current "New Game" screen. This is what the new game screenshot looks like, with a ring galaxy.