Pre-Order the Game!

Desura Digital Distribution

Tuesday, July 26, 2011

Combat Screen Progress and Plans

I've finished the UI for space combat screen. There's a couple of things before the screen is done, and they're ship movement and firing weapons. Retreat, next ship, prev ship, and ship selection by mouse all works correctly. It also shows information about the selected ship on bottom left, and which empire's turn it is on bottom right. Here's a screenshot:



The button's artwork is mine, so they're ugly. Same for ship selection box, but this should give you an idea on how the battle screen will look like in-game.

One person wanted special equipment into game, and as I contemplated that, I realized that it's half the fun of designing ships. The current system is basically "Laser Cannon", "A better laser cannon, but with different name", etc, with no special stuff to spice things up. So I've decided to try and give special equipment a shot.

I discussed this idea with a friend, and I've decided on the final design concept for technology.

One of the first things I will do is to redefine the technology genres. So instead of Beam, Projectile, etc, it will be Electronics, Metallurgy, Physics, Energy, Chemistry, and Biology. Different technologies will fall under different categories.

I will then make it so that each technology is researched once. But to compensate for this, you can mix and match different parts to make a custom weapon. For example, if you've researched "Laser", and you've researched "Light Cannon", you can make a "Laser Light Cannon". If you've researched "Statis", and you've researched "Heavy Torpedo", as well as "Explosion Amplifier" that increases the radius of the torpedo's explosion, then you can make "Statis Heavy Torpedo" with "Explosion Amplifier" modifier.

To clarify, you will select an type of damage (Laser, Statis, Plasma, Rail, etc), then the type of weapon (Beam, Projectile, Missile, Torpedo, or Bomb), then size of mount, as well as any other modifications, to create your custom weapon. There will be restrictions on what kind of damage can be matched to what type of weapon. For example, it don't make sense to have "Laser Bomb" nor "Rail Torpedo", but it does with Plasma Cannon or Anti-Matter Torpedo.

Non-weapon items can be modified as well. For example, adding "AccuraMax" to your computer will improve its accuracy.

The ships themselves will be modified so that they have "Shield Points", "Armor Points" and "Structure Points", to allow for different effects of weapons.

As a result of the technology and ship overhaul, the combat screen will be put on hold until this is done. But this should make the game better and more flexible in different types of technology.

The screens that I will have to redesign will be the Research Screen and Ship Design Screen. Diplomacy may need to be tweaked to allow trading of technologies, and spying may be changed in how it works. When those are done, then I will go back to combat screen and add firing/moving.

As usual, feedbacks are welcome!

Saturday, July 23, 2011

Progress Report and Preview

This past week I've been working on the design and ship placement for the combat screen. I've finally finalized all the details for it, just need to implement them.

Here's the details. If you've played X-Com Ufo Defense, you will be familiar with this approach. On your turn, you can select any ship, in any order, then you can select a weapon to fire (it would default to first weapon). Once that weapon is fired, that weapon's "turn" is over. You can fire other weapons on that ship, or change to another ship and fire with its weapons.

There will be four buttons for selecting ships (you can also left-click on one of your ships to select it). They will be "Next Ship", "Prev Ship", "Done, Next Ship", and "Done, Prev Ship". "Done" means that this ship is done for this turn, so when you click on next ship, that ship won't be selected. You can select it by left-clicking the ship on screen, if you hit the done by accident.

There are also two other buttons: Retreat and Auto-Resolve. Retreat will tell your current ship to flee, and auto-resolve will let AI take over the battle if you don't want to handle it.

Finally, when you're done with your turn, you press "End Turn", then the next empire in list will have their turn, and so forth until it's your turn again.

I realized that if I include all the planets in a star system in one combat, it's not fair for the defenders (which it is IRL, if you've read Ender's Shadow, you'll understand why), as well as complicate the ship placement code. So I've modified my design idea to allow the attackers to pick a planet to attack, then the defenders will defend that planet. If two fleets encounter each other in empty space, then there won't be any planets. However, there's some random chance for asteroids to be present in the battle field.

There are five weapon types in Beyond Beyaan. They are: Beam, Projectile, Missile, Torpedo, and Bomb.

Beam have infinite ammo, can fire every turn, and is generally more accurate than Particle weapons. They will have similar weapon effect as MoO 1, as shown in my test code that I've posted previously:


Projectiles have finite ammo, but is generally more powerful than beam weapons. They're good for up and close combat. They can fire every turn.

Missiles have finite ammo, have "smart" pathfinding that will avoid obstacles in its path to its target, and are the most powerful weapon genre for ship to ship combat. They can be destroyed by other weapons.

Torpedoes have infinite ammo, can fire every other turn, and is generally weaker than missiles. They also have "dumb" pathfinding that moves directly to their targets, regardless if obstacles are in its way. It can hit other obstacles, such as asteroids or other ships (even your own ships if you're not careful!)

Now, before I talk about bombs, one thing that bothered me in MoO 1 and 2 is how fast the bombs get obsolete compared to other weapons. You can use torpedoes or missiles to destroy bases and population, without using bombs. While this may be theoretically realistic, it removes bombs as a weapon to be desired on your ships. So in order to effectively bomb planets, you need bombs, not other weapons. All weapons that are not bombs will have its damage divided by 100. For each 100 damage on planet, you kill a population unit. So in order to kill 1 population unit with a non-bomb weapon, it'd have to do 10,000 damage (10,000 / 100 = 100 damage that reaches the planet, and 100 = 1 population unit). If you do less than 100 damage, you still inflict damage (if you do 50 damage, you kill off 0.5 population unit).

Now, when you use a bomb, its damage isn't divided when it's used against planets. So bombs can kill a lot of people (if you have 10 bomb mounts with 20 damage each, you kill 2 population per volley per ship) for example. But when bombs hit other ships, its damage is reduced. So it's not good for ship to ship combat.

Now the description of bombs: They have limited ammo, can fire every turn, and can be fired from anywhere to anywhere (you can try and bomb other ships as a last resort). However, they travel slow compared to torpedoes and missiles, and if they miss their target, they will keep on going. They don't have any propulsion to steer them. They can be destroyed by weapons, or blocked by sacrifical ships. On the other hand, they're more armored than missiles, so it's harder to destroy them.

There are two parts to a bomb, the "Population" damage, and the "Ecology" damage. For example, a biological bomb targeted toward their population will be high in "Population" damage, but low in "Ecology" damage. On the other hand, a nuclear bomb deals half to population, and half to ecology. There are some bombs that's focused on destroying the ecology. You can turn a planet into a toxic or radiated during the course of space combat.

The combat ends when the only fleets (including the planet) left are those that's either allied or non-aggression towards everyone else. For example, four fleets meet for combat. One is allied with two others. The last empire have non-aggression pacts with two empires. The other two are non-aggression toward each other. This is a tough situation because only two empires can directly fire on each other, the other two will have to either pick sides, or retreat. When one of the two empires are defeated, the battle ends. If the two bystanders decides to pick sides, it will damage the relation with the empire they attacked, and improves the relation of the empire they supported.

If you're attacking a planet, its population must reach 0 before the battle is done, or if you retreat. However, if you've destroyed all the defending ships, it will ask you if you want to completely bomb the planet, or retreat. So you don't have to do the tedious task of bombing it each turn. If you think you can't fight off the defending fleet, you can send bombers on a suicidal mission to destroy as much as possible before they die.

TL;DR - Space combat will be awesome!

I've finished the ship placement algorithm for now. It looks to be working correctly, so I'll start work on other areas. I've added a display for which empire's turn it is (it also lists all empires involved). I'm now working on selecting ships as described earlier. When that's done, as well as the end turn, I will then start work on actually firing weapons, and damage handling/display. If all goes well, I might have the combat working within a month!

Also, I've got new artwork for the title screen, here's a preview:

Tuesday, July 19, 2011

Data File Structures and Thoughts on Spying

I haven't had much chance to work on the game the past week due to personal/family events. However, I had some chances to think over how the saving/loading games should work. It should be readable by players, so they can edit it themselves if they want, without resorting to a third-party editor. It should be well-organized so I can verify the file integrity easily. Due to those two big reasons, I've decided on the XML file format for saving/loading.

I'm sure many of you are familiar with XML data structure. For those who aren't, it's a fairly simple structure that you can grasp within minutes. It'd probably look like this for example (After posting, it broke the stuff with > and <, so I'll replace them with () ):

(STAR_SYSTEMS)
(STAR_SYSTEM name="Beyaan" color="red" size="3")
(PLANET name="Beyaan I" type="TERRAN" maxPop="100" pop="78" owner="2" ... /)
...
(/STAR_SYSTEM)
...
(/STAR_SYSTEMS)
(EMPIRES)
(EMPIRE name="Roman" id="1" race="Humans" ...)
(TECHNOLOGIES)
(TECHNOLOGY type="particle" id="1" level="3" currentPoints="142" ... /)
(/TECHNOLOGIES)
(CONTACTS)
(CONTACT id="2" relation="43" spyEffort="24" spyDefense="10" ... /)
(/CONTACTS)
...
(/EMPIRE)
(EMPIRE name="Null and Void" id="2" race="Zero People" ... /)
...
(/EMPIRES)
(RACES)
(RACE name="Humans" beamResearch="1.0" particleResearch="1.2" ... /)
...
(/RACES)

As you can see, it's easy to read and modify. I also plan on changing all the current data files so it use XML. My goal is to make this game moddable so if I for some reason stop maintaining it, the users can modify it to suit their taste. So far, those fields are/will be moddable:

AI scripts
Technologies
Races (the types of perks are hard-coded however)
Artwork (I won't compile them into the exe, you will be able to see the artwork and replace them easily)
Starting Ships (this will be stored in technology file, since it relies on technologies from the same file)
Space Monsters/Sentinels/Other neutral ships that either is at a system, or roaming.

However, the gameplay mechanics won't be able to be modded. For example, you can't change how colonization works (you colonize by migration). I think the above fields should be sufficient to give the game high replayability.

Now on the subject of spies. I've been trying to think of a good system for this. I've finalized how spies will work, but not how to fund/finance them. How the spies will work is that they will be involved in espionage only. The game's elements is pretty simple, there's no infrastructure, so no sabotage. There's no unrest code, so spies can't incite revolts. Theoretically spies could plant bombs on ships and destroy them, but since there's no multi-racial population, the standard prodecure would be to bar any aliens from entering the military ships. So it'd be pretty impossible to do that. The only option left is stealing technologies. But that's not insignificant! You could be lacking in beam weapons, and you are in contact with a race that's proficient with beam weapons, they'd make an excellent target for your spy efforts.

Stealing technologies won't work like in other games, where if you're successful, you grab a new technology. If a spy is successful, he will grab "research points" and pass it onto you.

For example, if Plasma Cannon requires 1,000 research points, and Plasma Cannon II requires 2,500 research points, and a race you're spying on have both researched, your spy can grab up to 3,500 points (1,000 from first level, 2,500 from second level). It does not hurt their research, the spy merely copies research notes and passes it to you. However, more points requires more luck, so you'll be getting maybe 100 or so points on average. So you can steal technology, but not everything at once.

However, if you have 500 points in Plasma Cannon, and the race have 350, your spy won't be able to grab anything since you're ahead of the other race.

Another thing that spies can do is enable you to research new fields. If you're not at stage for plasma cannon, but your spies grab at least one point in this field, you now can start research on this weapon. So if a race recovers an artifact from Beyaan, or some other artifacts planet (they will be normally unresearchable), you can grab some notes on it, then start research on it.

Now, here's the hard part. I'm beginning to see why MoO 2 and 3 used spies as persons that you have to train first before sending them to spy. In MoO 1, if you slide the slider to full, it'd use up 10% of your total income per race, and 20% for defense, so the max you could spend on spy/defense would be 70% (5 races x 10% + 20% defense). However in Beyond Beyaan, a game may have more than 5 races. So what should the sliders represent? It can go from 0 to 100%, but 100% of what? Should it be based off of your income? Or the amount of population in your empire? Or their population? Or some random value? If I have 100% spy effort on Zero People, does that mean 100% chance of success, or 100% of possible funding for that empire? How much should "possible funding" be? 10 BC? 1000 BC? Etc etc. If you have any ideas for this problem, please post a comment!

Monday, July 11, 2011

In-Game Menu and Diplomacy Done, Preview of Combat

I've finished up the core functionality of diplomacy screen, finally. You can now receive messages, and decide whether or not to accept (if available) the offer. It also shows outgoing/incoming message icons on top of avatars.

With that out of the way, I decided to do a quick implementation of the in-game menu where you can go to set up game options, save, etc. It now can start a new game from there, or go back to main menu. Saving/loading still haven't been implemented. I hope to do that soon though!

With most major screens done, I have two major screens left to do: Space Combat or Manage Ship Designs. Hmm... which sounds more exciting? Since I'm a bit sick of doing UI stuff for different screens, I decided to actually start implementing space combat!

I modified the space combat screen (shown in a post a long time ago) to use the new ship design code, and to allow for more than two fleets to fight at once. I had to change how ships are placed, and modify some other code, to allow for this change. I hacked together a simple combat scenario (all empire's starting fleets start at 0,0, with each fleet having three different ships) so it'll bring up combat screen at end of turn processing. This is what it looks like when you have five empires involved in a combat:



Each fleet is put at a point that's equidistant from other points, and each fleet have its ships positioned on a tangent line at that point. So you can see the five fleets with their ships facing the center of the circle. The more ships/fleets there are in a combat, the bigger the combat area will be.

This is a closeup of one of the fleet in the combat screen:


This is just a quick hack to get the combat screen to work. There's a lot of work to be done! I need to improve ship placement (they get overlapped), then do the check for possible conflicts in a correct way (I hacked it so it'd always conflict with all fleets), then rest of the combat stuff.

Saturday, July 9, 2011

Diplomacy 90% Done, and First two of Meet the Races

Most everything for diplomacy has been implemented, except for relations improving due to trade/research over time, and icons for "Outbox/Inbox" messages that you can click on to see the messages that has been sent from other empires.

Let me explain how certain features will work (Note, subject to gameplay balancing and tweaking):
Trade will start at -5% and increase up to 15%. The percentage is based on gross income of your empire and the empire you're trading with.

Shared Research is that, when you and an empire have this agreement, you share what you're researching. So if you research 10 points into Laser Cannon, both the other empire and you gain 10 points (or 5 each, subject to balance) in Laser Cannon. So this way, you can research items that you're advantaged in (for example, if your race is good with beam weapons, then you gain bonus with that field, and it will affect the points that the other empire get)

Non-Aggression allows you to pass next to their fleets, and not fight at unclaimed systems. However, they can attack you if you're next to their inhabitated system.

Alliance allows you to be adjacent to their inhabitated systems.

Harass Selected Empire, if accepted, will hurt the relation with the selected empire and both you and the empire you've asked, as well as your relation with the empire you're asking. Reconcile does the opposite, but hurts your relation slightly with the empire you're asking still. The reason is that when you beg the other empire to do something, it degrades you in their view. Think of begging your big sister to stop a bully from picking on you.

Now here's the screenshot of the semi-final diplomacy screen!


The artist has completed two race portraits, so I think this would be a good time for me to introduce two of the races that will be in the game.

First up is the Humans. You can see his portrait from the screenshot above. They love war, they create businesses around it. They specialize in ballistic weaponry, missiles, infrastructure, and agriculture. They're definitely not your "Star Trek" happy peace mongering humans.

Next is the Zero People. They're sentinent computers, devoted to making the universe a series of ones and zeroes. Their creaters was easily overpowered by the Zero People because they relied on computers for nearly everything, and when Zero People gained sentience, it was a simple matter of taking over everything. They specialize in infrastructure, pop growth, computers, and production. This is their portrait:



Humans and Zero People races hate each other. It will be difficult to maintain a stable relation between those two.

Wednesday, June 29, 2011

Preview of Diplomacy Screen

There's still a lot of work to be done, but I thought I'd update you all on my progress with the diplomacy screen. The interface placements are not final, I'm still tweaking and seeing what looks good. The relationship bar is fully working, it shows your current relationship with that empire, along with a label for it.

The plan is to have each item in the list on left be a button, and when you click on one item, it brings up that empire and list of actions you can do with them on right. When you've selected an action, it saves your selection, and is sent to them the next turn.

If you've received a message, you can open it and choose to accept or not the message (trade, etc).

I'm thinking of adding icons to represent different statuses, such as War, Allied, Non-Aggression, Trade, etc somewhere on each contact. The diplomacy framework is done, just need to set up the interface in a clean and clear way.

Here's the preview of the diplomacy screen. It is subject to change, but thought you'd like to see what I have so far:


Yes, that is the human art that my artist provided. My "Zero People" race art totally stinks compared to human art!

Saturday, June 25, 2011

Planet bonuses and new stuff

I've implemented planetary bonuses that affects different fields. The artist completed a new batch of artwork, so I was able to finish the final layout for some areas. The planet list/information screen as shown in screenshot is in their final positions. The population information doesn't feel right, but for now, it'll do. I really like the visual display of planets in the list, makes it feel more alive.

I also was able to fix the star's shading so it's more white in middle. Per a user's request, I've zoomed out for the screenshot.

Here's the screenshot!



Diplomacy screen still need to be finished, as well as relationship updates, then the new screen (notice the new button in taskbar?) for viewing your list of designs and scrapping/obsoleting them. After that, the remaining tasks are the AI, saving/loading, and space combat.