Beginning C++ Game Programming
John Horton更新时间:2021-03-26 16:13:12
最新章节:Leave a review - let other readers know what you think封面
版权信息
献辞
Why subscribe?
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Get in touch
Chapter 1: C++ SFML Visual Studio and Starting the First Game
The games we will build
Meet C++
Microsoft Visual Studio
SFML
Setting up the development environment
Planning Timber!!!
The project assets
Understanding screen and internal coordinates
Getting started with coding the game
Opening a window using SFML
The main game loop
Drawing the game’s background
Handling errors
Summary
FAQ
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
Summary
FAQ
Chapter 3: C++ Strings and SFML Time – Player Input and HUD
Pausing and restarting the game
C++ Strings
SFML's Text and Font classes
Implementing the HUD
Adding a time-bar
Summary
FAQ
Chapter 4: Loops Arrays Switches Enumerations and Functions – Implementing Game Mechanics
Loops
Arrays
Making decisions with switch
Class enumerations
Getting started with functions
Growing the branches
Summary
FAQ
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
Summary
FAQ
Chapter 6: Object-Oriented Programming – Starting the Pong Game
OOP
The theory of a Pong Bat
Creating the Pong project
Coding the Bat class
Using the Bat class and coding the main function
Summary
FAQ
Chapter 7: Dynamic Collision Detection and Physics – Finishing the Pong Game
Coding the Ball class
Using the Ball class
Collision detection and scoring
Running the game
Summary
FAQ
Chapter 8: SFML Views – Starting the Zombie Shooter Game
Planning and starting the Zombie Arena game
OOP and the Zombie Arena project
Building the player – the first class
Controlling the game camera with SFML View
Starting the Zombie Arena game engine
Managing the code files
Starting to code the main game loop
Summary
FAQ
Chapter 9: C++ References Sprite Sheets and Vertex Arrays
C++ references
SFML vertex arrays and sprite sheets
Creating a randomly generated scrolling background
Using the background
Summary
FAQ
Chapter 10: Pointers the Standard Template Library and Texture Management
Learning about Pointers
The Standard Template Library
The TextureHolder class
Building a horde of zombies
Using the TextureHolder class for all textures
Summary
FAQ
Chapter 11: 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
Summary
FAQ
Chapter 12: Layering Views and Implementing the HUD
Adding all the Text and HUD objects
Updating the HUD
Drawing the HUD home and level-up screens
Summary
FAQ
Chapter 13: 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
Summary
FAQ
Chapter 14: 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
Summary
FAQ
Chapter 15: 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
Summary
FAQ
Chapter 16: Building Playable Levels and Collision Detection
Designing some levels
Building the LevelManager class
Coding the loadLevel function
Updating the engine
Collision detection
Summary
Chapter 17: Sound Spatialization and the HUD
What is spatialization?
Handling spatialization using SFML
Building the SoundManager class
Adding SoundManager to the game engine
Populating the sound emitters
Playing sounds
Implementing the HUD class
Using the HUD class
Summary
Chapter 18: Particle Systems and Shaders
Building a particle system
Exploring SFML's Drawable class and OOP
OpenGL Shaders and GLSL
Summary
Chapter 19: Game Programming Design Patterns – Starting the Space Invaders ++ Game
Space Invaders ++
Design patterns
C++ smart pointers
Casting smart pointers
C++ assertions
Creating the Space Invaders ++ project
Where are we now?
Coding the Screen class and its dependents
Adding the WorldState.h file
Coding the derived classes for the select screen
Coding the derived classes for the game screen
Running the game
Summary
Chapter 20: Game Objects and Components
Preparing to code the components
Coding the Component base class
Coding the collider components
Coding the graphics components
Coding the TransformComponent class
Coding update components
Coding the GameObject class
Summary
Chapter 21: File I/O and the Game Object Factory
The structure of the file I/O and factory classes
Describing an object in the world
Coding the GameObjectBlueprint class
Coding the ObjectTags class
Coding the BlueprintObjectParser class
Coding the PlayModeObjectLoader class
Coding the GameObjectFactoryPlayMode class
Coding the GameObjectSharer class
Coding the LevelManager class
Updating the ScreenManager and ScreenManagerRemoteControl classes
Where are we now?
Summary
Chapter 22: Using Game Objects and Building a Game
Spawning bullets
Handling the player's input
Coding the PhysicsEnginePlayMode class
Making the game
Understanding the flow of execution and debugging
Reusing the code to make a different game and building a design mode
Summary
Chapter 23: Before You Go...
Thanks!
Other Books You May Enjoy
Leave a review - let other readers know what you think
更新时间:2021-03-26 16:13:12