Networking With The Server

Started by
12 comments, last by fastlane69 18 years, 3 months ago
Currently, me and my team would like to network the client side and the server, so that when the character somehow gets logged out, updates of the characters status and position are automatically sent. But we can't figure out how to do this, does anyone know how? We can get the server and client networked so that the client can play the game, but not so that updates of the characters status is automattically sent.
Advertisement
"Automatically" based on what? When it changes? When someone connects?

Automatically "sent" where? To all connected clients? To the disconnected client?

I'm afraid you have to specify your question using slightly less ambiguous language before we can start helping you with your question.
enum Bool { True, False, FileNotFound };
Sent "to the server"
Sent "when it changes"

If the client is logged out, it can't send to the server. So it has to send before it logs out. I would recommend calling the send function when the user chooses "log out" in the UI, but also once every (say) 10 minutes, to make sure there's a "backup" frequently enough.

Also, if you keep the state on the client and trust the state when the client logs out, someone will hack it in memory and make it send character state that's not actually true (like make themselves level 100).
enum Bool { True, False, FileNotFound };
the data is checked with the last sendage. Plus, where the stuff is being put, it can't be hacked. Cause u can't hack the core of windows without having windows fail.
Quote:Cause u can't hack the core of windows without having windows fail.


If you think so, then you haven't really hacked.
enum Bool { True, False, FileNotFound };
seriously, have u ever been able to place a file in the core of windows? I'm not talking that stupid file that it makes. I'm talking where if you bypass the security system, your computer basically gets formatted. But can anyone help me do this? I'm trying to make a multiplayer game in which the server is needed, but it isn't needed. I'm using WinSock, so any help would be appreciated.
Quote:Original post by PNT
I'm trying to make a multiplayer game in which the server is needed, but it isn't needed.


This really doesn't make sense, and just contradicts itself. You can't have a multiplayer game where the server is used in that fashion. Otherwise, you would be doing like hplus described, and that would leave the system wide open for game hacks. What you proposed with checking the values from the client against the values on the server would just be a waste of cycles on the server that could be better used elsewhere.

Ideally, in an online game, no "important" information is stored on the client's computer. This is done in this manner to prevent anyone from hacking the information and changing it to cheat with. Even if you were to use the highest possible encryption, there will always be someone that could break it. It would be better to stick with keeping character data on the server, and only give the client the information it requests for displaying that data; never to modify it.
I'm trying to help. However, what I'm saying is: if you have data that you want to send, then send it. If you don't have a process running, then how could you have data to send? I don't understand what the problem is.

You're perfectly free to write an insecure system if you want, that's not the problem. The problem is that you haven't told us what you actually want to accomplish.

Given this flow of data, which I believe is what you are proposing:

1) server starts up
2) client starts up
3) client logs into server
4) server sends character and world data to client
5) client mutates the character data
receiving world updates from server
occasionally sending client data back to server
6) client receives user log-off command
7) client sends character data to server for storage
8) client process exits

What's the problem you're having?
enum Bool { True, False, FileNotFound };
Quote:Original post by PNT
seriously, have u ever been able to place a file in the core of windows? I'm not talking that stupid file that it makes. I'm talking where if you bypass the security system, your computer basically gets formatted. But can anyone help me do this? I'm trying to make a multiplayer game in which the server is needed, but it isn't needed. I'm using WinSock, so any help would be appreciated.


If you can get there , they can too, don't kid yourself. The only thing from the client you should get is the username, password and the keys they hit (like "MY_FORWARD" and even that limit it to so many messages per second to elimate speed hacks. You should send back what the client should do. Basically make it a dumb client.

Using this method you'll only need to send a "CLIENT_DISCONNECTING" message and record that players info on the server side and send a message back like "SAFE_TO_DISCONNECT". If you don't get the message, have it wait x number of seconds for a response then continue shutting down.

Trust nothing from the client.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

This topic is closed to new replies.

Advertisement