Thursday, 9 May 2013

Ship Fitting

In this post I will be explaining the ship fitting window which I have been working on recently.

Module Slots

Every ship has a number of slots to fit modules. There are Targeted, Active and Passive slot types, the number a ship has of each varies.

Targeted Modules: Requires a selected target. Examples: Weapons, Electronic Warfare, Mining, Salvager, Remote Repair and Fleet Support/Logistics

Active Modules: Costs energy while active and just affects own ship. Examples: Afterburner, Shield Booster, Hull Repair, Shield/Hull Reinforcing, ECCM, Cloaking and Weapon Upgrades

Passive Modules: Doesnt have an energy cost and are always active. Examples: Energy Recharger, Energy Battery, Armor Plating, Reactor and Cargo/Mobility Upgrades

This module system should seem familiar if you have ever played EVE Online before as its quite similar.

I have only included a small selection of module types so far, but there will be a lot more when the game is finished. If you have any suggestions let me know and I might be able to add them!

Fitting Window

In the screenshot below you can see the fitting window is split into 3 sections. On the left is the ship and module browser, the ship fitting slots are in the center and the ship stats are to the right.

(Click image for fullsize)

You use the browser to drag modules into an available slot in the main fitting area. The fitting area will display the maximum range (for targeted modules), energy usage when active (per/second) and power requirements for each fitted module.

Hovering over any module will show its complete stats and build cost/time. Hovering over the stats on the right will also display a tooltip explaining each value.

Power

Different ship hulls have varying amounts of power which is used by the fitted modules. This limits which modules can be fitted but some module types can increase the available power.

The more advanced and powerful modules will have higher power demands. This is so the basic modules will remain useful (and not become obsolete) when creating setups on a tight power budget.

(Click image for fullsize)
Miscellaneous

In the screenshot above you can see the new ice asteroid graphics in the planetary ring. They are less rounded than the metal ore asteroids. I still dont have a use for them yet but dont really want them to become some kind of fuel resource that you require a constant supply of.

The module buttons along the bottom of the screen now have some finished icons. Decided on using simple colored shapes rather than more detailed icons as I think they fit the abstract visual style quite well.

Sunday, 14 April 2013

Improved Colony Interface

Over the past month I have been mostly working on lots of smaller tasks and bugfixing which wouldnt have been particulary interesting to blog about, although I have made some nice improvements to the colony user interface which I can now show.

Improved Colony Interface

This is the same screen that was shown in the earlier blog post about colony development but now looks a lot more interesting and compacted.
(Colony information interface screen)

The planet view box at the top will eventually be used to display any special bonuses that the colony may have. They can also be viewed by hovering the mouse over a planet.
(Planet stats and bonus tooltips)

Below is the updated interface for building facilities and expanding the colony. You can see the older window design with some more information about facilities here.
(Colony facilities interface screen)

Shipyard

Next is the interface screen for building ships. It still needs some more work but the layout should stay mostly the same. Hovering over each design on the list to the right will show stats, build cost/time and details for the ship.

Designs are added to the build queue by dragging them from the list or by double clicking them. The build queue can also be rearranged by dragging items around with the mouse.

Adding some extra columns to the designs list showing the build cost and time would be useful, but I dont think there will be enough space for so many columns. Unless I take away space from the left half of the window. The "Resources Required" box also needs some slight changes as its not really clear what the values mean. Example: "4192 / 12000" (resources required / available)
 (Shipyard interface screen)

Each of the default ship designs currently have 5 variants (basic, standard, enhanced, advanced and prototype) This is determined by the quality of the modules that are fitted to the design. At the moment you can still build the obsolete designs after researching more advanced modules (more advanced modules cost more and take longer to build) So its a quantity vs quality / cheap vs expensive tradeoff when deciding what to build.

This may possibly change to something simpler as I'm worried its too confusing and increases the number of designs you need to create and keep track of. I had thought about having single designs which are updated to use the latest modules as you research them, but then the costs and build time would probably have to stay the same and the ships using the design would be instantly upgraded.

The other pages I didnt show (defence, refinery, research) still need some more work before thay are finished but are a lot more simple as they dont require much interaction.

Thats all for now.
Let me know if you have any good suggestions!

Friday, 8 March 2013

Soundtrack Preview


Soundtrack

The past couple of months I have been working closely with sound designer and composer Carl Butler (Temporal Geometry) who has been creating the unique soundtrack to Galaxial.

These are two tracks from the soundtrack to give you an idea of the musical style that will feature in the game. Enjoy!



In the finished game there will be just over 5 hours of Carl's music! Its fairly ambitious to include so much but I feel it matches the huge scale of Galaxial and its unique graphical style very well indeed.

Music Player

I have created an in-game music player/jukebox so you can easily select which track to play and rearrange the playlist order if you wish. Adding custom music to the playlist will also be supported.

 (The track names and duration text are just placeholders at the moment, for testing purposes)

Sound Effects

Carl will also be doing all the game sound effects, so the entire game audio should sound very cohesive using his own unique style. We will be working further on the sound effects over the coming months when more of the graphical content for the game such as ships, weapons and visual effects are finished.

Giant Screenshots

I have added the ability to export giant sized screenshots from within the game. This was mainly added so I could take very detailed high resolution images to use for promotional material. I also quite like exploring some of the larger images it can capture. (Transport Tycoon had this feature)


(Best viewed in an editor where you can zoom in and pan the image)
Direct Link to Fullsize Image (6MB)

Above is a giant screenshot of the galaxy view containing 500 sectors. The screenshot maximum size is currently set at 4096 x 4096 but I may also add an option for 8192 x 8192 although it will take a lot longer to save the file and may not work on some older graphics cards.

Thats all for now. As always, would love to hear your feedback as development of the game progresses.

Sunday, 24 February 2013

Colony Development


Colony Interface Screen

I have started work on the colony development features. This is a screenshot of how the colony interface screen currently looks.

(Click image for fullsize version)

I will go into each catagory in more detail, but I am hoping most of the values are quite self explanatory. In the game you can hover over each of them with the mouse to display tooltips with a full description and breakdown of how the values are calculated. The buttons along the top are used for navigating to the different pages.

Population

Each planet type has a maximum population it can support, temperate being the highest (7 to 15 billion depending on planet size) and volcanic the lowest (1 billion, due to less suitable building space)

The maximum population values still need some adjusting. I havnt much of an idea how many people ice, ocean, carbon and iron planets could realistically sustain for example, assuming the advanced technology was available.

Most commerce and income from a planet will come from a high population. But it will take quite some time for them to grow to the maximum it can sustain.

Still unsure of how conquering planets will work exactly and whether the existing population gets eradicated, integrated into the conquering faction or something else entirely. There wont be troop invasions or ground battles.

Food

For every 1 billion of population, the colony will require a single unit of food. If it doesnt have the required amount then the population will shrink. Having more than is required increases the rate at which the population will grow.

Excess food produced at a colony gets added to the global empire-wide surplus value and then is imported at colonies which have a shortage. Any remaining surplus food available is spread evenly between all colonies to increase their population growth rate.

Happiness

Happiness level determines the chance of revolt and has a big effect on the population growth rate. Even if you have enough food available, the colony wont grow unless the population is happy.

There are lots of planet bonuses/penalties that can affect happiness, such as meteor showers, acid rain, seismic activity, planetary rings and many others.

If the happiness level goes below 0-25% for too long it will risk triggering a rather nasty revolt penalty at the colony which lasts for some time. There probably wont be a feature where you can lose control of the colony to a revolt or rebellion however. Will maybe be added in a future update/expansion.

Luxury Trade Resources

Colonising a planet which has a trade resource gives a happiness bonus to all colonies in your empire and a big boost to commerce at the planet, depending on which resource it is. Access to more than one of the same resource can be traded away to other empires and used in diplomacy. Having access to all of the luxury resources will provide a significant boost to happiness and population growth rates.

Commerce

Commerce at the planet mainly comes from a high population or having access to valuable trade resources. Small amounts are generated from farming and natural resources, but these are more helpful during the early stages of colony development.

You can change the tax rate at each colony, which will determine the percentage income you receive from the total commerce value. Setting it too high will decrease happiness which results in lower population growth rate and increased risk of a revolt.

Colony income is added to the empires total credits (per second) Ships will also now have an upkeep cost rather than using the supply depot facilities briefly mentioned in an earlier post.

Going into negative credits for too long will trigger a bankrupt penalty for all colonies and will be extremely damaging to your empire.

Upkeep

Colonies on the easily colonisable planet types will cost the less to support while the more hostile environments such as volcanic, iron and carbon will be a lot more expensive.

Farming

You can only build and upgrade farming on barren, temperate, ocean (fisheries) and jungle planet types. Each can produce varying amounts, jungle being the highest. To produce food on the other less hospitable planet types you need to build Hydroponic facilities. These will use up valuable colony building slots. Developing dedicated farming colonies will be a good strategy.

Resources

These are not metal resources that you can use to build things, but natural resources which benefit commerce and increases the planet income. Resource rich planets like iron, carbon and volcanic will have the highest values.

With the addition of food and trade resources as well as the modules, ore and metals from mining I'm starting to distance myself from the earlier idea of having everything needing to be transported by ship rather than getting added to a hidden global resource pool as in most RTS games.

Its possible that it could get too complicated or annoying to manage ship transport and getting the AI to do all of it intelligently could be difficult. This isnt an announcement that I'm removing the transporting resources feature, just that I have concerns with it and may ultimately be changed once its been tested with everything else working together. However I will do my best to try keep the feature as I really like it.


There is still some work to get colony development properly implemented so let me know if you see any obvious problems or feedback you might have.

You can now also follow the development of Galaxial on Facebook where I have created a page.

Wednesday, 6 February 2013

Alternative Planetary Rings

This is a follow on from the previous post in case you havn't already seen that.

Made some more changes to the planetary rings by removing the 3D effect which made them look like they went behind the planet. They now look flat and circular, which I think fits much better with the graphical style of the game.

This also means I can put small ice asteroids within the ring, which could possibly be used as a resource for something in the game.


I am going to create new graphics for the ice asteroids/chunks which will be a bit smaller than in the screenshots and look more like sharp ice. At the moment they are using the same graphics as the ore asteroids.


Tuesday, 5 February 2013

Recent Updates #5

Some of the things I have been working on over the past few weeks.

Planetary Rings

Finished creating the planetary ring graphics for planets. The rings are procedurally rendered so the gaps in the ring are not always in the same place. At the moment the rings use a similar colour to the sector background as I havn't yet found any decent colours to make them. (apart from white)

I tried placing smaller ice asteroids around the ring but it looked really bad, so removed them.


Apparently its possible (but incredibly rare) for there to be multiple rings with one larger than the other, so I added them also. Although I'm not sure if they will stay... I still have doubts that the style of the rings dont go with the rest of the game, so let me know what you think.


Planets can now be rendered in different sizes. This will be used as a visual indication for the maximum population they can support. I have also added another 3 planet types, Barren, Jungle and Carbon! so there are now 8 types in total.

Audio

The music player/jukebox interface is almost finished. With it you can select individual tracks to play and re-order the playlist. Custom music can also be added to the playlist, but needs to be done from outside the game.

Added data pack file support, which is just going to be used for the music. All other game data is easily accessible for modding.

Added random pitch variation support so repetitive sound effects dont sound too similar. From the data files you can specify how much the pitch can vary for that particular item/weapon etc.

Other Stuff
  • Wreckage can now be selected, targeted and salvaged by ships using a Salvager module.
  • Fixed collision detection for really fast projectiles and missiles, so they dont fly straight through their target.
  • Created slider widget for the user interface.
  • Cargohold interface screens.
  • Minor sound engine overhaul.
  • Changed the blog address to www.galaxial.com (old address still works but will redirect)

Planet & Colony Development

I dont tend to write many really extensive design documents when developing the game, but I have done for the planet and colony development system. It will certainly be a lot more in-depth than I had originally planned and will include:

  • Population growth
  • Food
  • Happiness
  • Commerce
  • Research
  • Planet bonuses
  • Trade & Strategic resources

It's all looking really good from the design documents (spreadsheets) and next I will be starting to implement it all, which should be fun!

Monday, 21 January 2013

Recent Updates #4

Here is some of the features I have been working on over the past week.

Asteroid Colour Variations

Added some slight colour variations to asteroids of the same rarity (common, precious etc.) so that they are now different shades of the original colour. I think this makes them look a bit more varied and realistic. It doesnt look that different from the screenshots below, but its a lot more noticeable actually in-game.

(With colour variation)

 (What asteroids looked like before)

Also created an extra asteroid set to add some more variation, so that you wont notice asteroid graphics being repeated as often.


Sector and Galaxy Colours

Fine tuned the sector and galaxy background colours as some of them seemed either too bright or dull. I also re-written most of the code and the data file format so that its simpler to modify them or add extra colours through modding.

Railgun and Salvaging Modules

Started to create the visual effects for railguns and salvaging modules. I had to re-write most of the engine/missile trail code so that it could be used for other more general purpose effects. The railgun projectiles will leave a faint trail behind them. It's not quite finished yet so theres no screenshot of the railgun effects.

With salvaging modules fitted, a ship will be able to reclaim resources from the wreckage left over from battle. Once the salvaging module has finished working on a part of wreckage, the reclaimed resources get put into the ships cargo and they can then unload them at a colony. The player controlled ship also needs to be able to do this, so wreckage objects have to become targetable (with the mouse) for the salvaging modules to work.

This could become a problem as I dont want wreckage to become in the way when you are trying to select an enemy ship that is behind it. Smaller objects are always rendered in front of larger ones.

I will be working further on wreckage salvaging this week.

Rendering Optimisation

Spent a bit of time profiling and optimising the object rendering code (ships, asteroids, wreckage) now that I have finished making changes to them and made some small improvements to the overall framerate.

All the objects are rendered using the Painters Algorithm which is rather inefficient. This makes it incredibly difficult to batch objects and render them all in one go. There is a lot of texture swapping and individual draw calls for each object.

Earlier in the development of the game I experimented rendering objects using the z-buffer. It didnt work very well and introduced artifacts and sharp edges around the depth mask for each object. All objects require transparency sorting, so have to use the painters algorithm for rendering.

Although the rendering technique is rather inefficient it still runs very fast, even on the older graphics cards I tested on.

For example, I ran the stress test on an older laptop which has an Intel Celeron T3500 (2.1 ghz, 2 cores) with a Geforce 8200m (not great for gaming) and the framerate was stable between 40 and 70 FPS, depending on how zoomed out the camera is. Not so good when v-sync was turned on, as it then went down to 30.

The stress test scenario has 50 sectors with 100 ships fighting at the same time in each of them (5,000 total) Ship movement, AI and combat is simulated in full detail even when you are not in the same sector to see it.

Compared with my development computer which is 4 years old now (AMD Phenom X4 9950, Geforce GTX 260) it runs the same stress test between 110 and 220 FPS. Thats with v-sync disabled and max settings.

Older single core CPU's likely wont run Galaxial very well. Especially the games with larger galaxies that have many thousands of ships. The game is heavily multi-threaded and benefits greatly from a (fast) 2 core or 4 core processor.