Scripting Game Mechanics

In the last chapter, we focused on moving our player and camera in code, with another trip into Unity physics on the side. However, controlling a playable character isn't enough to make a compelling game; in fact, it's probably the one area that remains constant across different titles.

A game's unique spark comes from its core mechanics and the feeling of power and agency those mechanics give to players. Without fun and engrossing ways to affect the virtual environment you've created, your game doesn't stand a chance of repeat play, to say nothing of fun. As we venture into implementing the game's mechanics, we'll also be upgrading our knowledge of C# and its intermediate-level features.

This chapter will round out ...

Get Learning C# by Developing Games with Unity 2019 - Fourth Edition 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.