更新时间:2021-07-08 11:13:53
封面
版权页
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
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
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
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
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
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
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
Chapter 9. Collision Detection Pickups and Bullets
Coding the Bullet class
Making the bullets fly
Giving the player a crosshair