online games, making it hard to use hacks

This is a discussion on online games, making it hard to use hacks within the Windows Programming forums, part of the Platform Specific Boards category; Everyone knows that playing starcraft against some map hack bastard sucks. Anyway Im thinking about making a game to play ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    133

    online games, making it hard to use hacks

    Everyone knows that playing starcraft against some map hack bastard sucks. Anyway Im thinking about making a game to play online or on a network, the way I plan to do it is everyones computer sends the current stats (hp, x y positions, etc...) of their character to a central server thing, that then sends it all back to the other players connected. Im thinking this will probably be pretty effecient because all that is being sent is like 50 bytes per frame by each player, but it probably will also be pretty easy to create various types of hacks because everything is handled by the user's local computer. Anyone have any ideas how I can keep data transfer to a minimum but still prevent hacks.
    flashdaddee.com rocks!!!

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You can never prevent hacks. Just look at WarCraft 3. Is there any game that have been so hacked??? They even managed to get the World Builder running.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    133
    So your saying I cant do much, just make it a bit harder to do?

    Can someone move this to game programming forum, I have no idea why I posted it here.
    flashdaddee.com rocks!!!

  4. #4
    Registered User
    Join Date
    Aug 2001
    Location
    Melbourne, Australia
    Posts
    92
    Nah might as well leave it here

    All you doubting people, look at Quake! None of the games in the Quake series has ever had anything exploited other than aimbots, which i'm not sure would be too much of an issue in this game.

    The way to do it isn't to let the clients say "i'm here now". You have to make the server do all the work, and the clients just say "i'm trying to move up". Then if the server thinks its ok (ie nothing blocking their path) then the unit's position will change, and its new pos be broadcasted to all clients in the next update.

    Hope this helps

    -out-
    PsychoBrat
    psychobrat at gmail

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    133
    hmmmmmmmmmm.............. good idea.
    flashdaddee.com rocks!!!

  6. #6
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Originally posted by PsychoBrat
    Nah might as well leave it here

    All you doubting people, look at Quake! None of the games in the Quake series has ever had anything exploited other than aimbots, which i'm not sure would be too much of an issue in this game.

    The way to do it isn't to let the clients say "i'm here now". You have to make the server do all the work, and the clients just say "i'm trying to move up". Then if the server thinks its ok (ie nothing blocking their path) then the unit's position will change, and its new pos be broadcasted to all clients in the next update.

    Hope this helps

    -out-
    PsychoBrat
    Very slow, but it kinda works. Think about it, then you'd just be sending the world (unless you pre-load it on the server) along with the relative position and having it do the calculations there. Depending on the server and the amount of players, the caluclations would get slow, and not to mention it's a lot slower to send the world (again, unless you pre-load it on the server. Which would be a good idea...) along with the character's position. Not to mention the character's position could be faked, I mean how can you stop someone flying? Check if they're sending in-air coords? What about jumping, then? It'd only really stop people from walking through walls, I think. Not worth the hassle.

  7. #7
    Registered User
    Join Date
    Apr 2002
    Posts
    133
    Well of course its not gonna send the whole world map to everyone, at the beginning of each game its just gonna send all the players the same random seed to make the world with.
    flashdaddee.com rocks!!!

  8. #8
    Registered User
    Join Date
    Apr 2002
    Posts
    99
    Wouldn't that put a load of stress on the server? Couldn't you spread it out between the clients more? Wouldn't you have a whole load of movement requests being sent to the server at once, while the client's computer just sits there updating your position?

    Edit: I wouldn't really have a clue but these are just my opinions,

  9. #9
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Originally posted by muttski
    Well of course its not gonna send the whole world map to everyone, at the beginning of each game its just gonna send all the players the same random seed to make the world with.
    Yeah, but if you do any rotating of the world (which you'll proably do if it's in 3D) then you'd have to at least send the degree of rotation....

  10. #10
    Registered User
    Join Date
    May 2002
    Posts
    132
    Okay, I am personally programmer a similar situation for the company I work for. Its actually the best way to go. Having the server handle most of the calculations that is.

    As for the maps, why not just have a series of multiplayer maps (if its a game like StarCraft or WarCraft) and then just have the server "select" one, thus it really will only have to send information such as "world: 1" to the client, or if you really wanted to shorten it to save on bandwidth restrictions, only send "w:1" or even as small as "w1". Then all the cleints will be told to use the world1.map file or something. They load it on their end, server already has it loaded on its end (so it can tell where everyone is on it and do calculations as needed). Then when the clients start moving their character(s) then their clients will send the server "I'm moving from x,y to x,y is this alright?" (not in a character string exactly like that, but something that basically asks the server that question. Like perhaps "m:x,y-x,y" or something) then the server can do its thing and see if its alright and then sends an "OK" or "NO" or something back. So your keeping it generally low bandwidth and its definitly not taxing for the server to do simple calculations based on terrain and if that client could move their character(s) from x,y to x,y! So by taking something like this as your approach to it, you could come up with something very easily. And if people will be given a "world builder" (like the older WarCraft games had... not sure about 3), simple make them have to give that world file to each person who wants to use it (including the server would have to have it under a "world" directory or something) in order for them to use it as their playing field.

    As for a 3d world, the clients' graphics engine will take care of world rotation/drawing. Oh and server should (to further keep bandwidth lower) only send the necessary updates to those clients that are within "sight range" of the changes. So if someone moves toward XYZ base, and its only XYZ and attacking clients in the area, then only XYZ and attacking client will get the updates as to whats happening.

    Hope this helps.
    Last edited by tyouk; 05-12-2002 at 12:04 PM.

  11. #11
    Registered User
    Join Date
    Apr 2002
    Posts
    133
    Im doing nothing with 3d or rotations.
    flashdaddee.com rocks!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Resources for professional games
    By EVOEx in forum Game Programming
    Replies: 8
    Last Post: 06-17-2009, 03:42 PM
  2. I'm having a hard time making a .exe from a .cpp
    By manugarciac in forum C++ Programming
    Replies: 10
    Last Post: 05-13-2009, 05:40 PM
  3. Not so good games
    By the dead tree in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 11-13-2005, 08:48 PM
  4. Replies: 2
    Last Post: 07-06-2005, 08:11 PM
  5. packets, graphics, and online games
    By Invincible in forum Game Programming
    Replies: 15
    Last Post: 06-14-2002, 01:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21