Pre-Order the Game!

Desura Digital Distribution

Friday, April 22, 2011

Technology Data Structure Done, Working on UI, and some other comments

The technology data structure is organized and ready to go. How it works is in the technology.txt file, each line looks like this:

The character "|" separates each value, and the character "=" separates the key from its value.

So techType=beam would have the key of techType, and the value is "beam". I store each key with its value in a dictionary, and then after each line is loaded into the dictionary, I call the appropriate tech (Beam for beam type, etc) loading function. It will then attempt to set up a tech class with the values passed into it. If any value fails or is missing, it will add to list of errors specifying exactly which key is having problems (or missing keys) so you can easily fix it. Hopefully this format would be easy for users to modify.

Now with that set up, I can start on ship design screen. I will just give myself every technology already researched for now so I can focus on ship design, then when that's done, I will work on the research screen.

Now to ship design, here is how each component will work:
There will be different computers, each with its own advantages and disadvantages. One computer handles beam weapons better than particle weapons, for example, while another analyzes the enemy's ships' weak points and increases the weapon damage against them, and so forth. Improvements in research on a computer will improve that computer's advantages, but it won't improve the disadvantages. So if you want a missile boat, you want a computer that's designed for missiles (better guidance and better damage).

There are different shields and armors, designed to withstand against different types of weapons. If you're designing a missile boat, it's designed to stay out of direct conflict, so you want armor that does well against missiles/torpedoes.

There are also different engines. Older engines tend to take up less space, while this may not be realistic in real life, it makes you choose between faster ships that have less weapons, or slower ships that have more weapons.

There are four types of weapons:
Beam weapons have two variables that you can tweak: The amount of barrels, and amount of capacitors. The more barrels you have, the more damage it does in one shot (think of a minigun, but with all barrels firing at once). The more capacitors you have, the more times it fire. This gives you options between having a highly accurate computer so you can focus on increasing damage, or having inaccurate computer but spam "bullets" to make up. Each fire will hit at most one ship. So if your 100x barrel laser cannon fires on a group of small scouts with 10 hp each, doing 1,000 damage, you only kill one ship. You may want 10x barrel laser with 10x capacitors so you can fire 10 times and kill 10 scouts.

Particle weapons have the same variables as beam weapons, but the more barrels means it have higher rate of fire, so it fires more particles (slugs, bullets, whatever you call it). It does not increase the damage of each bullet, just the amount. However, particle weapons are good against missiles and shields, so that's their primary advantage.

Missiles have racks (how many missiles you can fire per turn), and reserves (how many missiles total you can fire in a combat). Missile's strength is in it's ability to avoid obstacles like other ships and asteroids that is not its target, and to inflict great damage against individual ships. Missiles are good against capital ships.

Torpedoes have capacitors (the more capacitors a torpedo have, the more damage it inflicts since it have more energy). Capacitors will require a turn to recharge. The disadvantage of torpedoes is that it's dumb, it won't avoid obstacles. But it explodes on contact, damaging nearby ships, not just its target. Torpedo also "carries over" damage, so if a torpedo does 100 damage, and there's 10 ships with 1 hp each, all ships will be destroyed. If there's two groups of 1 hp ships, torpedo will kill 10 ships in each group. If there are 5 torpedoes launched from a group of 5 ships, the damage is carried over, so if one does 100, it now does 500 damage.

Bombs are similar to missiles in terms of storage, but are similar to torpedoes in terms of dumb guidance. You can drop bombs from anywhere, and they continue on a direct course until it hits something. Torpedoes will detonate when they reach the designated spot automatically, but bombs just continue. You can even launch bombs against other ships, but if they move, the bombs will miss.

I'm thinking that there won't be "Special" field in this game, due to some items that can have special attributes (for example, ion cannon will decrease the target computer's performance as well as inflicting damage).


  1. Wouldn't it be better to use XML for technology data structure?
    Your format is close to XML in disadvantages (like load time), but the not in advantages (like easy to edit/change with already existing editors or readily available libraries).
    You could provide an XSD for the users to let them verify their XML against your rules.
    You could even create an XSL transformation as a first step. That way you could still use your current format, while the users could create theirs in XML.

  2. This post is obsolete :D

    The technology data is currently using XML files, and I do plan on using XSD to validate the XML files, eventually.

    I also plan on changing the racial information files to XML as well. All data will use XML or .CS (for scripts).