Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Client / Server Issue Handling 3D Movement

Author
Message
Grayvyn
16
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 23rd Jan 2009 01:19
I have made a few online games before but never a 3D one. I would like to use GDK for the client but the server be a normal windows console mode.

The problem is how does the server process 3D movement? or ray-tracing a bullet? etc...

I see 2 choices:
- do it manually, using 3D math that I need to figure out, yuck
- get rid of console mode and use GDK on the server which could cause performance issues and would need odd tweaking to support multi-areas, I think

And I can't put the processesing on the client... NEVER TRUST THE CLIENT!!!

OK, thanks!

<a href=www.rpgwo.com>RPG World Online</a>
Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 24th Jan 2009 00:43
Hi Grayvyn,

Unfortunately, letting the server process 3D movement would require a lot of power, especially for several dozens of players simultaneously.

Most online games let the client do the processing and then sends it to the server which checks if it's possible, if it isn't, it would boot the player for cheating.

Hope this helps.

-Mike
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Jan 2009 18:05
Actually they don't... Most online games calculate the movement both on the client and the server, but only the key-presses are sent to the server, so the client calculation is just to make it feel more responsive. Calculating 3D movement is not particularly processor intensive either.

Seeing as the server needs only the collision data, why not use a collision library for C++, and use that instead of GDK.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 25th Jan 2009 01:11
Quote: "Actually they don't... Most online games calculate the movement both on the client and the server, but only the key-presses are sent to the server, so the client calculation is just to make it feel more responsive. Calculating 3D movement is not particularly processor intensive either."


You have, unfortunately, contradicted yourself. Also, if the server calculates movement of every player, games like World of Warcraft, which has 3000+ players per server, would be unbearably laggy.

And, collision has nothing to do with the server as all the world data is on the client, else it would be ridiculously complex.

Hope this helps.

-Mike
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 25th Jan 2009 03:22 Edited at: 25th Jan 2009 03:23
Quote: "You have, unfortunately, contradicted yourself."

Where?

Quote: "Also, if the server calculates movement of every player, games like World of Warcraft, which has 3000+ players per server, would be unbearably laggy."

I can't see that calculating movement for even thousands of players would be very computationally expensive. Well, the collision might be.

I do know for a fact that many first person shooters do as Diggsey mentioned, but things might be done differently in larger, persistent online games.

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 25th Jan 2009 04:23
My client-server system uses a distributed load. The server assigns each client a group of objects to simulate, where the group size is based on how the client's computer rates. It checks the CPU speed and checks if the video card has PhysX hardware acceleration, or if they even have a PPU, then sends the info to the server, so it can assign it. If the client disconnects, the server takes control back. It also does some reasonability checks to make sure there aren't hackers. The server just takes control of anything not simulated. It also won't give the client anything if their computer can't handle any more than a few objects.

This only works for a massive game, though. Like, an entire galaxy. Otherwise, you'd get issues with small groups of objects, like if something actually collides with something from another group. That'd be really troublesome, the client wouldn't know those other objects are there.

It does a lot of other checks when assigning objects. Like, if the object in question is moving fast or is near something moving fast, it'll keep all the included objects to itself. You can always control the server quality, but never the client quality.

Login to post a reply

Server time is: 2024-11-25 13:19:23
Your offset time is: 2024-11-25 13:19:23