PGD Home

P0-MS4: Part 263: Unity Server

by on Oct.29, 2017, under Art and Designs, P-0, Software and Games, Spiritus Astrum

I have decided to use an Intel NUC as a server for my Unity projects. I went for the i5 model, and I have 4 GB’s RAM.

Setting up the NUC with Unity was easy, and connecting to the server from my current unity code was as simple as changing the IP address. There were no issues with connecting from another machine, which in my experience is unusual for networking, there are usually some issues with firewalls or ports that need to be solved.

The next objective is to add some persistence to my project. The easiest thing to add would be a persistent location, where the player can move to a different location, quit the game, and then restart at that location.

This, however, wouldn’t be a true test of a persistent server, because I could have just as easily stored the players position in a file on the hard disk. A better test would be to add, for example, persistent AI. So that the AI continue performing actions while the player is no longer playing the game. Then, when the player starts playing again, the AI actions are synced from the server to the client. This is the type of persistence that I want to accomplish.

It would be easier to fake the persistence by simply randomising the AI’s position and action every time the player signs in, to imply that the AI has been active in the players absence. However, this would lack realism, and would not allow for the creation of a fully “living and breathing” virtual, persistent world.

 

 

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!