Loading...
 

PogamutUT2004


Accessing Simulation Time and HUD Control

Hello Everyone,

I would like to ask you if it is possible to get the simulation time within the bot code? Namely, whenever we get an event we get its simulation time by event.getSimTime(), is there a way to get this time value from the bot code( e.g. in logic( ) )?

Furthermore, how can we use the HUD for continuous tracking of values some parameters in the game (as done with "My locations")? Are there any examples around?

Thanks.

Hman
> I would like to ask you if it is possible to get the simulation time within the bot code? Namely, whenever we get an event we get its simulation time by event.getSimTime(), is there a way to get this time value from the bot code( e.g. in logic( ) )?

Module info, method getTime() or something like that. in logic type something like
this.info.getTime();

Time might be in seconds, so just convert it to ms when comparing it to sim time. Moreover if you type this. the auto completion code of NetBeans or Eclipse should give you help of all available modules, if JavaDoc is not working for you follow tutorial here.

> Furthermore, how can we use the HUD for continuous tracking of values some parameters in the game (as done with "My locations")? Are there any examples around?

Don't understand the question. If you want to track location of your bot, just use info.getLocation() and store the values to some file. The HUD in game has nothing to do with it.

Best,
Michal

> Thanks.
>
> Hman
Hello Michal,

Thanks for your answer, I succeeded in getting the time.

In fact I coundn't get to download the javadoc for the pogamut library, so I always check the website. is there a compressed version of the javadoc, or a method works preferably for eclipse?

Coming back to my question about the HUD, I would like to display some game & user related data like the simulation time :-) (for debugging) to the screen as it is done for the My location, My Rotation etc.

Thanks a lot.

Hman
>
I'm pretty sure all of the stuff you see in the HUD is a result of the GameBots mod that comes with Pogamut. If you want to change what is displayed on the HUD, you will have to edit the UnrealScript for GameBots ... as far as I know, it can't be done through Java on the Pogamut side.
> I'm pretty sure all of the stuff you see in the HUD is a result of the GameBots mod that comes with Pogamut. If you want to change what is displayed on the HUD, you will have to edit the UnrealScript for GameBots ... as far as I know, it can't be done through Java on the Pogamut side.

Yes, Jacob is completely right, you would need to dig in UnrealScript GameBots code.

m
Once upon a time, there was a lovely project that created "swing-like" UI classes in Java that could have been visualized inside UT2004 HUD. I meas, you could have create your UI on Java side
and then communicate it to UT2004 to show it up.

Unfotunately, this project was not picked up since then.

May be we should refactor its code Michal into GameBots2004?

Such project could then be used to create RPG games for instance :-)

Best,
Jakub
 

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.