封面
版权页
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks discount offers and more
Dedication
Preface
Timber!!!
Zombie Arena
Thomas was Late
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. C++ SFML Visual Studio and Starting the First Game
The games
Meet C++
Microsoft Visual Studio
SFML
Setting up the development environment
Planning Timber!!!
Creating a project from the template
Project assets
Understanding screen and internal coordinates
Starting to code the game
Opening a window using SFML
The main game loop
Drawing the game background
Handling errors
FAQ
Summary
Chapter 2. Variables Operators and Decisions – Animating Sprites
C++ variables
Manipulating variables
Adding clouds a tree and a buzzing bee
Random numbers
Making decisions with if and else
Timing
Moving the clouds and the bee
FAQ
Summary
Chapter 3. C++ Strings SFML Time Player Input and HUD
Pausing and restarting the game
C++ strings
SFML Text and Font
Adding a score and a message
Adding a time bar
FAQ
Summary
Chapter 4. Loops Arrays Switch Enumerations and Functions – Implementing Game Mechanics
Loops
Arrays
Making decisions with switch
Class enumerations
Getting started with functions
Growing the branches
FAQ
Summary
Chapter 5. Collisions Sound and End Conditions – Making the Game Playable
Preparing the player (and other sprites)
Drawing the player and other sprites
Handling the player's input
Handling death
Simple sound FX
Improving the game and the code
FAQ
Summary
Chapter 6. Object-Oriented Programming Classes and SFML Views
Planning and starting the Zombie Arena game
OOP
Building the Player-the first class
Controlling the game camera with SFML View
Starting the Zombie Arena game engine
Managing the code files
Starting coding the main game loop
FAQ
Summary
Chapter 7. C++ References Sprite Sheets and Vertex Arrays
C++ References
SFML vertex arrays and sprite sheets
Creating a randomly generated scrolling background
Using the background
FAQ
Summary
Chapter 8. Pointers the Standard Template Library and Texture Management
Pointers
The Standard Template Library
The TextureHolder Class
Building a horde of zombies
Using the TextureHolder class for all textures
FAQ
Summary
Chapter 9. Collision Detection Pickups and Bullets
Coding the Bullet class
Making the bullets fly
Giving the player a crosshair
Coding a class for pickups
Using the Pickup class
Detecting collisions
FAQ
Summary
Chapter 10. Layering Views and Implementing the HUD
Adding all the Text and HUD objects
Updating the HUD each frame
Drawing the HUD and the home and level up screens
FAQ
Summary
Chapter 11. Sound Effects File I/O and Finishing the Game
Saving and loading the high-score
Preparing sound effects
Leveling up
Restarting the game
Playing the rest of the sounds
FAQ
Summary
Chapter 12. Abstraction and Code Management – Making Better Use of OOP
The Thomas Was Late game
Structuring the Thomas Was Late code
Building the game engine
Coding the main function
FAQ
Summary
Chapter 13. Advanced OOP – Inheritance and Polymorphism
Inheritance
Polymorphism
Abstract classes - virtual and pure virtual functions
Building the PlayableCharacter class
Building the Thomas and Bob classes
Updating the game engine to use Thomas and Bob
FAQ
Summary
Chapter 14. Building Playable Levels and Collision Detection
Designing some levels
Building the LevelManager class
Coding the loadLevel function
Updating the engine
Collision detection
Summary
Chapter 15. Sound Spatialization and HUD
What is Spatialization?
How SFML handles spatialization
Building the SoundManager class
Adding SoundManager to the game engine
Populating the sound emitters
Playing sounds
The HUD class
Using the HUD class
Summary
Chapter 16. Extending SFML Classes Particle Systems and Shaders
The SFML Drawable class
Building a particle system
OpenGL shaders and GLSL
Summary
Chapter 17. Before you go...
Thanks!
更新时间:2021-07-08 11:13:53