Hi,

I'm trying to write a game using AppEngine. As a result, I need some
mechanism for running the game AI.

I've considered various architectures and the approach that seems the
most workable is to have, in the datastore, a priority queue of events
based on timestamp. I post events to the queue, and then process them in
order whenever it's necessary to update the state of the game world.
Most of this isn't hard.

The problem is that I can't find any way of achieving the 'in order'
part of the problem. It's vitally important that the event processing
happens serially, or else I'll end up processing events out of order,
with hilarious consequences --- I would like my unit to pick up cargo
*before* it departs the current location, thanks very much!

Normally I'd achieve this by having a single thread do all the AI
processing, so the AI becomes intrinsically serialised. Naturally, this
isn't possible in AppEngine. The only other approach I can think of is
to put some kind of big lock around the AI processing routine, to ensure
that only one thread at a time handles events; but AppEngine doesn't
have that kind of lock. Transactions aren't suitable because they're not
blocking.

This must be a situation people have encountered before --- any 
suggestions as to the best way to achieve this sort of thing?

-- 
David Given
[email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to