万本电子书0元读

万本电子书0元读

顶部广告

Mastering SFML Game Development电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Raimondas Pupius

出  版  社:Packt Publishing

出版时间:2017-01-01

字       数:243.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Create complex and visually stunning games using all the advanced features available in SFML development About This Book Build custom tools, designed to work with your specific game. Use raw modern OpenGL and go beyond SFML. Revamp your code for better structural design, faster rendering, and flashier graphics. Use advanced lighting techniques to add that extra touch of sophistication. Implement a very fast and efficient particle system by using a cache-friendly design. Who This Book Is For This book is ideal for game developers who have some basic knowledge of SFML and also are familiar with C++ coding in general. No knowledge of OpenGL or even more advanced rendering techniques is required. You will be guided through every bit of code step by step. What You Will Learn Dive deep into creating complex and visually stunning games using SFML, as well as advanced OpenGL rendering and shading techniques Build an advanced, dynamic lighting and shadowing system to add an extra graphical kick to your games and make them feel a lot more dynamic Craft your own custom tools for editing game media, such as maps, and speed up the process of content creation Optimize your code to make it blazing fast and robust for the users, even with visually demanding scenes Get a complete grip on the best practices and industry grade game development design patterns used for AAA projects In Detail SFML is a cross-platform software development library written in C++ with bindings available for many programming languages. It provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications. This book will help you become an expert of SFML by using all of its features to its full potential. It begins by going over some of the foundational code necessary in order to make our RPG project run. By the end of chapter 3, we will have successfully picked up and deployed a fast and efficient particle system that makes the game look much more ‘alive’. Throughout the next couple of chapters, you will be successfully editing the game maps with ease, all thanks to the custom tools we’re going to be building. From this point on, it’s all about making the game look good. After being introduced to the use of shaders and raw OpenGL, you will be guided through implementing dynamic scene lighting, the use of normal and specular maps, and dynamic soft shadows. However, no project is complete without being optimized first. The very last chapter will wrap up our project by making it lightning fast and efficient. Style and approach This book uses a step by step approach by breaking the problems down into smaller, much more manageable obstacles, and guiding the reader through them with verified, flexible, and autonomous solutions.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部