• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Scobbo

Best Networking Theory

2 posts in this topic

Hi everyone!
So recently I have been thinking about what needs to be sent over a network for games to stay in sync. In regards to say an MMO, but lets scale it down to the basics. In a one-to-many server-client system here is what I assme happens, please correct me if I'm wrong because I'm very interested to see how this is best achieved (for later projects).

The player has direct control over the position and rotation of the character (so walking around, or flying, whatever) using WADS and mouse and instead of sending the control inputs to the server the position and rotation vectors are sent to the server and the server sends them to all other clients that need to see them (so in the same area or instance). I'd assume there would be a check there first to see if the character has been moved by external forces (being hit by a boulder or collided with an object) first or if the character is still alive.

Perhaps the clients computer takes care of the colisions when the server has sent the position of the boulder and then lets the server know that there has been an impact and the boulder and player are now in new positions. Though I'm not sure who would control the boulder (client or server) if this is an object that all players can interact with, possibley the last player or object to interact with it has control of it's position and rotation.

Then there are actions or skills. I'd assume that the input from the player is again translated into a function instead of being sent directly to the server for it to control. (That was hard to understand, I'm awful at my own native language) What I mean is if I cast a fireball which is skill one. If to activeate it I press the number 1, that keypress is not sent to the server but the client sees the button press and then tells the server that fireball is being cast and not skill one is being cast. Then the server lets everyone else know that the player has cast fireball and tells the others what animation needs to be played and to instantiate the projectile using the pos and rotation and velocity they get from the server. With unguided projectiles such as a basic fireball skill would the server give the velocity and then not worry about it or would it update the information every few steps to make sure sync is possible.

With guided objects such as a homing missile, would that also be controlled by the player that fired it, the player it is following or the server? I'd think server, because it has the most up to date information on everything.

I know this is a lot of information and I'll probably be experimenting with it to see what works best for each situation but I'd like a starting point.
0

Share this post


Link to post
Share on other sites
Stuff like keypress translation and etc is typically handled by the client. The client would just send a packet meaning 'I want to cast fireball in direction X' and the server would check to see if that's okay. If so it would spawn a fireball object and clients in the relevant area would get a spawn notification and update notifications, etc. It would probably be okay in an MMO to let the player have direct control over their rotation, but as far as position, you'd want to send requests to the server. For a free-motion 3D world you could have the client allow movement and then when it comes time to send an update to the server you'd send a 'this is where I think I'm at right now' message in your package. The server would check the position it has for you and then check whether or not you can reach the new position from the old one within the time that has passed. If so then it updates our position, otherwise it would have to react somehow (managing collision, preventing speedhacks, etc). Then you just send the player's position to everyone in the area, including the player, and the client would correct the position if necessary. (That's not to say you shouldn't have collision code on the local side as well, though.)

For a 'homing' object you can actually go either way. You could treat it as a sort of delayed-effect spell: notify the clients of the point of origin, time to impact, and intended destination and let the clients manage the particle, then process the actual effect (explosion damage, whatever) once the time is elapsed. On the other hand, if it's the kind of thing where you fire a homing missile at someone and they have a chance at outrunning it or ducking behind cover while it's in flight then the server would need to have an object representing the projectile.
0

Share this post


Link to post
Share on other sites
[quote]instead of sending the control inputs to the server the position and rotation vectors are sent to the server[/quote]

This means that the client can cheat by sending whatever position they want. This leads to teleport hacks, speed hacks, etc. If this is not a problem for your game, then that's acceptable, but for most games, where you are at actually matters. Wouldn't want players to warp to the rewards room after the final boss, without first going through the entire dungeon...

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0