Distributed Networking: Astron and Owner View

I came up with an idea for a game that requires multiplayer capabilities. I’ve read through the Distributed Networking in the docs and it’s stated that owner view is like an ai but instead of running in the server side, it is meant to run in the client.

Q1: Can you provide some example situations that this could be used for?
Q2: Can this be implemented without the use of the Astron suite? How?
Q3: What does Astron suite implements besides Owner View? Is there any tutorial in how to use it?

Btw, I didn’t even found the Astron suite Website, can you provide it?

  1. An owner view is a client-side representation of a distributed object that is “owned” or “controlled” by the client in question. A prime example of an owner view would be the local player. The client owns their player and therefore uses an owner view representation of their player object. Other clients looking at the player would see a non-owner view representation. The owner view may or may not have special privileges such as being able to change their location, send chat messages, etc. You wouldn’t want other clients to be able to change the location of your player. The owner view can also be utilized for things like showing the HUD and taking keyboard input, things that only pertain to the player you are controlling.

  2. You can do an owner view using the built-in server. Typically, the owner view is a subclass of the non-owner view class. For instance, LocalPlayer would inherit from Player. To create an owner view, you should create an instance of your owner view class, and call base.cr.makeDistributedObject(), passing in the LocalPlayer instance, but passing "Player" as the DC class name.
    Example:

localPlayer = LocalPlayer(base.cr)
base.cr.makeDistributedObject(className = "Player", distObj = localPlayer)

This instructs the server and all other clients to replicate your object using the Player class, while you control your player using the LocalPlayer class.

  1. Astron is designed to support massively multiplayer games, so it is much more scalable than the built-in server, but also more complicated, so it might be overkill for a smaller scale game. It supports storing and retrieving distributed objects to/from a database, as well as a special kind of distributed object called an UberDOG, which is kind of like an RPC object.

This is the Astron website: Astron — a distributed game server

I’m not aware of any tutorials for using Astron, but there is a series of video lectures done by Disney who used the distributed object system for their MMO games. They used their in-house OTP server, which Astron is based upon.

3 Likes