44
votes
Why is it hard to create authoritative server out of a client game?
Bjarne Stroustrup once said:
"If you think it's simple, then you have misunderstood the problem".
In the real world, creating an authoritative server is more complex than "just" ...
37
votes
Accepted
Mechanics to keep mobs and environment alive without using tons of memory?
First of all, are you sure you really need that? Have you calculated the memory footprint?
A small back-of-the-envelope calculation: A single mob and its state should fit into 100 byte of data. Let'...
20
votes
How does mmorpg store data?
1000 player may or may not be a problem. It depends on how often you need to update the database. However there is a simple solution: put the database on its own server.
I had a peek at how the ...
14
votes
Mechanics to keep mobs and environment alive without using tons of memory?
One way you could solve this problem is not actually storing state on disk, but just setting up your generation code to use a seed for the random number generator, so it generates the same thing for a ...
11
votes
Why is it hard to create authoritative server out of a client game?
the physics world and related elements, player inputs
You forgot the third vitally important part of a game, taking the game state and presenting it to the user.
Looking something up in a local data ...
10
votes
Websockets Server for Unity3d
System.Net.WebSockets seems to be completely built-in to .Net and freely available in Unity.
Here's a full Websockets client for Unity for example:
...
9
votes
How does mmorpg store data?
Both approaches are used with MMORPGs. Keeping everything in memory and periodically check pointing it to disk seems to be the most popular option, at least for older games. It has the advantage of ...
7
votes
Accepted
How to develop both a client and headless server together in Unity
Myself, I'd recommend keeping the server and client authored in a single Unity project. This minimizes the chance for mistakes where you change something in either the server or client and miss ...
7
votes
Why is it hard to create authoritative server out of a client game?
It's easy if the game is designed in a way that makes it easy. In particular:
Game code is clearly separated to rule and visual parts.
All calculations affecting rule logic are repeatable, and do not ...
5
votes
Accepted
Inputs in realtime multiplayer game
It sounds like your problem arises from processing players' input eagerly, the moment it comes in. In this situation, it's harder to keep track of the context of the input and its timing/frequency ...
5
votes
Accepted
How to connect to a server without hard coded passwords?
Don’t. You cannot secure your password indefinitely. What you can do is restrict access remotely. I don’t know anything about trello, but if it allows multiple logins with multiple permissions, you ...
5
votes
Accepted
Multiplayer Game Server Input vs Tick
so ... I can probably speak to your example, since I'm the primary author of the Jackbox Games multiplayer server, which as it turns out ... is written entirely in Go!
Since there's no simulation to ...
5
votes
Accepted
How many database servers does an online game need to handle around 100000 users per day?
I'm sorry, but we can not even give you a rough estimate as long as we do not know anything about your game. We do not know how many SQL queries each player generates. It could be anything between one ...
4
votes
Accepted
MySQL for MMO-Development... What do i have to consider ?
Overusing the database like this is usually a very bad idea.
Database queries always require a network roundtrip between game server and database server. Even under ideal conditions (both run on the ...
4
votes
MMO - Server monster handling
If a monster is in the forest, but there's nobody there to see it, does it really exist?
If a monster is in an area with no players, just ignore it. Nobody will attack it, and it won't attack anyone. ...
4
votes
Mechanics to keep mobs and environment alive without using tons of memory?
Save it to the hard drive instead.
Saving large quantities of data in a non-volatile fashion is literally why hard drives were invented. If a player isn't interacting with it anymore, you won't need ...
4
votes
Accepted
What is the correct way to stop a Godot dedicated server
Close the server
In theory ideal way to close a server is for it to close itself, if it is going to close at all. And it should only be possible to trigger this locally. Since there is no Window, the ...
3
votes
Accepted
clock synchronization
The industry standard network time protocol (NTP) also takes into account the latency of the server processing. This means there are 4 timestamps, one each for send/receive of client/server. when ...
3
votes
Accepted
Is it possible to store ALL game data on the sever side
It's not an approach worth to use.
For a normal player it may not be a big deal but some people may try looking into the game files to find various information.
Even if you download the content at ...
3
votes
Fixed timestep on the server without hogging CPU?
Sleeping is a valid solution and it's easy to implement. Pick a sleep duration that will use less CPU but still give you acceptable simulation accuracy.
An alternative solution is to use an event ...
3
votes
Accepted
Websockets Server for Unity3d
Websocket sharp: https://github.com/sta/websocket-sharp
It has a unity version which I've used as part of a cross-platform library and on a couple of local multiplayer games, and worked well. I have ...
3
votes
Accepted
Server game loop
Should I be processing data from all the clients in the same thread like this?
Yes, a single thread for all clients. Although there is an argument for multiple server threads and even they talking ...
3
votes
Accepted
How do Mobile Idle-Games work
You don't necessarily need to run such games server-sided. When the user exits the app, you save the game-state with the current time and date. When the player restarts the app, you reload the ...
3
votes
Multithreaded design for a game server
The greatest problem when it comes to parallelization is sharing data between threads. When multiple threads read and write the same data structure simultaneously, then you will have a myriad of ...
3
votes
Accepted
Are MMORPG servers and clients usually developed in isolation?
It's fair to say that for the sort of authoritative server / pure client which nearly all MMORPGs use for unavoidable security reasons, the server is typically developed with the specific purpose of ...
3
votes
Accepted
Why nobody creates shared world games?
Yes there are games, and yes there are problems.
Listen, light has a set speed. Even if the connection were at light speed all the way from client to server (which probably it isn't), it takes time ...
2
votes
How can I keep a consistent number of players per match in a continuous multiplayer game?
Team Auto-balance: A good way to balance the teams is making players change teams mid-game. This would need to be handled with care, as it would be very annoying for a player to keep changing teams, ...
2
votes
As an Independent Developer should I host my own official game servers
I once calculated the cost of buying a server and hosting it at home vs. renting an equivalent one from a cloud hoster for a couple years. I came to the conclusion that the hoster was in fact cheaper. ...
2
votes
How to achieve game server redundancy?
I agree that option 3 is the way to go - this is a pretty standard setup and requirement of resilient web hosting, and not something that you should really have to write yourself.
For full resiliency ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
server × 333client-server × 70
networking × 66
multiplayer × 65
mmo × 59
unity × 39
java × 32
architecture × 30
client × 30
c# × 28
databases × 17
c++ × 16
android × 12
node.js × 12
online × 12
javascript × 11
websocket × 11
mobile × 10
multithreading × 10
flash × 9
turn-based × 9
php × 8
hosting × 8
game-design × 7
game-loop × 7