Pre-Order the Game!

Desura Digital Distribution

Monday, December 26, 2011

Data Driven Fleets done!

I've overhauled the fleet/ship system in the game so that it's now data driven. In the data file, I've specified three ships for the first system, and two ships for the second system, and no other ships. You can see that two systems have a fleet adjacent to them, but no other systems. This matches the data files exactly.



Not shown, but in the design screen, when you open it for the first time, you see the design of the first ship in the data file.

Now, how does data work with ships? There's an element named "StartShips" that contains all the ship designs (note, if your StartSystem references to a ship that's not listed, it will give you an error)

Each Ship have four attributes:
addToBlueprints - Should this design be added to the list of available designs for the player to build? If you want to create a game where a race starts off with an ancient but advanced ship, but can't build more of those until they've researched all the required technologies, you can do so!
name - This is also used in StartSystem that references to a particular ship
size - Must be one of the available sizes, or it will throw an error
style - Must be within range of available styles for that size, or an error is thrown

Each ship have a list of Equipment, with each equipment containing four attributes:
mainItem
mountItem
modifierItems - This is one value, with each item separated by a comma.
count - amount of this

You can create the classic two scout and 1 colony ship starting scenario by specifying this in the home system (with the corresponding ship designs already specified in list of ships):

[Ship name="Scout" count="2" /]
[Ship name="Colony Ship" count="1" /]

In fact, that's what's shown above in the screenshot.

There are some bugs and stuff that I need to refactor, then I'll start on the production screen.

Edit: Forgot it don't like the special characters for XML code...

Friday, December 23, 2011

Starting Systems data done!

I've changed from code-driven to data-driven for starting systems! Next up is starting ships, then I'm done with data conversions!

I want to explain how it will work with the data for starting systems. In each race data.xml file, there is one element named "StartSystems". It contains a list of elements, all named "System". It will process each system starting from the first to the last as in it will place the first system first, and so forth.

Each "System" have three attributes:
override - Should this system be cleared of all planets before proceeding with planet placement?
inOrder - Should the list of planets in the data file be the same order in the system in the game? Only applicable if replacePlanets is true. This is useful if you want to create a specific type of system. For example, if you want to create a Sol system for human, you can specify this to be true, then set dead, toxic, terran, barren, asteroids, gas giant, gas giant, gas giant, gas giant, dead planets, and it'd be the same layout as the actual Sol system.
replacePlanets - If you want the listed planets to replace the existing planets (for example, if you only have one planet listed, and want to replace one planet, you set this to be true). If this is set to false, then the planets will be inserted at random among the existing planets.

Each "System" element contains two list of elements, "Planet" and "Ship". Each "Planet" element is a planet that contains three attributes: owned, population (only applicable if owned is true), and type. Each ship is the name of the ship design that you've specified earlier in the xml file, and amount of that ship. So you can have one system to start with 2 scouts, and a second system to start with a colony ship. This is not implemented yet, as mentioned earlier in this post.

Here's a screenshot of me with Humans race that I've specified 7 starting systems. Note how they're all clustered together? This is because of the algorithm I wrote to ensure that they're not randomly scattered all over the galaxy.



I know I said I'd be busy during Christmas vacation, but I had some extra time, so I got busy on this game! So I didn't lie, technically...

Thursday, December 22, 2011

Target Release Date

Due to circumstances in my life, I need to finish this game soon. I've decided on May 31st as the target release date. What this means is that I will focus on the gameplay mechanics and making the game playable. It may mean that there may be only four races to play with (there's a new one in works), weak AI (the support for AI scripting will be there though), imbalanced technologies, and not many sounds/music at release. However, they are all contents that can be easily tweaked and added without altering the game's code. All the gameplay features that I discussed (stacked/single ships for example) will be implemented by then!

I plan on supporting the game after its release, by improving the AI, adding new races, balancing the technologies, bug fixing, etc. But those requires a lot of players' feedback, so I guess you could technically say that May 31st will be the end of the Alpha version, and the Beta testing has begun. However, it will be a full release, because it will be feature-complete, and people can mod the data.

That's the plan, I'm going to try and finish up the game before May 31st!

Wednesday, December 21, 2011

More work on Race Data

I've fully replaced the old text file with the new XML system. I also started work on replacing some of the hard-coded values with data-driven. So far, I've made the game to load the sprites based on the XML values, and updated the game to handle the new system. This means that you are no longer limited to 6 ships per size, 5 sizes plus one big ship. You now can have 2 ships for size 1, skip sizes 2 to 6, have 15 ships for size 7, and the game will handle all of that!

I also added default ship names loading. So for example, if you have names "Doombringer", "Slayer", and "Despair" for size 2 ships, when you select size 2, one of those name will randomly be selected to fill the name text box. Of course, you can change the name. This system is similar to MoO 1's ship naming.

When I finished all of this, I ran into some bugs with the dropdown menus that I didn't encounter before, and fixed those. Now it's all working flawlessly! However, when I selected the biggest ship (it wasn't loaded before), I see a problem in the design screen. So I'm going to scale all the ship sprites to the same size in the design screen to fix this problem. Here's a screenshot showing this, and what I have so far!



After that's done, next up is the loading of starting ship/system information! Then the data driven conversion is done! Whew! Getting there...

Monday, December 19, 2011

Race Data Started!

I've started work on the new race data file. The old system used a text file with ugly structure, and the rest of the data (ship sizes and styles, as well as starting system/planet stuff) are hard-coded.

The new system uses a xml file that will be flexible in allowing you to specify different stuff for a race. I've created new xml files for each race, and is now in process of phasing out the text files. The xml files have everything, I just need to modify the game's code to use that.

So far I've modified it to load in the race's name, description, and some of its attributes. Here's a screenshot of the Zero People in the race selection using the XML data:



Now, for the starting system(s) for your race, I think I've worked out a good system (pun not intended). The race will have an element named "StartInfo" that contains all the starting information for that race. It have "System" elements, one for each starting system (it's possible to have more than one system, the game will try and make sure that the race's systems are near each other, not scattered randomly across the galaxy). In the "System" element, there is an attribute "override" that is either "True" or "False". If True, then the system's randomly generated planets will be discarded, and it will load in the planets. If False, then it will randomly replace a planet with a planet in the data. If not enough planets in the system, it will add more planets.

In the System element, there are two types of elements: "Planet" and "Ship". Planet have "type" attribute for type of planet, and "owned" dictating whether or not that planet is owned by that race. Ship have "size", "style", and "name" attributes, as well as "Equipment" elements that tells the game what the ship have.

All in all, this should allow users to create custom campaigns (maybe a zombie race that starts on 25 systems and a lot of junk ships, and you start with only one planet and a couple of ships and your mission is to eradicate all the zombies? :) ), or simply just follow the classic 4X game setup (1 planet per race, along with 2 scout ships and a colony ship)

This system will also be similar to how events will be done in the game. More on that later when I actually get to it.

Friday, December 16, 2011

Reminder to Self - Don't post while half-asleep!

It looks like I didn't really finish my post, and just hit publish :)

The reason why I'm scrapping the "construction platform" that you have to build at a star system is because of the new "special equipment" you can add to a ship. Remember that the game supports both starships and system ships. Which means you can build a system ship that aren't going anywhere, with the special construction equipment, and you've essentially got a "construction platform"

I also thought, why not allow ships without engines at all? They'd still require reactors, but they'll be essentially space stations, unable to propel itself anywhere. But it will free up some space for weapons and other stuff. Also, ships with only stellar drives can travel to different stars, but in combat it can't move, making for interesting designs!

I'm also thinking of making Stargates just one size, big enough to allow whatever through, because it'd be very confusing to see two systems with stargate icons, but your ships can't go through. So it will be an "on/off", it's either there or not. Any ships can travel through stargates, even if they don't have engines. Think of tugboats pushing them into stargates :)

To terraform a planet, you will need either a ship with construction platform, or a planet that has a base on it, in the same system as the planet that you want to terraform. Terraforming includes building planets out of asteroids and gas giants.

Refitting a ship will require the same requirements, a planet or a ship with construction. To refit a ship, you just select a ship to refit, then a list of same-size designs to refit the ship into. For example, if you have a scout with one laser cannon, and you've designed a new scout of the same size, but with a rail gun and a shield, you pick the old scout, then pick the new design, and hit confirm. It will be cheaper than building a new ship.

The construction platform special equipment will take up so much space and be very expensive, so you'll have to use a hull big enough to support a platform. I'm thinking of making it so only the biggest hull can support such a platform. Of course, this will all be data driven, so you could create a technology item that allows you to put on a construction platform on the smallest hull and cost only 1 BC :)

I looked at my code, and realized that there's a few more stuff that need to be converted to use data before I can add production screen. I need to flesh out the special equipment/technologies a bit more to allow for colonization and ship production from special ships. Then I'm going to change the home system code to use the data for setting which ships/planets/systems you start with. When that's done, I will then work on the production screen and colonization prompt, as well as invasion/transfer prompt. Then the game will be kinda playable again!

Thursday, December 15, 2011

Ship building/refitting and Terraforming

There's not much going on code-wise because I was trying to work out a balanced approach to ship production that will work for both space-based and planet-based races.

I didn't like the idea of a "building" that you need to build in a system to build ships, so I'm scrapping that system.

I considered different new options for this:

A system where you're required to establish an base on a planet (don't have to have people there) in order to build ships
A special component that you can add to a ship that allows it to "build" ships, or in other words, be the place where you assemble new ships at (mobile construction platforms)

A friend told me to just make the game work, then deal with balance later. So that's what I'm doing. I'm going to implement both systems above, then deal with balance later.

The idea is that if you've selected a ship that has a construction special, when you finish the new ship, it will spawn where that ship is. Those kind of ships will be massive and expensive, so you wouldn't want to put them in front of the battlefields. They will be prime targets for your enemies!

Planet-based ship construction will follow the classic 4X system, you build a ship at that system with that planet, and presto! A ship spawns there.

This upcoming week and next will be very busy for us (Christmas), so things may be a bit quiet around here for a bit, but don't worry, I'm still devoted to this project.

Meanwhile, here's a screenshot of a couple of new stars that I've added to the game!

Tuesday, December 13, 2011

Descriptions!

Yay! Descriptions are now working with planets and stars! Here's the screenshots. Top one is of a planet, and bottom one is of an unexplored or uninhabitable stars (like black holes)



That little thing added a lot of life to the game! Makes it feel more personal somehow. There's one bug that I need to squash, then it's on to production screen so you can actually build the stuff that you've designed!

Monday, December 12, 2011

Stacked Ships vs Single Ships

A person commented on my change from stacked ships to single ship system, and I was about to post a comment providing explanations on why I changed it when I had a thought. (The post is here)

Originally, the reason why I changed to single ship was due to diplomacy/reserves/space races/population transportation in individual ships/some other reasons that I've forgotten. I also wanted to have a X-Com-esque combat where if you miss, it physically miss and can hit another ship (even a friendly ship), allowing for fantastic technologies.

However, when I started to explain that, I realized that the biggest goal of Beyond Beyaan is to make it moddable, and that means giving more options to the players. So I thought about what would require to support either single ships or stacked ships.

Inside the game code, there'll be minor changes (a boolean value indicating whether or not the game uses stacked ships) for handling fleets, nothing too major. However, the biggest "design" and "UI" changes will be as following:

The UI will need to display the ship number, and a slider for selecting amount of ship for fleet UI. Single ship system will use the current fleet window. So I will need to add a new fleet window class that's for handling stacked ships.

Single ships system can have their components damaged or destroyed, requiring repairs (basically refitting), while stacked ships can't have this due to simplified UI. So stacked ships will act like MoO 1's, all components working until hp hits 0. Then that ship is destroyed, and the next damage will apply to the next ship in the stack. However, you can still upgrade/refit ships in both systems.

Firing weapons (this was one big reason for me changing to single ships) will result in a "stacked" fire. This means if you have 100 scouts, each armed with 3x laser cannons, the stacked ship will fire three times, with 100x damage each firing.

I will need to add "streaming" support, in that if a weapon is streaming, it carries over leftover damage to the next ship if the current ship is destroyed. In Single ship system, this will mean that the weapon continues on its course with leftover damage until it hits another ship or leaves the combat field.

However, all of those changes don't require a lot of work, but will make more people happy (if they want games with stacked ships, they can choose that, or choose a game with single ships). I will add "gameConfiguration.xml" that sets whether or not a mod uses stacked ship, as well as if technologies are removed from a field when one technology is researched. In-game options will be minor options that affects small things, while gameConfiguration.xml will contain major game-changing settings.

I will add this after I'm done with the screens and saving/loading games, but before I add space combat. When I add space combat, I will have both systems implemented and ready for me to test them both. That way, I will avoid coding in a way that will restrict me from adding one system or another.

This isn't a result of me being unsure on design for my game, this is a result of me trying to make the game more mod friendly. My fear is that there may be no other turn based 4x games anymore, the trend is real time 4x. I want to provide a game that allows people to create their own 4X games without having to develop everything from scratch. I hope that this will make people happy :)

Sunday, December 11, 2011

Data Driven Stars and Planets almost done!

I've started work on changing from hard-coded planet and star types to one that uses data files. I've been able to convert most of the mechanisms, and made it even more flexible and powerful as a result. Originally, there's only one star sprite, and one black hole sprite, and one starShader.fx file that applies to all stars. With the new data system, you can specify which shader file to use, which sprite to use inside stars.png or planets.png (allowing for a lot more different star sprites, like binary systems for example).

This is pretty powerful system that I've set up. You can specify whether or not a star system is inhabitable (if it's a black hole, uninhabitable for example), which planets and their probability of appearing, etc. If you set a planet's max pop to be 0, then it's uninhabitable.

This is what the XML files look like for stars.xml and planets.xml:


Note that there's only two star types, the yellow star (with shader values of "1,1,0,1" or yellow with 100% opacity), and the black hole. Also note that you specify where in the png file a sprite is (for stars, it's always 64x64, for planets it's always 40x40). This is what the galaxy looks like with those data:


I plan on adding more stars and stuff, but for now I'm focusing on fixing bugs and crashes with the new system, and displaying the descriptions you saw in the data file. I'm done for the night, but would like to hear your feedback on this!

Thursday, December 8, 2011

Design Screen functional

All of the elements that you see in the design screen are now functional. You can add ship designs to your list of designs now by clicking "confirm".

Not all display elements are done yet (equipment description, some stat information in equipment selection window, etc), but it's functional, so I'm done with it for now. Next up is the planets/star systems re-do. But that's for another day.

New Equipment Selection

Alright, I think I've reached the final equipment selection layout! It's a lot more simpler and friendly. Instead of an overwhelming list of items, there are two drop-down for the main/mount, as well as a list of modifiers. The stats are simplified to just those on right column. The window is a lot smaller as a result! Note the UI for the item count. Also note "Light Pew Pew Cannon"? It's a result of me implementing "description" that allows you to put the main item's name within the mount's description.

What do you guys think?

Equipment Selection update

Sorry about the silence for the past while, I was stuck trying to think of a better layout that isn't confusing (thinking that mounts and types are one list). But now I think I've found a solution (partly inspired by MoO 3's ship design)

Since you can only select one type and one mount, but as many modifiers as you want, I'm going to change the type/mount selection from a list to a drop-down. The selection window will be split vertically. On top left (under the type buttons and equipment name) will be the two drop downs (type and mount). Under that will be a list of modifiers.

On right will be the information for the selected equipment, listed vertically, and on bottom right will be the confirm/cancel buttons.

I think this approach will reduce the visual clutter (three lists makes for a lot of clutter), and reduce confusion.

I also started fleshing out the design screen, I hope to have both equipment selection and design screen done tonight! The next thing on agenda will be the star system/planet data files that I mentioned earlier.

Speaking of which, I realized another thing, what if you want a blue star to have up to 5 planets, while yellow have up to 10? That can't be done due to how the galaxy setup is done. So I will remove both black hole slider and min/max planets UI, and put those into the star system/planet data files.

I also plan on adding race's home system setup where you can specify what type of planet your race starts on, as well as if it follow the star system's random generation, or a pre-set system that you specified. An example would be Human, and their system would have 9 planets (including pluto), with the third world being the homeworld. So that will give the modders ability to specify starting systems in a more fine detail.

I plan on using that system for special systems, like the "Beyaan" system, that allows me to specify unique systems for lore purposes.

Saturday, December 3, 2011

More work on equipment selection

Thanks to a recent donation, I was able to commission some new artwork. The equipment selection window is almost done. The lists are done, I need to add the total space, cost, and power, as well as amount. I realized that having 1x mount, 5x mount, 10x mount would clutter the mount list, so I'm going to add an UI control where you determine the amount of items. However, this is grouped, so if you have a laser cannon x5, when you fire it, you fire the group, meaning all the power are consumed for all 5 at once, and it will fire five times visually.

Here's the mostly done screen (I had to stop, my daughter needs my attention):

Thursday, December 1, 2011

Planets and Star Systems

While working on the equipment selection screen, I realized something. In order to have custom technologies which includes colony base technologies, I will have to specify which planets a colony base can settle. Since those types of planets are hard-coded in the game, it'd be easy to make mistakes and cause the colony bases to be useless because spelling don't match.

This led me to think, what if I make the planet types non-hardcoded? I can separate the planets art into its own graphic file, then have a XML file "planets.xml" that contains name of the type of planet, description of that type, pollution threshold, type that it degrades to, and type that it terraforms to (if any), max population range, and where in the planets.png the planet art is located. It will always be 40x40 since the UI in game expects that size, but you can make different sized that is under 40x40. Also, more than one planet can use the same art.

This will allow users to create really unique planets for their mods, rather than just replacing the artwork.

While thinking about the planets, I realized another thing. Star Systems are hard-coded as well, it have a pre-set probability for types of planets to show up in its system (all different colors have the same probability). I can change star systems to use XML file instead of hard-coded. There would be different types of stars (colors, black hole, etc). Again, I would separate the star artwork from the artwork into its own file: stars.png. The XML file would determine which graphic to use, color of the star, probability range for different types of planets, and whether or not this kind of star allows planets (black holes don't have planets for example). This would allow users to create different stars, rather than just being limited to the normal one and black hole. For example, quastars or binary star systems.

So with the above system, you could designate yellow stars to have more organic planets (terran, jungle, ocean, etc), and designate red stars to have more mineral rich planets (you can specify the probability range of bonuses as well)

The amount of planets will still be adjustable in-game, just that their types would be determined by stars.xml file's probability range. However, if I were to convert to the xml file for stars, I will need to remove the black hole slider, since it will be determined by the xml file/galaxy script.

I will then also improve the galaxy script to actually specify which type of star to add when generating galaxy. Currently it just says "size 2 star here, size 3 star there", then the game randomly picks a percentage of stars and change them to black holes based on your percentage selection.

I think this should improve the game a lot, and allow me to more easily modify things without having to change the code inside the game. One of my goal is to make this game very easy to mod, and I realized that just changing the artwork may not be enough for some people, so I hope this will help satisfy the modding desire of those people :)