Monday, November 16, 2015

New Layout, UI and Features

Quite a lot of things got implemented:

User interface and layout got an overhaul. 
On the right is the old layout, the left side is the suggestion I got from Thomas Dittrich. 

 
I transferred this layout to most panels in the game. Eventually all buttons will get a blue background, a white text-shadow on hover and a red background when clicked.
There is another new thing on the image showing the colonies list - the space nebula.

This image shows the old nebula:

And now the same part of the map with the new one:


It wasn't even much work to implement the new one. 
The old nebula consisted of a 180x180 px image, which was put in an overlapping way on the html canvas. A single field has a size of 60x60 px and the nebula was painted with its upper left corner one field to the left and one field up, so that its center was right where the nebula is according to the database, while the border of the nebula overlapped just a bit.

For the new nebula, Thomas did provide an image with a bit less transparency. I used it as 240x240 px size, and increased the overlapping area. The upper left corner of the image is put one and a half field to the left and up.
And additionally, the nebula is rotated in steps of 45 degrees. I used the unique nebula id and the mod operator ( % 8 ) to determine how far the nebula is rotated.

Aside form this eye candy, all changes to the game are in the changelog on the homepage.
The most important ones since the combat overhaul are:
  • Colonies can be invaded
  • Pirate ships spawn and can be raided (poor Pirates)
  • Colonies can be abandoned
  • New diplomatic mode "Hostile" which is between War and Neutral and which allows combat, but does not allow occupation of colonies
  • Conversations instead of single messages
At the moment, the "create first contact" requirement is being removed. Until now, one has to meet another player before that player gets visible in the contacts list. Alternatively, one has to visit a communication star base, then one gets all contact data of players that have previously visited this star base.
In the new version, one will have all contact data right from the beginning, and one will also have access to the one communication star base in the center of the galaxy right from the beginning.



Tuesday, September 8, 2015

Average weapon damage and experience modificators

I am currently working on an overhaul of the combat system.

Here are some game statistics - not yet implemented, and suggestions are as always welcome.

Weapons get a "to hit" value.
Ships get an evasion modifier

                  Evasion
Scout:        :     80
corvette      :     60
frigate       :     40
destroyer     :     30
cruiser       :     20
battleship    :     10
s-battleship  :      0



The  "-> X dmg" at the end of each line is the average damage when doing many shots. The behavior in combat is different: either the enemy is hit and receives full damage, or not hit at all. But for the evaluation, the average is better suited.

The + at the end of the lines indicate that the weapon deals the highest average damage.

"Green" crew versus "Green" crew (no bonus whatsoever)
Attacker with Laser (140 to hit ratio - 15 damage) versus:
Scout:        : To hit 140 - Evasion 80 -> 60% ->  9 dmg  + 
corvette      : To hit 140 - Evasion 60 -> 80% -> 12 dmg  +
frigate       : To hit 140 - Evasion 40 ->100% -> 15 dmg  +-
destroyer     : To hit 140 - Evasion 30 ->100% -> 15 dmg  -
cruiser       : To hit 140 - Evasion 20 ->100% -> 15 dmg  -
battleship    : To hit 140 - Evasion 10 ->100% -> 15 dmg  -
s-battleship  : To hit 140 - Evasion  0 ->100% -> 15 dmg  -

Attacker with Rocket (90 to hit ratio - 30 damage) versus:
Scout:        : To hit 90 - Evasion 80 -> 10%  -> 3 dmg  -
corvette      : To hit 90 - Evasion 60 -> 30% ->  9 dmg  -
frigate       : To hit 90 - Evasion 40 -> 50% -> 15 dmg  +-
destroyer     : To hit 90 - Evasion 30 -> 60% -> 18 dmg  +
cruiser       : To hit 90 - Evasion 20 -> 70% -> 21 dmg  +
battleship    : To hit 90 - Evasion 10 -> 80% -> 24 dmg  +-
s-battleship  : To hit 90 - Evasion  0 -> 90% -> 27 dmg  -

Mass driver to hit 50 ratio - 60 dmg:
Scout:        : To hit 50 - Evasion 80 -> 1%  ->  1 dmg  -
corvette      : To hit 50 - Evasion 60 -> 1%  ->  1 dmg  -
frigate       : To hit 50 - Evasion 40 -> 10% ->  6 dmg  -
destroyer     : To hit 50 - Evasion 30 -> 20% -> 12 dmg  -
cruiser       : To hit 50 - Evasion 20 -> 30% -> 18 dmg  -
battleship    : To hit 50 - Evasion 10 -> 40% -> 24 dmg  +-
s-battleship  : To hit 50 - Evasion  0 -> 50% -> 30 dmg  +

Experience levels
                  toHit/evasion
                 green       normal        veteran      elite       garde            
Scout:        :   0/0         10/5          20/10       30/15        40/20
corvette      :   0/0         10/5          20/10       30/15        40/20
frigate       :   0/0         10/5          20/10       30/15        40/20
destroyer     :   0/0         10/0          20/5        30/10        40/15
cruiser       :   0/0         10/0          20/5        30/10        40/15
battleship    :   0/0         10/0          20/0        30/5         40/10
s-battleship  :   0/0         10/0          20/0        30/0         40/0

Elite (+ 30 to hit ) versus Elite (various evasions)
Laser 15 damage:
Scout:        : To hit 170 - Evasion 95 -> 75% -> 11 dmg  + 
corvette      : To hit 170 - Evasion 75 -> 95% -> 14 dmg  +
frigate       : To hit 170 - Evasion 55 ->100% -> 15 dmg  -
destroyer     : To hit 170 - Evasion 40 ->100% -> 15 dmg  -
cruiser       : To hit 170 - Evasion 30 ->100% -> 15 dmg  -
battleship    : To hit 170 - Evasion 15 ->100% -> 15 dmg  -
s-battleship  : To hit 170 - Evasion  0 ->100% -> 15 dmg  -

Rocket 30 damage:
Scout:        : To hit 120 - Evasion 95 -> 25% -> 7.5dmg  -
corvette      : To hit 120 - Evasion 75 -> 45% ->13.5dmg  -
frigate       : To hit 120 - Evasion 55 -> 65% ->19.5dmg  +
destroyer     : To hit 120 - Evasion 40 -> 80% -> 24 dmg  +-
cruiser       : To hit 120 - Evasion 30 -> 90% -> 27 dmg  -
battleship    : To hit 120 - Evasion 15 ->100% -> 30 dmg  -
s-battleship  : To hit 120 - Evasion  0 ->100% -> 30 dmg  -

Mass driver 60 dmg
Scout:        : To hit 80 - Evasion 95 -> 1%  ->  1 dmg  -
corvette      : To hit 80 - Evasion 75 -> 5%  ->  3 dmg  -
frigate       : To hit 80 - Evasion 55 -> 25% -> 15 dmg  -
destroyer     : To hit 80 - Evasion 40 -> 40% -> 24 dmg  +-
cruiser       : To hit 80 - Evasion 30 -> 50% -> 30 dmg  +
battleship    : To hit 80 - Evasion 15 -> 65% -> 39 dmg  +
s-battleship  : To hit 80 - Evasion  0 -> 80% -> 48 dmg  +







Tuesday, July 14, 2015

Current Development and new Features

The refactoring of the communication messages is now completed. The reminder button at the top about unread messages will not appear anew after reading messages (and logging off and on).

One major feature is now available:
The "communication center" can be built on a colony. This building provides a communication node and works as a trade hub.
A feature soon to be implemented will be that the owner of such a building can set who is allowed to read/write to the communication node, and who may trade at the hub.

Regarding research and module statistics:
Cargo space of modules adapted
Research "Superconductor II" does now provide +15% energy output

Tables in various panels now remember the sorting order applied by the player. That may come in handy when sorting the colonies by available assembly points. The Ships panel will soon get a column dedicated to the interstellar movement points, so that ships may be sorted by remaining movement points. The sorting order is saved in a browser storage: if a player logs out and logs in, the last sorting order will still be applied.

And finally, the Contacts-panel now does show population victory points and research victory points of all known users. There seems to be a bug regarding the research points, which will be removed soon. At the moment, there are two other values which are internally used to compute the overall ranking: ship victory points and goods victory points. Both will be removed, and instead a new value "ascendance victory points" will be added. These are gained by helping building an ascendance construct. When the game is finished, only the ascendance victory points of the construct that was finished do count - all other players loose their progress.

The background story for this:
As the ascendance construct was finished, a galaxy wide ascension was triggered, and all sentient species left the physical realm. Their influence in the dimension they are now existing in is determined by their numbers (population), their knowledge (research) and their contribution to the ascendance construct.

Technically, an overwhelming successful player should be able to have the highest score, even if he did not contribute to the ascension construct.
I will try to balance this out, and will publish the formula in this blog...

Monday, July 6, 2015

Current Development

The alliance bug was finally found and removed. It was a side effect of the last big refactoring of the code, which started about 9 months ago and is still ongoing.
The trade screen got a small overhaul: labels, graphics and design all got tweaked a bit.

The following is just some technical stuff for the interested ones:

I am using unit tests, and have enhanced the framework in the last few days. The framework now uses actual game data that is user independent (base data): researches, goods, star-systems and so on. The game server uses interfaces to exchange data with a backup system, or exchange data with clients.

Now I can for example test the method that is used when a user joins a game: user placement in a star-system, placement of the first colony-ship and all the rest that does happen is now easily reproduced, without the need to mock each element of the base data that is needed.

The unit test framework now uses the sql connector to read the base data of the game, and changes back to a dummy data-connector during testing, so that nothing is written to the database. Works like a charm.

Now the communication network is on the focus. In the game, that will only be seen by the fact that the bug with the "there are unread messages in the comunication networks"-Buttons will be removed.
Work in this area will be useful when doing the next overhaul of the "direct message"-system. And soon, the colony building "communication center" will create a player controlled communication network, and work as a trade station.
Both did work before starting the refactoring ( this was implemented in sql stored procedures) and have to be reprogrammed to be executed by game server procedures.

Tuesday, June 30, 2015

First In-Game Event

On Wednesday, the first in-game event was launched.
Players logging in get displayed this message:

"Some reinforcements have arrived

Three ships just arrived at your colony, coming from your old homeland. Their engines barely made the trip, and their captains report that more ships were sent to you, but only these three ships made it.

Perhaps a search commando should be sent out to find the missing ships and secure the cargo on them."

Each player got two small fighters and one freighter. Over the whole map, debris was distributed containing resources.

3600 fields now have some spaceship debris on it, distributed on the XY-coordinates between 4700 and 5300. The debris contains goods, which can be as common as building material or even be rare ship modules.

In addition:

  • Some labels were corrected
  • The goods panel on the lower right was unified, 
  • A bug regarding "colonies of unknown players in star systems that were already discovered" was fixed, 
  • The receiver is now shown in the sent-messages-tab instead of the sender.
  • Colony renaming does now work.
I am working on a critical bug which I can't reproduce yet. The game-server does "forget" alliances, or the data sent to the browser is false.
The database does contain the correct information, so a restart of the game-server restores the right state.
If you have information about an action which might trigger the bug, please sent it to me ingame (Skratti, id 157) or via mail.

Monday, June 22, 2015

Current Development

The star map now shows colonies in all star systems that are discovered. Previously, only colonies in scan range of ships and colonies were shown.
The change was needed to give permanent information about other nearby players.

The implementation is not yet time sensitive. One will always get the current colony data.
A better way to solve this will be to enhance the Fog of War data structure, and include the discovered colonies there. Then you will see the colony data of the last time you had the solar system in your scan range..

The "Explore" part of Empires in Space needs improvement, since there are no great gains in discovering new worlds and players. I am preparing a small in-game event to make exploration more fun.

In preparation for that event, the cargo space of the scout vessel was reduced to 2. From now on, a ship with a cargo module is needed to transport bigger amounts of goods.

Wednesday, June 17, 2015

Current Development

Two minor and one major bug got removed:

  • To scrap a building on the colony surfaces now update the border color of the buildings in the buildings list on the left hand
  • Energy usage of a building now only has a red border if the usage would exceed the available energy
  • The shipyard is now defaulted to the "Detail mode" (which I might soon rename to "Module mode"). In this mode, a ship is constructed from ship modules present in the colony storage, and does in addition only need the resources for the ship hull.
    The "Fast mode" enables the assembly of ships without the need to previously build the ship modules: everything is built at once.

The major bug concerned the ship template designer. One was able to design ship templates with ship hulls not yet researched. This lead to ship templates which weren't shown in the list.
The bug got fixed, now one has to research the other ship hulls to design ship templates with these.

Monday, June 15, 2015

Current Development

The five special resource consumer buildings are implemented, each with a unique modifier which is given to the colony (+25% growth, +5% production in general, 10% energy and so on).
I am not yet sure if these modifiers are to be increased, to make an even stronger difference. That would give players a reason to start trading.

One bug regarding colony growth tooltip is removed. It is now shown when not enough housing capacities are present to sustain the population.

The building list now does not show one building per line, but up to 5, and the tooltip of each building shows name and special gains (like housing or modifiers). 



The first right click of the game got implemented now. Until now, every action was done by left click, so that the game can easily support touch-interfaces like tablets or phones.
The new right click event opens the building information panel, as a substitute for the removed question mark button.
Tablet and phone users will have to do without that for now. A solution will be implemented later, perhaps a question mark button that can be activated to show subsequently clicked building-icons. Also an ingame-help-system (some kind of SpaceOPedia) will be implemented in the far future...

The combat overhaul which comes next is a big feature. This will take at least 30 hours of programming. 
About 14 hours are done in an average week (8 hours on Monday and 1 hour on each other day of the week). Progress on that task will be reported here, as well as possible bug fixes...


Saturday, June 13, 2015

Next features to be implemented


  • Unique building for each of the five special resources
  • New image for the blast furnace
  • Better tooltips for the buildings in the colony buildings list
  • Changing the building lines in the colony building list to single images, so that four or five images are shown per line

These features will be implemented on next Monday.

After that, the combat calculations get an overhaul, and that includes the way how the presentation of the combat result is implemented. The current version creates a message in the mail inbox in the combat tab. The new version will create a message icon directly on the screen, which opens a panel containing combat statistics.

This new messaging mechanism will later also be used to present turn summary messages, and all other server generated messages/alerts.

Monday, June 1, 2015

Ending Scenario and other new Features

A closed test game is currently in its final stage. Here are some of the features added in the last months:
  • Player and Alliance Rankings
  • Starbases
  • Refittable Ships
  • New Resources: Hydrocarbon and Carbon Fibers
  • Fog of War
  • Research Tree Overhaul
  • Tooltip for Detail Data in the Colony Screens
  • Unique MMO Ending Scenario

Starbases


These can be built directly over a planet the same way as ships, or you can put an expensive starbase module on a ship and deploy it in a location of your choice.

Refittable Ships


Ships (and also the new starbases) can be refitted with ship modules which they have on stock (in their cargo bays). Just drag and drop the modules, and click "refit". The ship will be immobile and defenseless for a few turns.


New Resources: Hydrocarbon and Carbon Fibers


These are researchable in the late game (later they will belong to the midgame or even earlier stages).
More resources will be added soon, to get more different trading goods and also provide more options during colony management. 


Fog of War


The fog of war was badly needed - now the first X in 4X (eXplore, eXpand, eXploit, eXterminate) is fully covered by Empires in Space. I used a quadtree to implement the client side functionality, which works like a charm. I will post the typescript / javascript sourcecode of the implementation in one of the next posts and upload it to the github repository of Empires in Space. 



Research Tree


The former research tree was split into 4 parts, each shown in a different tab of the research mask. They are now merged into one tree making this tree much more complex and interesting.


Colony Details Tooltip


The colony screen now has tooltips for the values shown in the lower left area. In addition, the research output of the colony is shown in that area. The tooltips were needed to show modifiers from research. Modifiers will soon be added by other features as well, for example distance to the homeworld or asteroid mining.

Energy Tooltip

Ending Scenario


This kind of ending scenario is unique as far as I know. It consists of the quite common team project victory, modified to enable thousands of players to fight for this goal simultaneously.

The team project has local coordinates where the project is built. To help building it, support ships have to be send to the location. These support ships are slow and thus easy targets.

The owner of the project decides who can help in finishing the project - allies, friends or just everyone who is not at war with the owner (at the moment, only the last option is implemented).
After beginning a team project, it is visible for all players, even those who are far away.
The game ends when the first team project is finished.

The player and the alliance owning the winning project will get a higher part of the generated victory points. This, and the fact that the projects have a distinct position which may be a bit too far away, hopefully leads to multiple concurrent team projects in the end stage of the game.

The amount of helping ships needed to finish a team project is calculated based on the amount of players in the game. A quarter of the players should need about one week to finish the project.
Victory points are distributed based on the amount of help a player contributed to the winning project.

Even players with small empires should be able to build a few supporting ships and thus make a difference to the outcome of the game.
The fact that there are concurrent team projects, and that they can be easily sabotaged by intercepting the slow support ships, makes this ending scenario challenging.


If you like what you read, join the next game of Empires in Space, which will shortly be announced here...