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 JMonkeyEngine 3.0 Cookbook
  • Table Of Contents Toc
JMonkeyEngine 3.0 Cookbook

JMonkeyEngine 3.0 Cookbook

By : Rickard Eden
4 (7)
close
close
JMonkeyEngine 3.0 Cookbook

JMonkeyEngine 3.0 Cookbook

4 (7)
By: Rickard Eden

Overview of this book

If you are a jMonkey developer or a Java developer who is interested to delve further into the game making process to expand your skillset and create more technical games, then this book is perfect for you.
Table of Contents (12 chapters)
close
close
11
Index

Controlling AI with triggers


Chapter 5, Artificial Intelligence, deals with several methods to control AI in games. As we learned in that chapter, control and predictability are very important. Even if we have the smartest AI in the world, as programmers, we want to be able to know that the AI will perform a certain action at a certain time. This is where triggers can be extremely useful. In fact, with a good trigger system there might not be need for much AI at all.

One example of trigger usage might be a warehouse where guards are in a patrolling state. Once the player reaches a certain area (maybe where they should not go), an alarm is triggered. At this point, we also want the guards to switch to a more aggressive state.

Getting ready

This recipe will link the trigger system we created previously in the chapter with the StateMachine-based AIControl class from the Decision making – Finite State Machine recipe in Chapter 5, Artificial Intelligence. Even if you haven't followed the recipes...

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.
JMonkeyEngine 3.0 Cookbook
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