Chapter 3

Player Structure

A player can take just about any form—humans, aliens, animals, vehicles; designing a structure that can deal with all of them is a challenge in itself. The way that players store data, the data they need to store, the various types of movement codes and their control systems make for hundreds of different possible combinations. Dealing with a player structure in a modular way requires a little careful consideration not just for how to deal with all these different scenarios but also for how our components will need to communicate with each other and communicate with the rest of the game—for example, player objects often need to communicate with the game controller, the game controller often needs to communicate with ...

Get C# Game Programming Cookbook for Unity 3D now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.