The engine used to build this game is unknown. This is not a real game engine, this is a GENERIC placeholder.

Game series run on an unknown engine should be assigned here. An engine built for a specific, single game, should be assigned to Custom Built engine category, not Unknown.

Latest Media

We're sorry, but no images, videos or audio files have been added to this gallery.

If you would like to share media with the community, sign up and you can.

Blog RSS Feed Report abuse Latest News: Devpost - Acaratus Network Implementation

About Acaratus with 1 comment by emptyslot on Jun 16th, 2014

New Track

We want to start of with thanking Rafael Krux for another great piece in our growing soundtrack! Here is a new sample of the latest track we did for the map exploration menu:

Network Implementation

Overview and concept

Libraries used

  • c++ boost standalone ASIO Think-async.com
  • cURL for http and remote requests to database for example

The networking is still in its early stage but already provides enough functionality to play against each other with a client/service model and to get the general idea of how it will expand.
For starters the network has been added late but by using a component based object system is not that much of an issue if you did some planning for it, usually it is a big no no to not implement the network at the start.

Below I will describe what I have added to make a singleplayer/splitscreen turn based game playable over the network without making any changes to the actual game logic.

Here is the outline of how the relevant projects are related to each other and what additional parts have been added for the multiplayer functionality.

Client project (application)

  • Client Network Subsystem inherits from
    • Engine Network Subsystem
    • Client Interface (network lib)
  • Client Network Component inherits from
    • Engine Network Component

Server project (application)

  • Server Network Subsystem inherits from
    • Engine Network Subsystem
    • Server Interface (network lib)
  • Server Network Component inherits from
    • Engine Network Component

Network project (dll)

  • Implements Client Interface
  • Implements Server Interface

Engine project (lib)

  • Provides Engine Network Subsystem
  • Provides Engine Network Component

Since all of the gameplay is implemented with lua scripting I have decided to serialize/deserialize function calls and send over the network, this might sound dangerous but no code is executed and only string/numbers are sent with a lot of restrictions on field numbers and table depth. For those without lua knowledge here is a snippet of how the body of a message could look like before being serialized.

lua code:
t =
{
  self = component_network_id,
  method = "member_function_of_self",
  arguments =
  {
    65, true, "hello world", complex_object
  }
}

complex_object =
{
  id = object_id,
  ...
}
 

Now you might wonder what will happen to the “complex_object” that could have a lot more data within it. The custom serializer will check if the table has the correct metatable and that the id value matches a real object, if thats the case it will ask for a network id and just send that network id instead together with a special flag so it can be deserialized back to the object table at the other end.

The above will only work if the object actually has a network component and that the network component has been verified by the server, otherwise the table will be sent will all the keys and values but with a lot of restrictions on everything.

Synchronization of objects

So now that we can send messages to specific objects across the network we must find a way to create objects so they share the same network id on the server and client, this can be done by letting the server create the object and then send a create object event to all clients like this.

lua code:
object:add_component("network",
{
  sync =
  {
    create = true,
    destroy = true
  }
})
 

Now the object that we attached the component on will send a create message to all clients right away and then a destroy message when the component is removed from the object, this is all good until we get more complex object interaction and creation so I added a shared token method to synchronize objects.

lua code:
object:add_component("network",
{
  sync =
  {
    shared = "token that will be same on client and server",
    destroy = true
  }
})
 

This way you can create objects with the client that could maybe be synchronized by the server later if the server created a shared object with the same token.

Actual implementation and use

With all this backend technology we can now simply do something like this to transmit all order requests that a client performs on a unit.

lua code:
object:add_component("network",
{
  client =
  {
    order = WAIT_FOR_CONFIRM,
    select_skill = NOTIFY
  }
})

Here we added to functions “order” and “select_skill” these will now behave differently since they will be routed through a proxy function that will in the case of “order” just transmit to the server and when the server responds with an OK then we call the real function on the client along with any modifications made by the server.
The “select_skill” will send a notification to the server but at the same time just call the function as normal and does not wait or expects a response from the server.


This is just a basic example of the functionality and my implementation has more features and a lot more ways to deal with allowance and security, but this is more than enough to show the basic concept that adds easy online implementation for a non performance heavy network game.

If you aren’t tired of reading by now here is an example of a more complex synchronization example.

lua code:
controller =
{
  on_created = function(self, args)

    self:add_component("network",
    {
      sync = {create = true, destroy = true}
     
      ...
    }

    -- now we can add other objects that can be shared providing
    -- that this object looks the same on the client and server
    self.child = instance_create("child", {token = "unique_value"})
  end
}

child =
{
  on_created = function(self, args)

    self:add_component("network",
    {
      sync = {shared = args.token, destroy = true}
     
      ...
    }
  end
}
 

So in this case if the server creates the controller it will sync itself and then all the shared objects it created will be synced right after.

Hope you enjoyed the short example of how the major network structure has been implemented in Acaratus, I choose to go with ease of use instead of extreme control over what will be sent over the network and how well packaged it is.

Kristoffer - Lead Programmer

Dont forget that you can subscribe to the monthly newsletter (here) where you will get personal letters from the team members where they talk more open about their work on the project!


Games
1944 : D-Day

1944 : D-Day 1944 : D-Day Indie

Updated 3 years ago TBD Single & Multiplayer Realistic Sim

Welcome to 1944 D-Day Operation Overlord' 1944 D-Day Operation Overlord is the simulation of an event' It does not strive to tell the story of one unit...

2 Circles

2 Circles 2 Circles Indie

Updated 2 weeks ago Released Jun 15, 2014 Single Player Platformer

You can move the middle green circle with your arrow buttons or WASD. The aim of the game is to avoid blue tiles with both of the circles, but green circle...

A New Fate

A New Fate A New Fate Indie

Updated 7 years ago TBD Multiplayer First Person Shooter

A New Fate It is a time of corruption and war' The year is 2020 and the world has found itself in yet another world war' The United States has been in...

A.N.B.U. - Operation : Durandal

A.N.B.U. - Operation : Durandal A.N.B.U. - Operation : Durandal Indie

Updated 7 years ago TBD Multiplayer Role Playing

Nin Corp is working on a project called A'N'B'U' It combines the old Ninja age with the modern world' It is inspired by the Anime Naruto but isnt a Naruto...

Acaratus

Acaratus Acaratus Indie

Updated 1 week ago TBD Multiplayer Turn Based Tactics

Acaratus is an episodic turn based, tactical RPG for PC set in a medieval steampunk world.

Post comment Comments  (10 - 20 of 32)
Darkkoril
Darkkoril Jan 17 2011, 8:10am says:

This gotta be kidding! Unknown engine.

+1 vote     reply to comment
BeestkRome
BeestkRome Dec 18 2010, 10:30pm says:

Why would you rate a placeholder? Is this storage area worth a 8.6, because they don't serve coffee?

+8 votes     reply to comment
hakaru-x
hakaru-x Aug 12 2011, 2:56pm replied:

lold so hard

+4 votes     reply to comment
ThePinkMamaLuigi
ThePinkMamaLuigi Dec 17 2010, 7:33am says:

Black Ops uses the IW engine!

+2 votes     reply to comment
TheOneandOnly
TheOneandOnly Oct 6 2010, 9:17am says:

What do we do if someone builds an engine and decides to call it "Unknown"?

+5 votes     reply to comment
caspercool
caspercool Oct 11 2010, 4:22pm replied:

What if they decide to call it "Custom build"?

+5 votes     reply to comment
keveen
keveen Oct 7 2010, 2:39pm replied:

If That happens, I promise that I will blow the world up.

+5 votes     reply to comment
feillyne
feillyne Nov 17 2011, 1:45am replied:

That would be Unknown 2.0.

+2 votes     reply to comment
hakaru-x
hakaru-x Jul 2 2010, 11:40pm says:

wtf is this a joke right?

0 votes     reply to comment
feillyne
feillyne Jul 15 2010, 5:41am replied:

Wtf is this a joke that you don't know words 'generic placeholder' right?

+7 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Platforms
Windows, Mac, Linux, Mobile, DOS, iPhone, Wii, DS, GCN, N64, SNES, NES, GBA, PSP, PS3, PS2, PS1, X360, XBOX, DC
Company
N/A
Contact
Send Message
Licence
Commercial
Release Date
TBD
Engine Watch
Track this engine
Share
Embed Buttons

Promote Unknown on your homepage or blog by selecting a button and using the HTML code provided (more).

Unknown
Unknown
Statistics
Rank
97 of 638
Last Update
1 week ago
Watchers
38 members
Games
376
News
284
Features
16
Tutorials
12