[Pogamut-list] Am I dead?

jakub.gemrot pogamut-forum at artemis.ms.mff.cuni.cz
Tue Oct 14 17:46:26 CEST 2008


Re: Am I dead?
Yes - that's a glitch of the Pogamut unfortunately.

Here is some info:
1) Every agent has two threads - one is communication thread that is reading and parsing messages from GameBots propagating them to the Agent's internals (AgentBody, AgentMemory, GameMap, etc...) second thread is logic thread - that is a thread where your "doLogic" is run. 

2) all messages from GameBots are written to the history in batches ... whenever END_MESSAGE come - new batch is created (and only synchronous messages are propagated into them).

Here is a scenerio:
You're doing your work in doLogic() (after BOT_KILLED check) ... you end ... BOT_KILLED came ... END_MESSAGE came (BOT_KILLED is not present in current HisoryBatch) ... next iteration of your logic occures - you missed the message.

Solution:
Create a listener for the BOT_KILLED message ... body.addTypedMsgRcvListener() (or something like this).

Cheers, Jakub

----

Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=5&comments_reply_threadId=289&comments_parentId=287&post_reply=1#form>





More information about the Pogamut-list mailing list