Loading...
 

PogamutUT2004


observed player: how to retrieve number of visible players

Hi, which is the best way to retrieve the number of visible players for an OBSERVED player? (http://pogamut.cuni.cz/pogamut_files/latest/doc/tutorials/ch11s03.html)


Any ideas?

Thanks!!
One way would be to store the agents in two maps of . One map containing all agents and the other all visible agents. When an agent becomes visible, you add it to the visible list, when it becomes invisible, you remove it. Have a look in the code for the Players module to see how it is done there.

But if you want to do it properly, you could have a look at the Players module and see if you can change it to work with UT2004Observed bots. It should not be too difficult, all components needed are there as far as I can see.
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.