Single threaded Cloud MMO with Unity3D (question about skip hacks)

I call them skip hacks. It is an hack I developed and tested with the game Oblivion. Works very well.

A skip hack post pones a group of nested cpu instructions until I certain time has elapsed. Such as in the oblivion TES constructon set, I found out that I could greatly increase the speed of the game by putting lots of nested if statements be-hide a time check. This would cause oblivion to check the nested if statements only when a certain time elapsed, at the expensive of counting time for each nested if statement. The number of cpu cycles must have been millions, maybe at least a trillion cpu cycles using a pentium D processor at 2.8ghz. I acheived 60fps second. (it did have a bug which I can fix, but I don’t care about Oblivion anymore.)

Now that I explained what I call a skip hack, I now I want to get to the question about Unity3D, and using it for an MMO when there is only a single thread. (I do know a hack to use unity3d in multi-threading for an MMO.)

If I could make the server not move the game pieces until a certain time has passed, so about 0.25 seconds, then update the game piece movement. Would that reduce the cpu load enough to include about 10k game pieces that all move around in the different parts of the game world?

This hack is similar to what was done with 3D wolfestien. In that game they used a technique of translating the world one time, then it was fixed. This allowed the old 386-16 computers to run a 3d level. Then on the faster 386-DX40 and even the 486 40 machines, it looked smooth.

For those who don’t know, 386-16 is a 16bit 16mhz cpu. Costed about 4k dollars for a computer. 386-DX40 was a 16bit 40mhz computer. Again, 4k-6k dollars. The 486-40 was 16bit + 32bit, it costed 4k - 10k a computer. These computers where before pentium, which was a true 32bit processor, running from 75mhz to 130mhz.

Updating systems at a lower rate then the graphical frame rate is pretty much standard industry practice for optimisation. I doubt you would find a single large game out there that doesn’t already do this.

Constraining yourself to a single thread is also a bit odd. Any reason why you are doing this?

As to the MMO, unity will work well on the client end. However on the server end you probably don’t want Unity at all.

A single-threaded program on modern comptuer would have no problem running a billiard simulation with 10k billiard balls on it (as long as they don’t all connect at once). However, in case of MMO you’re most likely going to run into bandwidth problems even if you run the simulation at reduced framerate. Before trying to run 10k people simulation, try at least 100 first. IIRC even games like WoW have fairly low number of simultaneous people in one zone, and that number is few hundred people max.As BoredMormon said, running world/ai at reduced rate is a fairly common thing these days.

2 Likes

The reason for being constrained to one thread is cloud sever limitation. They would only give me one thread, and not even an entire cpu. I could end up with only 25% of the cpu speed and one thread.

Constrain yourself to 100 people instead of 10k and see how it goes.

I don’t see 10000 people in a networked game happening in single-threaded server - the server simply will spend all its time sending updates.

At least that’s how I see it.

1 Like

OK my target will be 100 people. Because of that this server is very easy to make. I only need to compensate for Mobs.

Yeah considering this only having 100 people as my target, that would allow me to make a more fancy real time game play.

Not going to happen single threaded. You need to send out data quite often in multiplayer games, doing this with 100 players would become virtually impossible with good results. You need things to happen concurrently, there’s no way around this without sacrifices.

Been more or less done in 2006. Not full realtime, but semi-realtime, with few updates per second. See Neverwinter 1 and Neverwinter 2 servers. Those pretty much allowed people to make small-scale mmos that could support few dozens of people.