Bug: libsdl not thread-safe

Do your actors really just go from A to B, then stop? Most real games
want to have some sort of decision making AI, even if it is simple.
The state machine approach will support this type of implementation.

One of two things. Either they go from A to B then stop, or they go
from A to B and then continue on to C. This is handled by a queue
of actions which is implemented elsewhere, but moving from B to C
is exactly the same as moving from A to B.>----- Original Message ----

From: Brian Barrett <brian.ripoff at gmail.com>
Subject: Re: [SDL] Bug: libsdl not thread-safe

Surely its dynamic? Where do the actions in that queue come from? It
is that logic which is often modelled as a state machine - the "AI"
part (assuming a bit of autonomy on the actors of course). There is
code which needs to make a decision about where to go next (and not
necessarily how to get there), this code might need to run frequently
to react to a changing environment.

A primitive first person shooter enemy - some kind of monster - might
start of in the hunting state, where it quickly moves from area to
area looking for targets. Once such a target is acquired, it might
change state to “combat”, where it attempts to kill its opponent. The
types of low level actions (such as move from A to B) that will be
undertaken are dictated by the overall “state” the monster is in.

If your requirements are simpler than that, then fair enough. Bob’s
example might have assumed a bit about the kind of actors that were
being modelled.On 4 February 2010 13:20, Mason Wheeler wrote:

One of two things. ?Either they go from A to B then stop, or they go
from A to B and then continue on to C. ?This is handled by a queue
of actions which is implemented elsewhere, but moving from B to C
is exactly the same as moving from A to B.