Astral Realms Update: August 2013 Chat Feature and Avatars

 

I have made another minor update to Astral Realms: The addition of a generic avatar (this is not customisable) and the ability to chat in real time to other avatars that are encountered in the world.

This was slightly more complex that it would normally be, since the client/server architecture in Astral Realms is quite different from what it would normally be, particularly for a T3D game. T3d has it's own networking features, and for most games, those do just fine. However, for Astral Realms, I needed a very powerful and completely unique server setup, so I had to write it myself. It is actually a Java server, which connects to T3D clients using sockets.

Each T3D client is set up as a single player client, and connects to my server. All client/server interaction is handled using my custom server, which is designed specifically for this project. Most T3D games use a multiplayer client and T3D's own networking hardware, and modifying this to do something it was not neccessarily designed to do can be difficult.

The main advantage to this system is that I have complete control over all client and server interactions, I can customise it completely to my project. Since my project is quite different to the kind of games that would normally be made with T3d, this is a huge advantage, which has saved a lot of time and frustration in the past, compared to other projects that I have worked on.

In order to implement the chat feature, I first had to create an "Avatar" which represents that player in the world This had to be added to the Database and syncronised between all clients. This would normally have been done automatically by the T3D server code. I then had to pass a message from the clients to the Java server, look up the recipient in a client list, and send that message. This again, would have been done automatically with T3D's built in code.

I will probably upload a beta version of Astral Realms MS2 at some point this week or early next week. It will have bugs, but I think the best way to debug and develop the program is by using a live environment, and gradually debug and improve it over time, rather than waiting until it is completly done. For a project like this, that could take a lot of time.

You must be a member of this blog to see the comments. Log in now!

If you have no account yet, you can register now! (It only takes a few seconds)