售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Mastering SFML Game Development
Mastering SFML Game Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Under the Hood - Setting up the Backend
Introduction
Pacing and source code examples
Common utility functions
The Linux version
Other miscellaneous helper functions
Generating random numbers
Service locator pattern
Entity component system core
Resource management
Windows system
Application states
Loading state
File loader
Implementing the loading state
Managing application events
Event manager interface
Use of graphical user interfaces
Representing a 2D map
Sprite system
Sound system
Summary
2. Its Game Time! - Designing the Project
Use of copyrighted resources
Entity placement and rendering
The drawable side of things
Rendering system
Entity kinematics
Movement system
Handling collisions
Collision system
Controlling entities
Control system
Entity states
State system
Sheet animation system
Entity sounds
Sound system
Implementing the menu state
Implementing the game state
The main game class
The final bit of code
Summary
3. Make It Rain! - Building a Particle System
Use of copyrighted resources
Particle system basics
Array of structs versus struct of arrays
Storing particles
Particle system architecture
The generator
The emitter
Implementing emitter
The updater
Force applicators
Building the particle system class
Implementing the particle system
Creating updaters
Spatial updater
Drawable updater
Lifespan updater
Interpolator
Force updater
Collision updater
Particle generators
Point position
Area position
Line position
Particle properties
Random color
Color range
Random lifespan
Random size
Random velocity
Rotation range
Size range
Texture generator
Using the particle system
Summary
4. Have Thy Gear Ready - Building Game Tools
Use of copyrighted resources
File management
File manager interface
Implementing the file manager
Loading files in a separate thread
Implementing the file loader
The loading state
Implementing the loading state
Creating the map editor state
Implementing the state
Building the control mechanism
Implementing controls
Summary
5. Filling the Tool Belt - a few More Gadgets
Planning the selection options
Implementing selection options
Building the tile selector
Implementing the tile selector
Summary
6. Adding Some Finishing Touches - Using Shaders
Understanding shaders
Shader examples
SFML and shaders
Localizing rendering
Implementing the renderer
Integrating the Renderer class
Adapting existing classes
Updating the ParticleSystem
Updating entity and map rendering
Creating a day/night cycle
Updating the Map class
Writing the shaders
Summary
7. One Step Forward, One Level Down - OpenGL Basics
Use of copyrighted resources
Setting up OpenGL
Setting up a Visual Studio project
Using GLEW
The rendering pipeline
Fixed function pipeline
Programmable pipeline
Storing and drawing primitives
Vertex storage
The model class
Implementing the model class
Using shaders
Loading shader files
Creating shader programs
Implementing the shader class
Writing basic shaders
Drawing our first triangle
Using textures
The texture class
Implementing the texture class
Model and shader class changes
Updating the shaders
Using a texture
Applying transformations
Matrix basics
The world space
The transform class
Implementing the transform class
Updating the shader class
Manipulating the triangle
Creating a camera
View projection essentials
The camera class
Implementing the camera class
Updating the rest of the code
Moving the camera around
Drawing with vertex indices
Face culling and depth buffer
Back face culling
Summary
8. Let There Be Light - An Introduction to Advanced Lighting
Using third-party software
Deferred rendering
Modifying the renderer
Implementing changes in the Renderer class
A minimal example
Shader code
Attenuating light
Multi-pass shading
Modifying the light pass shader
Changes in the C++ code
Managing light input
Interface for light users
The light manager class
Implementing the light manager
Integrating the light manager class
Adapting classes to use lights
The Map class
The entity renderer system
The particle system
Preparing for additional materials
Preparing the texture manager
Material pass shaders
Normal maps
Implementing normal map rendering
Changing the lighting shader
Specular maps
Adding support for specularity
Changing the lighting shader
Height maps
Adapting the existing code
Writing the height pass shader
Changing the lighting shader
Summary
9. The Speed of Dark - Lighting and Shadows
Use of third-party software
Theory behind shadowing techniques
Shadow mapping
Omni-directional point lights
Cubemap textures
Preparations for rendering
Representing shadow casters
Implementing the shadow caster structure
Creating the transform class
Creating a camera class
Defining a cube texture class
Implementing the cube texture class
Rendering to an off-screen buffer
Rendering the shadow maps
Modifying the light manager
Implementing the light manager changes
Drawing the actual shadow maps
The shadow pass shaders
Results
Adapting the light pass
Replacing the m_fullScreenQuad
Defining a generic frame buffer object
Implementing a generic frame buffer object
Rendering from a buffer to another buffer in OpenGL
Creating a basic quad primitive
Implementing the quad primitive class
Making the changes to the light manager
Implementing light manager changes
Re-working the light pass
Submitting light uniforms to the shader
The new and improved light pass shaders
Adding shadow casters to entities
Adding the shadow caster component
Creating the shadow system
Integrating the changes made
Potential issues and how to address them
Percentage closer filtering
Summary
10. A Chapter You Shouldnt Skip - Final Optimizations
Use of third-party software
The devil's in the details
Profiling basics
Time-based sampling
Sampling our application
Finding GPU bottlenecks
Improving CPU code performance
Optimizing the three most obvious bottlenecks
GL_Transform optimizations
Particle system optimizations
Light culling
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜