guest    Login  Signup


home news about media forums community download
Forums . Development Blogs . Technical Blog #1 - The World Simulation

Development Blogs

Design and Technical Posts from the Development Team

Currently: 27 Topics, 74 Posts

Technical Blog #1 - The World Simulation

Lead Developer
Jen: M
((I'll warn you straight up - entries in this new section of the forum will be much more technical than the regular news posts. Unless you have an interest in Game Development and/or Modding Antilia, this will probably be of limited interest. It might also give some people a headache or cause eyes to glaze over. ))

For some time now, I've wanted to start writing more about the technical work that goes into developing Antilia. While mod guides and API references down the road will provide information on how Antilia works, these posts will provide background insight into why Antilia is designed the way it is. I'll explore why various development decisions were made, why we included some features, and had to omit others.

Please note that this is not intended to be a modding guide. Guides will come later down the road and will start with much simpler topics such as how to add a new fur texture. This blog is for development thoughts that are too technical for the news section.

Since the new Antilia game is being built off the MMORPG, it makes sense to share my thoughts starting there.

How the Antilia MMO Worked

To understand how the new Antilia works, it is useful to know how Antilia worked as an MMORPG. Afterall we aren't going to throw everything away and start from scratch, that would take far too long. For now I'll focus on the two primary components of the MMORPG: the client and the server. The client handled all the 3D rendering, player input, and instructions from the server. There were some common misconceptions that frame rate was related to server latency - but that was never the case. The client operates in a repeating loop of processing network and player input, updating the scene (animations, particle systems, etc), and rendering. Demonstrating this, there were a few times when the server would crash without actually disconnecting all players. When that happened, the players could still run around in the game, but suddenly all enemies would stop moving, NPCs wouldn't respond if you were in conversation, and chat messages wouldn't appear.

The server accepted network connections from clients, authenticated them, ran a very, very, crude simulation, and kept the world in sync for all players. Creating the first Antilia Server was my first real introduction to multi-threaded programming, and there is a reason Antilia went through a few early iterations before landing on a working server architecture. I still use the same server architecture today - as the "Toi Extendable Server". The same code that hosted the Antilia MMO is used in the Toi Studio server, and will no doubt be used for a stand-alone multiplayer server for Antilia.

The important thing to know about the server, is that it utilized what is known as a "service-oriented architecture" (SOA). The base executable did little more than initialize a collection of "services" and facilitate the asynchronous passing of messages between them. A "service" in this case is just a piece of software (in this case a class implementation) that issues and/or responds to messages. The messages are a lot like packets on a network. They include a "to" and "from" address, a message type, and whatever custom data they need. You could think of the Antilia server as a dozen shops that do little more than constantly answer the mail. When a new message arrives they process it, often creating more mail that they send out to other shops. No shop ever stops and waits for any other shop - they all just respond to messages as they arrive.

Given that Antilia was my first time implementing a SOA based server, there are of course things I'd like to change or improve. In spite of the flaws, however, the system worked, was easy to expand and modify, and was fairly reliable.

There is a lot more to say about how the MMORPG server worked, such as how data was 'pushed' rather than provided on request or how it was authoritative rather than responsive. I'll save those topics for another time.

How the New Antilia Will Work

The reason it is important for future mod developers to understand these concepts is because Antilia will continue to use them. Rather than throw all the existing architecture away, we're simply 'bending' it a bit to accommodate the game's new direction. Antilia will continue to be based on a client-server architecture, it's just that in the future the server will reside in a .dll file that can be loaded by either the game or a stand-alone server application. I'm calling this part of the code the "World Simulation Server", as it services the world simulation.

From the game's perspective (or more accurately, the "World Simulation Client"), it doesn't matter where the World Simulation Server is, or whether it is running on the same computer as part of game or on another computer over the Internet. The game/client continues doing what it always has, processing player input, updating the 3D scene as the server instructs, and the 3D rendering.

Understanding this foundation won't be required for very basic mods like adding a new fur texture or adding a new UI theme. For more complicated non-cosmetic mods however, it will be important to understand these two critical components of Antilia and their relationship. Everything that changes or can be interacted with in the world including NPCs and enemies behave, whether clicking on a crate opens an inventory window, and even the weather is controlled by the World Simulation Server.

That's all for this time, but expect more soon. I have several more topics I've started writing already including: how we're designing the game to be mod-friendly, how mods will be be configured and synchronized when playing multiplayer, our approach to scaling and building Forra, and how Toi Studio will aid in mod development. If you have a suggestion for a topic or a technical question about Antilia, feel free to post it in a reply!
Thursday, June 18, 2015 12:59pm
Jeff Leigh - Lead Developer - Right Brain Games
Jen: 82
Cool! I'm no modder but I would be willing to get my feet wet for this.

I was not able to glean much from this personally (I have little understanding of networking and programming) buuuut I look forward to future posts non the less.

Technical stuff is the best!
Saturday, June 20, 2015 11:02pm
Page: 1

You are not currently logged in. You must first log in to post a reply.
Frequently Asked Questions Development Team

Antilia - Copyright © 2017 right brain games