Hot answers tagged

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'...
Philipp's user avatar
  • 119k
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 ...
Theraot's user avatar
  • 26.2k
15 votes
Accepted

Storing coordinates of every object in server side in MMOs

Independent of feasibility (yes, depending on scale) there are often better or easier ways. For instance, in your typical MMO, the server really only needs to know about the coarse navigation map ...
Sean Middleditch's user avatar
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 ...
user14376's user avatar
  • 249
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: ...
Fattie's user avatar
  • 150
8 votes

How do I keep a PHP server running forever?

One way to do this is not to change the actual values in the database in realtime. When the player logs on, you see how long it's been, and how much stuff he should have if he were earning during the ...
Almo's user avatar
  • 6,688
8 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 ...
Ross Ridge's user avatar
7 votes

Storing coordinates of every object in server side in MMOs

Yes - it is feasible. MMOs often split the game world into multiple areas, as this makes the job easier, but you can still do it with 1 massive area - you just need to use a good spatial partitioning ...
Causeless's user avatar
7 votes
Accepted

Client side prediction physics

Client-side prediction depends very heavily on a deterministic physics model that exactly replicates the way the game object behaves on both the client and the server. Even small floating point errors,...
RelicBloodvayne's user avatar
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 ...
DMGregory's user avatar
  • 134k
6 votes
Accepted

How to design a server for a multiplayer game?

Depending on what language you are using, the answer can vary. However, if you know any Java, or can at least get the gist of it, here's some old code I wrote to handle something like this. https://...
Bryan Brown TheDudeFromCI's user avatar
5 votes

Calculate resources real-time. Sockets or not?

Introduction There are pros and cons to each method of synchronization you gave that depend on a couple of factors. First, is your game singleplayer or multiplayer, second, how real-time is your game?...
RJ-Adam's user avatar
  • 163
5 votes

How should I implement a timer in a strategy game?

I'm inclined to assign this task to the server for security and integrity reasons, but i'm not sure on the way i can accomplish that. Yes, definitely; never trust clients. Clients sometimes "predict" ...
Jon's user avatar
  • 3,684
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 ...
DMGregory's user avatar
  • 134k
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 ...
Ed Marty's user avatar
  • 5,229
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 ...
jorelli's user avatar
  • 166
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 ...
Philipp's user avatar
  • 119k
4 votes
Accepted

Should I use the pathfinding client side or server side?

Client-side greatly reduces your costs. The server is doing less calculation, so you need less server power per player. Assuming you want to display the path to the client, doing the calculation ...
Sean Middleditch's user avatar
4 votes
Accepted

what is the best way to code an online multiplayer game?

In most of cases the relationship is simple: Client -> Input to server Server -> Calculate logic and physics, send object position and property data back to client Client -> Render the scene ...
Adrians Netlis's user avatar
4 votes
Accepted

How do MMO servers handle a large concentrated number of players?

Are you already familiar with technologies that exist like redis? Server architecture is definitely a complicated subject and it's good that you're planning it out now, but you might be worrying ...
Patrick Roberts's user avatar
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 ...
Philipp's user avatar
  • 119k
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. ...
Tom Tsagkatos's user avatar
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 ...
nick012000's user avatar
3 votes
Accepted

Backend for data-driven multiplayer game

You probably do want to communicate to this information to the client so that they are able to view it. You can treat the client as a dummy terminal though with sparkly representation and have a "...
user3730788's user avatar
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 ...
Mattia's user avatar
  • 398
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 ...
schteppe's user avatar
  • 251
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 ...
Ferreira da Selva's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible