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

Events


So far, each of our agents run within their own virtual machine and communicating between them is not easy. To alleviate this, we can create a data structure called an event, which can be passed between agents or the sandbox itself.

Attributes

Creating an event is as simple as creating a table within Lua with a few restrictions. As events are serialized by the sandbox and passed to each virtual machine, only simple table attributes can be added to the event.

Each supported attribute is listed as follows:

Event attribute type

Description

boolean

A true or false Lua value

number

Any Lua number internally represented as a float value

object

A code object, the sandbox, sandbox object, or an agent

string

Any Lua string value

vector

Any vector created from Vector.new

Note

Events might not have nested tables within them; any unsupported attribute type will be discarded during the serialization. Currently, this is a limitation of event serialization of the C++ side of the...

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