Friday, September 23, 2016

User created content can improve games a lot.
The next days, I will publish some example of the texts the users created in the Communication Network of the current Empires in Space game.

This was the first rather nice message:

A long time ago, in a galaxy not so far away (Andromeda B), a group of sentients began to achieve hyperspace travel on various planets. On one of these planets, around the star Praecipua 935, since ancient times there has been a prophecy. That one day the Frog God Kek will return to the Galaxy and Make It Great Again, transcending all living beings to a higher plane of existance.


Prophecy Prophecy Prophecy

=== The Three Tablets of Kek (super rare, do not steal) ===




Long have they hoped that the prophecy will fulfill by itself, but eventually they understood that their future is in their hands, that it is they who need to fulfill it. And the time is near. The frogs achieved hyperspace technology, and can now travel the wast stretches of space to achieve their destiny. But in the beginning, it is hard for every spacefaring race.

Pepe

=== Feels lonely, man ===




So the frogs decided to invite any other like-minded race, to work together to achieve what was promised. Strength comes from multiple individuals working together- that is a central tenet in frog philosophy.

Pepe Pepe Pepe Pepe Pepe Pepe Pepe

=== Together, we can achieve anything! ===



YOU ARE INVITED TO the alliance of the Frogs. You can come, but you have to come LEGALLY. Send a message to
Pepe Pepe, and you will receive an invite.

Together we will Make Andromeda Great Again!

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...


Monday, December 1, 2014

Movement rules updated

Movement points are now reduced according to the hull type of the spaceship. This leads to bigger ships being slower. Also, movement points are no longer calculated in integers, but with decimals. 

Ships may now get for example 2.7 movement points per turn, have 5.8 remaining movement points and a maximum of 11.7 points.
I used the opportunity to refactor the Ships database table and remove the spatial data types from it.


The feature list for the next game got two new items:


The ranking will calculate the rank depending on population, research, goods and so on.
I am ambivalent about this feature. On the one hand I don't like it, because it is an artificial competition which should not be needed. On the other hand, I heard multiple complaints about this feature missing in the game, and, frankly, this artificial competition does indeed trigger some kind of “I just want to catch up with the next guy in the ranking” feeling, which can be fun.

The second task, the ending scenario, is a big one. But as soon as that is implemented, this game reaches beta status.
There will be multiple ending scenarios later, but for now the “Ascension” scenario will suffice:

Ascension

As soon as one player has the needed research, he can begin with the construction of a special space station, the Ascension Construct. Completion of the space station will trigger galaxy-wide Ascension – which ends the game.
The construction of the Ascension Construct will need so many resources that a single player will not be able to do this on his own. His alliance, and possibly other alliances as well, will help constructing it.

All the while other player/alliances may start their own Ascension Constructs, hoping to win the race themselves.

When the first such construct is finished, all players gain victory points according to several factors:
- Their contribution to the winning Ascension Construct
- Distance of their homeworld to the construct
- Ownership of the construct. membership of the alliance owning it, being allied with the owners
- the normal ranking points will probably also count as victory points



Wednesday, November 26, 2014

New Research: Fleet Command





Fleet points define how big your fleet can be without costing any upkeep.
You start with 25 fleet command points. Each ship uses as many points as it has places for ship modules (scout 5, corvette 7 …).
The new researches give you additional command points, but reduce your overall productivity.
If your fleet uses more command points than available (25 + fleet command research), upkeep costs will occur. Upkeep does also lower the productivity of the colonies.
The ship list shows the current values:







The formula for the upkeep is:

( shipPoints – commandPoints ) / commandPoints

and the result is capped to a value between 0 and 1.
Here is an example:

6 scouts = 30 ship points
Base command points and no research = 25 command points

(30 – 25) / 25 = 0.2 => 20% Upkeep

Which would mean a loss of 20% on each produced good.
Aside from the upkeep constraint, empires can't build more ships than twice their command points.

Some benefits of the new feature:
  • Since fleet size is restricted, fleet quality becomes very interesting. The strongest spaceships are built of ship modules made of special resources. Since each region does yield only one of the five special resources, most empires will have access to only one or two types. Trading with other players will get you these resources (or ship modules made of these).
  • Everyone has to live with the fleet command constraint, and those who handle it best will have an advantage
  • When empires build huge fleets during a conflict, their economy will take harm
  • Wars won't be fought in a day anymore. During conflicts, the previously accumulated goods will be spent over multiple days, perhaps even weeks.
This new feature will not be merged in the currently running game or demos, but the next game will include it.
If you think the implementation should be simpler / more complex / completely different - just specify it in a comment, and I will take it into account and possibly change the implementation.









Monday, November 17, 2014

Progress on the new game server

The progress is slow, but at least steady.
The new game server is in its final testing stage. As soon as that is done, new features will be added to the game.
The whole server thing means a huge change in game architecture. But this new version will be more suitable to serve hundreds of players simultaneously.

The current game does not implement this technique - it does distinguish from the previous alpha game in map size an the newly added colony limit.

Saturday, October 25, 2014

Three Tier Architecture Sample in C#


The short version:

Uploaded a simple C# sample solution (Visual Studio 2012), featuring:


  • 3 tier architecture (web application, web server, database)
  • AJAX calls from a web application
  • XMLSerialization
  • Accessing a Database with SqlDataReader
  • layer architecture of the server tier (business connector, data connector and core)


The long version:

Lately I made some changes to the client server architecture. The original design consisted of a big client (javascript running in the browser), a very small web server and a lot of SQL.
I put most of the business logic into sql because I thought that transaction handling, concurrency and scaling would be easy to implement with sql. The use of spatial data types seemed also to simple some things which would otherwise be programmed by hand.
Additionally, I wanted to find out if it is possible to write all of the server sided code in sql.
And finally, I just like sql programming and wanted to write more code in it.

Until recently, the program flow was as follows: 
The web server remembers user id per user in a session cookie. The server receivers ajax requests, calls a sql stored procedures with the client parameters and the user id and returns the result of the stored procedure.

Mostly, this implementation worked just fine, but as reported in the last blog, I ran upon a performance problem regarding spatial indices. Subsequently, I added a programmed game server to the game architecture.
The web server now receives user requests, but does not call the stored procedure but a method of the game server.

The game server consists of the following namespaces:
BC (business connector)
Core
DataConnectors

The following requirements should be fulfilled by the server tier :
- The business connector should be the only one accessible from the outside. It reveals a bunch of methods.
- Classes in the core contain the game data and do all the processing.
- The data connector is called when the core needs data or to writes updates 
- The game server has to be designed in a way that it may grow to many thousands lines of code in 100+ classes, without getting a big unstructured mess (source code tends to rot if you are not careful).

The last point is the one for which I didn't find good advice or examples. That is the reason why I put a tidied up version of the game server on github. Keep in mind that I have until now programmed only few features in the game server, so I can't guarantee that its design is as good as hoped.

This is a typical workflow for a web server request: 

  1. calling the bc method in BusinessConectort.cs file 
  2. creating an instance of the corresponding bc class which3
  3. creates an instance of a core class doing the work
  4. the core class 
    1. fetches data into sql table corresponding objects
    2. does the calculations
    3. writes back to sql
  5. the bc class then generates the output
I do not momentarily need a sophisticated way of communication between the web server and the game server. Thus the current solution is a dll which lets the web server instantiate the business connector. A better solution in the long term would be a stand alone server. That server could then even communicate with multiple web servers.

That only the business connector is accessible from the outside is not yet fully implemented. Some classes have "internal" as access modifier, preventing outside access.Others had to be set as public, since I wanted to use them with the XMLSerializer.

The web application project is kept very simple. The ajax return is imply inserted into the dom. Either adapt the result of the business connector, or add some javascript logic to parse the result, if you are implementing a web application yourself. Or do both, returning a json string from the server and creating a javascript object from it would be a good beginning.

I would be happy to hear suggestions or get even improvements to the sample.

If you like it, and in case that you also like multiplayer 4X games, check out Empires in Space, the reason for writing the game server...










Monday, October 20, 2014

Performance Problem (SQL) and its (ongoing) Solution

During the end phase of the second alpha test, one of the players informed me that logging in to the game took about 10 seconds for him.

The reason for this lied in a sql query which performed bad.
If you are interested in this technical details, you can read the corresponding question on stackoverflow. You may even reproduce the problem with the source code posted there. 

There seems to be no way to get the query running fast enough for the game, so I decided to calculate the required data in the game server tier instead of the sql server tier.
That is what I am programming at the moment.

Next post will be about the architecture of the server tier. I will probably even put a sample project (C#) on the github account of Empires in Space.

Saturday, October 18, 2014

Empires in Space is now in Open Alpha Phase

A New Massive Multiplayer Online 4X Computer Game

Empires in Space is like all classic 4X strategy games, but in addition to the standard features of the genre it is designed be a massive multiplayer online game.

  • all the standard features of normally installed 4X games now online
  • play with friend without needing them to be online
  • compete with human beings: all other realms are player controlled (and not AI)
  • there is no pay to win and never will
  • strategic cooperation with friends – defend (or expand) the borders of your realms together
  • ally yourself with your friends instead of fighting them – there will be enough opponents against who it would be better to stand as a group


Here are two playable online demos (no login or registration required):
Demo Starting Phase
Demo Advanced Phase

This is what the Alpha Version looks like at the moment. The screenshot shows a solar system, where your colonizer space ship arrives at the beginning of the game.



This screenshot shows the star map later in the game, when you have discovered a large area and met multiple other nations:



The game does run continuously on a server, without the need for a player to log in.
The idea is that multiple turns are played per day but all benefits of the turns stack up, so that you don't have to get online after each turn. Depending on the game settings, there are up to six turns a day. Only the movement points will be capped after having added up for five turns.
The most important tasks may be done within five minutes per day, but of course a player may spend more time on scouting, diplomacy and trade.

These features are implemented up to now:
  • ship movement, combat and colonization of new worlds
  • colony management, small chains of productions
  • research
  • ship designer to create unit templates, and ship building
  • alliances (clans)
  • diplomacy
  • local communication networks (generic ones and new ones from players themselves)
  • trade between players
The game ends shortly after the research tree is fully explored and the players should be able to influence the ending scenario.
Since it is a massively multiplayer game, there are some problems with ending scenarios that affect all players. The typical scenario would be “Conquest”, which would mean that a lot of players actually lose the game.
The ending scenarios are not implemented yet. The first one to come will be “Research” which leads to a global “Ascension”: After having researched the technology, players may start an “Ascension Construct“ or help to build another players construct (and of course try to destroy rival constructs). The first such construct to be finished will end the game, and players will get points according to their contribution to the construct, their spatial distance to the construct, their population and possibly other factors.
As long as there is no ending scenario, players can simply enjoy themselves by exploring, colonizing, exterminating, bartering and negotiating for fun.

You can find the project's homepage here, feel free to join the current game. I will enable turn progress as soon as ten players are part of the game.
Game content and game mechanics may be discussed in the forum, e.g. how to prevent a blitzkrieg.


I am looking forward to hearing from you, learn about your ideas, your wishes about content or your recommendations on changes.