Realm Zero is an independently developed sandbox MMO game. The main focus is to get away from the traditional MMO style game play which many people have become accustomed to over the years. Players have been spoiled with tab targeted combat, bored by repetitive tasks and consumed by endless hours of level grinding. So the goal is to make a game that both the casual and the extreme gamer can enjoy without feeling like it's a life commitment.
Over this past month the main focus has been to re-implement and improve the network engine behind Realm Zero. Previously the system was capable of handling interactions such as chat, player movement, orientation, spells and basic item interactions. Since then the system has been improved adding a dual-layer communication process which includes both TCP & UDP streams. This allows for the transmission of critical data through the more reliable TCP protocols, while less trivial packets such as moment and orientation are sent through UDP stream.
With the addition of the upgraded network components, I've started to implement split zone processing. The goal is divide up the overall work handled by the main server, while managing complex tasks such as spawns, AI and player interactions. A zone instance connects much like a player client, however it uses a different authentication protocol to establish a connection.
Take a look at the image below:
Given the example let's assume our world map only consists of 4 zones, each zone being handles by a separate processing client which could ultimately be residing on a separate server all together. Now besides the obvious benefit of extra processing power and resource utilization we gain another very unique advantage, redundancy. Now let's say one of these zone was to crash (disconnect), the main server can detect this disconnection and automatically start another instance! While we may lose any current running values, we won't suffer a hard crash and the player is not likely to notice a difference.
Spawns & AI
The most recent component I've been constructing is the spawn handler. A spawn may consist anywhere from 1-100's of concurrent NPC(s), each with the option to run an AI script to process their interactions. Since it's pointless to run a spawn(s) for an empty world, area or zone I've implemented triggers. You should notice from the image below a green sphere and a red circle. The green sphere is the trigger area, while the red circle is the spawning area. Now a trigger goal is to load or (pop) the spawn once a player(s) are within a given range and de-spawn once the area has been idle for a given period of time. This allows the server to reclaim vital resources and processing power generated from all the NPC(s) and AI scripts. This should cause little to no impact on the players experience given that the (trigger) zone is large enough to be masked by their visual distance.
The next area of focus will be implemented harvest-able resources, which will utilize the spawn handler for generation. This will be one of the first dynamic game elements implemented as resources will spawn in dense areas for a given type and once they reach a certain percentage they will stop generating new nodes. Once a player has extracted (depleted) a node, it will be removed from the world and now the global percentage now has a chance to spawn another node somewhere throughout the area.
Which ultimately brings us to gathering and the skills associated with harvesting the nodes. The first harvest-able resources implemented will be rocks and ore, which require the mining skill. Once this system has been implemented, it will be very easy to replicate it across other resources such as: timber, herbs and other naturally occurring resources.
Latest tweets from @realmzero
Working on the (networked) chat system. Implemented overhead chat text, next I'll add configuration options to... T.co
Sep 17 2014, 8:00am
And just like that chat works! Time to add chat bubbles and enhance the chat further!
Sep 16 2014, 7:22am
Sep 16 2014, 6:23am
It's getting close! We have network movement & animations almost finished! T.co
Sep 14 2014, 6:46pm
Late night network debugging! T.co
Sep 11 2014, 11:32pm
Sep 11 2014, 10:54pm
Sep 11 2014, 8:48pm
Got the base network animation synchronization code working! Converting it to RPC tomorrow since it doesn't need network evaluation.
Sep 11 2014, 12:56am
Reduced network ping from an insane 1200, to 300 and now through packet optimization average of 65 (Florida) -> (Texas)! #mmorpg
Sep 10 2014, 11:22pm