Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity Multiplayer Games

You're reading from   Unity Multiplayer Games Take your gaming development skills into the online multiplayer arena by harnessing the power of Unity 4 or 3. This is not a dry tutorial ‚Äì it uses exciting examples and an enthusiastic approach to bring it all to life.

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781849692328
Length 242 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alan R. Stagner Alan R. Stagner
Author Profile Icon Alan R. Stagner
Alan R. Stagner
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Unity Networking – The Pong Game FREE CHAPTER 2. Photon Unity Networking – The Chat Client 3. Photon Server – Star Collector 4. Player.IO – Bot Wars 5. PubNub – The Global Chatbox 6. Entity Interpolation and Prediction 7. Server-side Hit Detection Index

Chapter 7. Server-side Hit Detection

There are many multiplayer games which involve shooting at their core, and there will be plenty more to come. These games all need some way to keep in sync who's shooting at who, and who gets hurt and dies. There are a number of ways to solve this problem.

The most obvious solution is simply to have player clients send a damage message. If the player hits someone, send a damage message to the server. The server deals damage to the appropriate player. There is a huge, glaring flaw in this design: players can, and will, cheat the game. It's truly staggering how many client-side hacking programs there are available—programs that send messages to the server, programs that directly modify variables on the client, and so on. A player could easily specify any player to be damaged, and any amount of damage to deal. It gets even worse if the client handles damage messages instead of the server, as the client can also make themselves...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image