Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering C++ Game Animation Programming
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering C++ Game Animation Programming

Mastering C++ Game Animation Programming

By : Michael Dunsky
close
close
Mastering C++ Game Animation Programming

Mastering C++ Game Animation Programming

By: Michael Dunsky

Overview of this book

With two decades of programming experience across multiple languages and platforms, expert game developer and console porting programmer Michael Dunsky guides you through the intricacies of character animation programming. This book tackles the common challenges developers face in creating sophisticated, efficient, and visually appealing character animations. You’ll learn how to leverage the Open Asset Import Library for easy 3D model loading and optimize your 3D engine by offloading computations from the CPU to the GPU. The book covers visual selection, extended camera handling, and separating your application into edit and simulation modes. You’ll also master configuration storage to progressively build your virtual world piece by piece. As you develop your engine-like application, you’ll implement collision detection, inverse kinematics, and expert techniques to bring your characters to life with realistic visuals and fluid movement. For more advanced animation and character behavior controls, you’ll design truly immersive and responsive NPCs, load real game maps, and use navigation algorithms, enabling the instances to roam freely in complex environments. By the end of this book, you’ll be skilled at designing interactive virtual worlds inhabited by lifelike NPCs that exhibit natural, context-aware behaviors.
Table of Contents (21 chapters)
close
close
Lock Free Chapter
1
Part 1: Populating the World with the Game Character Models
5
Part 2: Transforming the Model Viewer into an Animation Editor
9
Part 3: Tuning Character Animations
14
Part 4: Enhancing Your Virtual World
19
Other Books You May Enjoy
20
Index

Adding new states to the code

Our future game character should be able to perform typical actions for a character in a game: wait idle for player input, walk in all four main directions, run forward, plus a bunch of other actions. Depending on the available animations, we could add a state for jumping or rolling, punching, or waving.

For maximum flexibility, we will allow characters of all models to perform all the configured actions. Then we can use the UI to map an animation clip to each action we want to use for a specific model. Without a mapped animation clip, the requested action will be simply ignored.

Using bit fields and plain enums

We will add two different enum class definitions to the Enums.h file. The first enum called moveDirection is a bit field:

enum class moveDirection : uint8_t {
  none = 0x00,
  forward = 0x01,
  back = 0x02,
  right = 0x04,
  left = 0x08,
  any = 0xff
};

For every direction, a different bit can be set in a variable. A bit field...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering C++ Game Animation Programming
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon