Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SFML Game Development.pdf
Скачиваний:
209
Добавлен:
28.03.2016
Размер:
4.19 Mб
Скачать

Chapter 9

Summary

In this chapter, we have covered the basic topics for dealing with audio in 2D games. We saw how the concepts are implemented using SFML classes and functions. In particular, we played different music themes depending on the application state. We also created sound effects for various in-game events, and positioned them in the world in order to enable a spatial audition.

With this knowledge, you are now able to incorporate audio into your game; a crucial component for creating an immersive gaming experience. As you have seen during this chapter, SFML makes the implementation very simple. The actual

challenge is the fine-tuning and the combination of suitable sound effects and music themes in order to create a unique atmosphere.

The audio functionality completes the attempt to create a playable game that uses different sources of media. However, so far, only one player can play it. In the next chapter, we are going to improve the situation by adding multiplayer support.

[ 233 ]

www.it-ebooks.info

www.it-ebooks.info

Company Atop the

Clouds – Co-op Multiplayer

After a long journey through to the book, with lots of lessons learned, we have now arrived at the last chapter. This is where we will handle a topic with growing importance in the modern times—networking. This subject shall not be overlooked

as it can be very difficult to learn and implement. It is complicated enough for people to actually dedicate their careers on dealing exclusively with it. Usually network programmers are very experienced and good at it, so they can do it efficiently and provide a good multiplayer gameplay to the end users.

Obviously, even if we wanted to, we couldn't teach every single thing about network programming, good practices, and different implementations. However, we try to pass on some knowledge on how to achieve a multiplayer experience, keeping things as simple as possible. Based on the game we've built so far throughout

the book, we now add two new concepts: local cooperation and actual network gameplay over the Internet.

The following is what this chapter has to teach essentially:

Network sockets

Client-server architecture

Creating a protocol for communication

Applying the concepts to our game

Short introduction on latency problems

Tips and tricks on cheating prevention

Let's now immerse ourselves in this complicated topic with a short introduction.

www.it-ebooks.info

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]