Jump to content
  • Advertisement

Project: unirule

Server(s) Side

Sign in to follow this  


Hello GameDev,

I've been busy working on Dynamic Assets.  In order to successfully incorporate them this time around I've needed to include a whole host of programming across all the servers for this game and I thought 'why not do a blog about the servers'.  I've never programmed a server before this project and really have no idea what I'm doing.  I just get stuff working and I'm happy.  But seems Node.js is very intuitive and it is so simple that you don't need to be a rocket scientist to figure stuff out.  But a quick overview of my servers and why I have 3 so far and will probably have 5 or 6.

Relay Server
The relay server hosts the website and is responsible for user authentication and what-nots.  While users are connected to the simulation the relay acts as a relay ( imagine that ) between all the clients and the back-end servers.  It relies on socket.io to communicate with the clients and zeromq to communicate with the back-end servers.

Data Server
The data server holds a static version of the world and all it's contents.  It's purpose is to provide all the information needed to a newly connected client.  This way the demand for data isn't hampered by newly connected clients while the simulation is running.  Of course it needs occasional updates and the terrain changes and the assets change.  And soon too updated Simulin positions.

Simulation Server
This hosts the path-finding and tiny bits of user functionality that I've Incorporated thus far.  But basically the simulation server is the work-horse behind the simulation, or at least will be.  I plan on breaking this up into 3 separate servers.  My wish list is to have 2 path-finding servers which each host world information necessary to path-finding and then requests are toggled between the two ( cut my pathfinding time in half ). And an AI server which will handle what it is the Simulin are doing.


Now my assumption is that each new instance of a Node.js server will utilise it's own processing core?  Am I wrong about this?  I sure hope not because I figure that if I break the needs of the project over multiple servers it will make better use of a computers abilities.  Maybe each Node.js server will operate in parallel? 

Because I'm using many different servers to do all the stuff I need to do it's taking a much longer time to program all this.  Plus, I recently switched all my THREE.js geometry over to buffergeometry.  The servers hold world data information according to vertex objects and face objects, but the clients hold world information according to buffer arrays which require a little trickery to update correctly.  Keeps me on my toes.


Anyways, here's some video's to check out of my website

And here is a video of three connected clients.
One client is adding stuff to the world, the other two are receiving the updated content. from a different perspective.

Thanks for checking it out!

Sign in to follow this  


Recommended Comments

Looking GREAT!

What kind of hosting situation are you aiming for?  That should probably be your #1 design restriction for the # of soft-servers you should be thinking about (starting with anyhow).  Cores are about the most expensive aspect of a virtual server hosting plan(if you are going that route).  If you are looking at leasing actual hardware or co-locating your own, then cores are pretty cheap compared to the rest of the hardware/bandwidth investment. 

With that in mind, most modern "cores" can handle multiple threads.  A cursory search seems to indicate that node.js is single threaded(old info so don't take just my word for it), so I would consider 1 for each thread that the core(s) can handle(Processor Specs provided by VM hosting providers will give you this info) the max per Server instance, but probably just 1 per core would be best.  Of course, performance testing is the only way to be absolutely positive of how it will behave in the wild.  When I was a systems engineer I made extensive use of local virtual machines for testing these kinds of things out.  Local VMs are fairly easy to build in all shapes and sizes(#cores(you can even emulate specific processors if I recall correctly)/ram/disk/etc)..  An infinite playground for testing out software configurations.

Anyhow, that's my systems engineering input. ;)

Keep up the killer work!

Share this comment

Link to comment

As an example, on Microsoft Azure

(2) servers with 2 cores and 4GB of ram each (month to month) is about $100 a month.. A 1 year reservation is only $600, and a 3 year is around 1300-1400..

Just some info to keep in mind ;)

Share this comment

Link to comment

Hi @Septopus, thanks for the feedback.
I intend to buy a computer to host the game.  I will then hook up a business line to handle incoming and outgoing data.  Here in Canada upload speeds are severely limited ( I have my own suspicions as to why ) and you need a business line to have decent upload speed.  If nobody plays my game then at the end of the day I've got a killer gaming rig.  But that's about as far as I've gotten with this idea.  First I'm going to see if I can get 10 people playing my game, haha.  If those ten people play and enjoy themselves ( and most importantly, want more ) then I can start thinking about the future beyond that.

Share this comment

Link to comment

Pretty much the same story in the US as well, upload bandwidth is a commercial product almost everywhere.  That's how ISPs make money, it's not off of end users. ;)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By blesseddisciple
      I am designing a very simple 2d tilemap engine with HTML5 canvas and Javascript. I have two for loops to run through map coordinates and then draw to canvas a tile based on what the said coordinate value is. While doing this, I also need to able to assign an incrmenting var/class/type or whatever with dynamic parameters such as that tile's x, y, and number values. Something like the following pseudo theory:
      for loop ++ , for loop++
      Thanks for any help!
    • By SteBensonDev
      Looking for a developer to help me develop a bot for discord, it will be a few simple features that will all work together to create a bot perfect for Discord servers that want to be used for games. I am creating a server for Halo Infinite competitive play and need something to fit the purpose, but I want the bot to be multipurpose and work on other servers for different games.
      The features i want it to have are:
      - Auto Roles, controllable by admin of how they are given, so if admin accepts them they get given a specific role.
      - Basic announcement commands
      - Nickname requester
      - auto message when specific command is made e.g. when i use a specific reaction to a message, I can automate a new message.
      - Welcome messages, leave messages etc...
      - I want a way to organise teams in roles, but I want their team captain to choose who has that role so I want specific people to be able to give the team role to people or request a role for someone if the other isn't possible.
      -A ban, unban, report system etc.
      - Chat command purge, so when a command is used or a specific reaction etc... the chat is cleared for that person to keep the chats tidy.
      -Maybe a way for messages to be moved into a different chat almost copy and pasted, so if a user requests to change their nickname in one chat the request goes to a private chat for the admins, so the public chat stays clear.
      Extra Features if possible:
      - Event reminders for when there are matches etc... sent to team captains when they have a scrim match
      - Leveling system but given by the admins, this can be when they win matches, or tournaments they level up on the admins command, this will then categorise the roles.
      -A way to search for certain roles so for example search for all of the players with a specific role(rank), specified by the admins so they can recruit players etc... and also a way to search for a certain players username and find out what rank they are in your server.
      - A twitch broadcasting automation set by admins for when a specific matchup is being streamed and this gets posted wherever specified maybe announcements etc...
      Future Preferences:
      -A way for people to get involved like a in discord currency everyone is given a specific amount when they start and they then can use that to gain currency by predicting who is going to win/draw, so they place the currency on specific result, result is posted by admins and the total amount of currency used is split between the people that won etc... There will be in discord leaderboards for people with the most currency, there will be prizes for people with the most currency by the end of each month or so... they will also be able to donate to the channel, and will receive bonuses in the channel.
      -Depending on how much is donated to the channel, they can work up tiers, if they donate £10 for example they get priority status on twitch links and when they start to stream they are auto posted in the twitch channel. etc...
      -got more ideas,
    • By therax1986
      Hi everyone. For the last few months I’ve been working on a simple HTML5 2D side scrolling action game called Theraxius. It's nothing new and revolutionary, it's more like an evolution of different technology (combination of HTML5, PHP, MySQL). The game also includes a level editor so you can create your own levels. The game and the level editor is written almost completely in JavaScript, no download is required. Just load and play. Here are a few screenshots and the link to the page.
      In the next weeks I’ll try to post some videos, try to add registration (for newsletter and later for public test).
      Release date: when it's done

    • By genieee
      Top HTML5 game developers

      The spry march of digital technology has ushered a radical transformation in the entertainment segment, the way it was perceived and consumed. The over dramatic daily soaps replaced by more relevant web series, the noisy news channels are muted for the tailored-to-taste news feed and child’s play time has shifted from the outdoor parks to the computer deck. With the heroic stunts and captivating sequences of the virtual world, browser games have taken the world by a thundering storm.

      There is no two say that today’s ground breaking source of entertainment for the millennials is the craze for HTML 5 games coupled with the captivating graphics, enchanting characters, and intriguing strategies that keeps the players glued to their screen. It’s not just the millennials infatuating over the flashy games and challenging strategies but even the adults can’t keep off these instantly addictive games.

      With such a diverse palette of consumers and their manifold tastes, it creates a huge vent in the gaming world pushing the boundaries to create custom made game strategies that could address the appetite of the cohorts of different realms. The consumer today demands flexibility and portability of their favourite games which paves the way for HTML5 games to create waves across the globe.

      Catering to this unflinching demand for more challenging, more interesting and more target oriented tailored gaming concepts we’ve witnessed quantum-shift levels of improvements in every aspect of the games from its audio/video quality to concepts over the past few years. Today, the web offers an ocean of gaming options right from educative, engaging, entertaining or challenging. From Barbie dressing to counter strike, crime scenes to investment puzzles there is a game for anything and everything.

      Customers urge for choices of platform where in they can plug into their current level from any device, be it their smart phone, laptop or desktop. As such, HTML5 is unanimously favoured by web developers and game developers as it provides cutting-edge features, of 2D and 3D graphics, audio APIs, offline asset storage, and combined support for the most popular web browsers. From online casinos to fun games, this mobility-friendly technology is just the perfect match for today’s game consumers.

      Benefits of Developing Games in Html5

      Cross Platform Accessibility:

      HTML 5 offers the flexibility and portability of the games in multiple devices without a tweak in the code. It stands true to its promise of coding once and deploy everywhere that means the same piece of code would run on any device (hardware) and operating system (software).

      Ease of Framework:

      HTML 5 is the most preferred gaming tool for the versatility, flexibility and compatibility it offers that allows the developers to tap into uncharted territories with the best tools at disposal.

      No plug-ins needed

      Dodge the nagging pop ins requesting to download the plug-ins with HTML5 gaming engine. There’s no need for extra plug-ins in HTML5 as that of Flash or Unity. A brief preload is all it takes to boot the game.

      It’s the future

      HTML5 is not going anywhere anytime soon. With more and more elements getting adopted more and more companies will start to develop in HTML5. It is indeed the future.

      Given these scintillating advantages of the budding platform more and more companies and game developers are making their way to learn and implement HTML5 in their books of code. Considering the market flooded with all the itsy-bitsy games, it becomes a daunting task to choose a high-quality brain stimulating concept of game that not just focus on engagement but actually delves deeper to hone the skills of strategic thinking, reflex reactions, decision making, confidence boosting and many such personality traits.

      Creating an engrossing game is no amateur thing mastered in a day by the naive programmers binging on the html5 gaming tutorials but it is a piece of art created by experts of different talents who come together to paint the canvas. In the list of top Browser Game Development Studios Genieee secures an admirable position for its commendable work in developing and deploying HTML5 browser games leading the way for its competitors unveiling new possibilities of the arena.

      Genieee is one of the Top Browser Game Development Studios worldwide that has been serving some of the best quality and concept-driven gaming strategies for more than 10 years. Whether you craze for the fast-paced racing games, heart-pounding first person shooters, or edge-of-your-seat tower defense games, Genieee has to offer quite a diverse collection of games that would keep you on the toes with the unforeseen twists and twirls along the way.

      Genieee’s strategic masterminds behind each game focus on tantalizing the cognitive functioning of your brain by throwing unfathomable challenges and hindrances that are not just fun to decode and conquer but also forces you to ace your thinking, speed and decision making tactics.

      Genieee is a powerhouse of artistic talents and out-of-the-box strategists who come together to design and code some of the best pieces of entertainment. The company’s R&D team rigorously analyses the market and experiments with the cutting-edge technology for tomorrow’s browser games, ensuring that the company continues to set trends in the future.

      Their diverse portfolio of games is painted with many categories like Puzzle & Strategy Games, Action & Arcade Games, Educational & Sports Games and much more that caters to a wide audience. Keeping up with the pace of the changing demands and choices of the consumers, Genieee keeps an eagle-eye on the latest updates on the technology and market and comes up with the latest trend setters in its realm.

      Being a Top Browser Game Development Studios Genieee strives to be a path-breaker and leader in delivering the best experience of the virtual reality. With their great flow of streamlined processes, exemplary management of each project, and an army of exceptional talents, Genieee offers the best resources to turn your idea into a concept and a concept into a virtual reality.

    • By Val Valentino
      I've developed a browser game that I do not intend to sell and I'm looking for an investor to help me with advertising and upgrading.
      Languages: PHP7, HTML, JS, Jquery
      Database: MySQL
      FrameWork: Laravel
      Anyone who wants more information, write on PM

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!