• 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
teremy

Number of Packets & Fairness

7 posts in this topic

Hello. I currently work myself into network programming and therefore read a lot of articles about it. One article was about how to implement your own flow control ( since using UDP as a protocol, one has to implement this on his own ). So depending on some variables, one either sends 10 packets per second or 30 ( if the connection is in a "good" state ). Now the article didn't really answer the questions I had in mind. Since 10 is a third of 30, how can the game still be fair then, if you only send 10 move commands instead of 30? And also the server has to keep track of the number of packets sent by each client, right? Otherwise with a hacked client or some other tools ( like wireshark ) one could send more than 30 packets and if those contain move commands, then you would walk faster than normal. But the time it takes to send a packet always is slightly different, so I guess it could happen that only 29 packets arrive per second ( or less ) or more than 30. And since my game is running at 60fps, that could mean 60 move commands per seconds. I read on an article about networking programming by Valve, that they send about 20-30 each second, so one packet contains more than only one move command. Are they stored whenever I move and when I got 2 they are send in a packet ( which would conclude the 30 packets per seconds )? Hopefully my questions are clear and even more hopefully you may have answers for me. Thanks for your time! Jan
0

Share this post


Link to post
Share on other sites
The game is not "fair" if someone has a better experience than someone else.
This goes for network connections, GPU speed, mouse responsiveness, player skill, ...

That being said, I think "choking" the connection is the wrong answer. If the connection can't keep up, then it can't keep up, and you'd better tell the player what the problem is and then drop the connection.
1

Share this post


Link to post
Share on other sites

But I still have to keep track of the number of packets a client sends each second, right? So that noone sends more than he should. Of course the client will try to send only 30 packets per second ( when using my client ), but you can never trust them. And a problem with that is, that it's hard to say he is allowed exactly 30 packets per second, because the slight time differences in sending packets may lead to sending 29 ( or even less ) or 31 ( or even more ) packets per second. Is this the right understanding?

Thank you for your answer, really appreciated!

0

Share this post


Link to post
Share on other sites
Why does it matter how many packets the client sends?

I presume that your packets contain time-stamped input commands. If the client sends more packets, it will just replace whatever the previous commands were for the given time-step.
0

Share this post


Link to post
Share on other sites
Not exactly related to fairness, but that situation could also be an indication of something else.

If someone is sending packets at a slightly higher rate than others, I don't see it as a big deal. Some people are on min-spec machines on dialup, other people have high-spec machines with Google Fiber. A well-written game will have fairly consistent communication patterns.

But let's imagine for some game a typical player sends around 10-20 updates per second. This is the same rate for everyone, and it is pretty steady across a large number of games. Suddenly you note one network client is sending 80 or 100 updates per second. I might not do anything differently, but if I did, I would consider it potentially a cheater or an indirect attack on the server.
0

Share this post


Link to post
Share on other sites

I would consider it potentially a cheater or an indirect attack on the server.


Or, perhaps even more likely, a bug in your clock/timing implementation that only manifests on certain laptops with certain CPUs and chipsets.
Not that I would know anything about any specifics... (cough)
0

Share this post


Link to post
Share on other sites
Haha. In that case, definitely something you should note.

But in any event, minor variations in traffic are probably nothing. Major variations can be flagged and investigated if someone has the time and inclination.
0

Share this post


Link to post
Share on other sites

The server should validate the commands the players send.  If they move a distance farther than what they are allow to, then the cheat detection alarm goes off.  A lower spec machine/connection might send fewer packets and command count, but those commands should reflect the full movement the player is seeing on their client (and pressing the buttons for) ---- one guy sends  single move steps in more packets, and the slow machine guy perhaps sends 2 steps per packet and half as many packets within the same time interval.   The players both then update with effectively the same world map speed..

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