Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SFML Blueprints

You're reading from   SFML Blueprints Sharpen your game development skills and improve your C++ and SFML knowledge with five exciting projects

Arrow left icon
Product type Paperback
Published in May 2015
Publisher Packt
ISBN-13 9781784398477
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Network architectures


Before constructing our architecture, we need some information about what kind of network architectures are commonly used in a game, and their specificities. There are different types of architectures used in game programming. They greatly depend on the game and the needs of the developer. We will see two common architectures: peer-to-peer (P2P) and client-server. Both of them have their strengths and weaknesses. Let's analyze them individually.

Peer-to-peer architecture

This architecture was widely used in the past, and is still used today. In this architecture, players know the addresses of each other and directly communicate with each other without any intermediary. For example, for a game with four different players, the network can be represented as the following chart:

This organization allows a player to directly interact with any or all of the other players. When a client does something, it notifies the others of this action, and they update the simulation (game...

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 AU $24.99/month. Cancel anytime