PacktLib: SFML Game Development

SFML Game Development

Credits

Foreword

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Making a Game Tick

Introducing SFML

A few notes on C++

Developing the first game

Game loops and frames

Displaying sprites on the screen

Summary

Keeping Track of Your Textures – Resource Management

Defining resources

Resources in SFML

A typical use case

An automated approach

Error handling

Generalizing the approach

Summary

Forge of the Gods – Shaping Our World

Entities

Rendering the scene

Updating the scene

The view

Landscape rendering

Composing our world

Integrating the Game class

Summary

Command and Control – Input Handling

Polling events

Getting the input state in real time

Playing nice with your application neighborhood

A command-based communication system

Customizing key bindings

Summary

Diverting the Game Flow – State Stack

Defining a state

The state stack

The state context

Integrating the stack in the Application class

Navigating between states

The loading screen – sample

Summary

Waiting and Maintenance Area – Menus

The GUI hierarchy, the Java way

Updating the menu

The promised key bindings

Summary

Warfare Unleashed – Implementing Gameplay

Equipping the entities

Creating enemies

Adding projectiles

Picking up some goodies

Collision detection and response

An interacting world

Victory and defeat

Summary

Every Pixel Counts – Adding Visual Effects

Defining texture atlases

Low-level rendering

Particle systems

Animated sprites

Post effects and shaders

Summary

Cranking Up the Bass – Music and Sound Effects

Music themes

Sound effects

Sounds in 3D space

Summary

Company Atop the Clouds – Co-op Multiplayer

Playing multiplayer games

Interacting with sockets

Data transport

Network architectures

Creating the structure for multiplayer

Working with the Server

Taking a peek in the other end – the client

Latency

Cheating prevention

Summary

Index