Our game play structure relies on three core components: Entities, Actions, and Server Events. The main reason for this abstraction is to allow easy communication with the server. By wrapping our core components in well-defined structures we can easily expand them while ensuring that they can always be serialized and deserialized correctly.

Entities

Any object in our game is an entity. This includes a spaceship, its weapons, and the components it holds. Entities can have children and a single parent and will usually have a top entity that is a Player entity. Entities can also hold properties, which are objects that wrap around data types, but add the ability to easily serialize and deserialize them.

All entities are stored in an Entity Manager and are identified by a GUID as their ID.

Actions

Operations that act on entities are actions. An action will have up to two parts, one to run on the client side and the other on the server side. This allows us to quickly do things like check ammo on the client before sending a “Fire Weapon” action to the server and then concluding on the client by playing the visuals and sound effects. Like entities, the actions can also have properties.

While we support the concept of client-side only actions, these are not very common. Operations that are purely for UI purposes can usually be implemented directly as methods that acts on local data.

Server Events

While actions go from client to server, the events go in the opposite direction. They are our server’s way of notifying the client code that something interesting is happening. They also contain properties and are handled by an event handler which a factory creates given given the incoming event. We have different event handler factories based on the situation to allow us to handle the same event differently, for example in different screens.

Examples of events are getting hit by a projectile or getting a message from another player.

Comments

comments

Author Lotus
Published
Views 746
War to the Core

Recent Comments

Latest Updates

  • Solo missions

    Solo missions

    Hey guys, here are the specifics of the first two solo missions, those are sketches of the first two missions. First mission: A harvester is placed near the ship, generating supply caches. The player collects energy caches and escapes a ring of mines. No supply links allowed. The sensor component is introduced by one of […]Read More »
  • We made it to the Top 100!

    We made it to the Top 100!

    We are stoked that we managed to land on IndieDB’s Indie of the Year’s Top 100 list! We are also the only MOBA that made it to the list! The support we got from the community was overwhelming, and we would like to thank each and every person that helped us get this far. Whether […]Read More »
  • Full Campaign Series, Version 3

    Full Campaign Series, Version 3

    Characters: Daniel Blaze. Protagonist, player-character. Headstrong and rebellious. Ambiguous loyalty to the Shepherd Coalition. Joseph Blaze. Father of Daniel Blaze. Commander of the Leviathan mothership until executed for treason by the Shepherd Coalition. Sylvia. AI assistant. Provides intel, advice, mission objectives. Captain Zhukov. Cyborg commander assigned to hunt down player during the first several missions. […]Read More »
  • Story: Episode 1, Version 2

    Story: Episode 1, Version 2

    The Blaze family had long been controversial. They supported the Shepherds, but continually frustrated the Orthodox elements of their faction. Joseph Blaze was especially known for his tolerance of the weakling families that used genetic engineering to alleviate the sicknesses that exposure to the Earth’s surface had inflicted on them. Such tensions between orthodoxy and […]Read More »
  • Story: Episode 1

    Story: Episode 1

    Location: The Pole Base. When Daniel Blaze passed his final test and became the primary candidate to pilot the Leviathan, the Shepherds’ newest ship, he caused a quite a stir. Not because he’s the youngest member of the Pole fleet to be nominated for admiralship, the faction had already made peace with this as a […]Read More »
Skip to toolbar