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 Learning game AI programming with Lua
  • Table Of Contents Toc
Learning game AI programming with Lua

Learning game AI programming with Lua

By : David Young
4.3 (3)
close
close
Learning game AI programming with Lua

Learning game AI programming with Lua

4.3 (3)
By: David Young

Overview of this book

If you are a game developer or a general programmer who wishes to focus on programming systems and techniques to build your game AI without creating low-level interfaces in a game engine, then this book is for you. Knowledge of C++ will come in handy to debug the entirety of the AI sandbox and expand on the features present within the book, but it is not required.
Table of Contents (11 chapters)
close
close
Lock Free Chapter
1
1. Getting Started with AI Sandbox
10
Index

Building a weapon animation state machine


Now that we've built an entire animation state machine system, it's time to build the ASMs our soldier will use. As the soldier's weapon is the simplest ASM, we'll start there first. With only five different animations, this is a relatively easy ASM to build.

First, we add each of the states with their corresponding animations and specify whether the animation is looping or non-looping. Next, we connect each state via transitions. Lastly, we request a state within the ASM to start playing a looping animation; in this case, this is the sniper_idle state.

The sniper/submachine gun animation state machine

Note

The reload animation for the weapon only works when the weapon is in its sniper pose. The ASM must reflect this; otherwise, you will see a noticeable pop on the sniper pose before the reload animation plays.

Creating the weapon ASM primarily consists of adding each state, the states corresponding to the animation to play, and creating transitions between...

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.
Learning game AI programming with Lua
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist 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