======Pogamut 3 Pilsen Workshop 2015======
We welcome you our student/s :-) or anybody who has ventured up to this point while gathering info about the Pogamut 3 platform, welcome!
This page contains materials for the practice lessons of the Pogamut workshop performed at Pilsen ZČU university in 2015. The workshop are/were (mainly) backed up by Ondřej Rohlík and [[http://pogamut.cuni.cz/main/tiki-index.php?page=About+authors|Jakub Gemrot, Michal Bída, Martin Černý and Vojta Černý]].
======Contacts======
Ondřej Rohlík
Jakub Gemrot: [[mailto:jakub.gemrot@gmail.com|jakub.gemrot@gmail.com]]
Michal Bída: michal /tecka/ bida /zavinac/ gmail /tecka/ com
======Workshop History======
=====Workshop 1 (23.2.2015)=====
**Lesson 1.1 - Pogamut Gentle Introduction** [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L01-Lecture-Slides.pptx|(PPTX)]], [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L01-Lecture-Slides.pdf|(PDF)]] \\
* Pogamut gentle introduction
* Virtual worlds, virtual agents
* Basics of Pogamut - interface, API
* How to run your first bot
* Download [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pilsen2015-MyFirstEmptyBot-3.7.0.zip|EmptyBot example]].
* Want to know more? Or did you forget something from the lecture? Read [[http://pogamut.cuni.cz/pogamut_files/latest/doc/tutorials/00-EmptyBot.html|EmptyBot tutorial]] and [[http://pogamut.cuni.cz/pogamut_files/latest/doc/tutorials/01-ResponsiveBot.html|ResponsiveBot tutorial]]!
* **Assigment**
* Easy and fun! :-)
* Fool around with your first Pogamut bot
**Lesson 1.2 - Tag! bot** [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L01-Practice-Slides.pptx|(PPTX)]], [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L01-Practice-Slides.pdf|(PDF)]] \\
* Running around UT2004 environment
* Sensors - self, players
* Effectors - move, jump, dodge
* Tag! Game
* Tag! Tournament announcement
* Download [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pilsen2015-TagBot-3.7.0.zip|TagBot project template]] (67 MB - with bots and videos from 2013) or [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pilsen2015-TagBot-3.7.0-source-and-map.zip|TagBot project template light]] (170 KB - source code and Tag! map only).
* It contains specific DM-TagMap.ut2 file, put that into UT2004/Maps directory in order to be able to run it
* Then you have to alter UT2004/System/startGamebotsDMServer.bat to start DM-TagMap instead of DM-TrainingDay
* Note that the file also contains:
* Movies with bots from Tag! 2013, chance to learn a few tricks!
* Contains files to execute match with bots from Tag! 2013 to check how good your bot is!
* You will need to use [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2013-2014/GameBots2004-3.6.1-SNAPSHOT.zip|GameBots2004 v3.6.1-SNAPSHOT]] to run matches with bots from 2013, download the file and patch your UT2004 installation and if you do, do not forget to rewrite pom.xml of your bot to version 3.6.1-SNAPSHOT!
* **Assigment - Create TagBot**
* TagBot First real scenario that requires smart AI!
* Create the best TagBot, win the tournament and earn honor and glory!
* Don't forget that the TagBot should implement both roles 1) seeker as well as 2) runner
* GOOD LUCK!
=====Workshop 2 (2.3.2015)=====
**Lesson 2 - DeathMatch bot** [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L03-Pilsen-Navigation-Combat-CTF.pptx|(PPTX)]], [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/Pogamut_3-2015-L03-Pilsen-Navigation-Combat-CTF.pdf|(PDF)]] \\
* Running around UT2004 environment
* World abstraction
* Items, Weapons
* Basics of CTF
* Download [[http://diana.ms.mff.cuni.cz/pogamut_files/lectures/2015-pilsen/NavigationBot.zip|NavigationBot project template]]
=====Workshop 3 (23.3.2015)=====
**Lesson 3 - CTF bot** [[http://diana.ms.mff.cuni.cz/pogamut_files/pilsen/2015/Pogamut_3-2015-L03-Pilsen-Tricks-CTF-Tournament.pptx|(PPTX)]], [[http://diana.ms.mff.cuni.cz/pogamut_files/pilsen/2015/Pogamut_3-2015-L03-Pilsen-Tricks-CTF-Tournament.pdf|(PDF)]] \\
* [[http://diana.ms.mff.cuni.cz/pogamut_files/pilsen/2015/Pilsen-L03-Bots.zip
|Template bots]]
* Timing tricks (Cooldown, Heatup)
* Navigation stuck detectors
* Visibility + A*
* NavMesh, LevelGeometry, Raycasting
* Team Communication
* CTF
======Pogamut 3 platform installation======
**Installers:**
* Pogamut UT2004 3.7.0. Get them at [[http://pogamut.cuni.cz/main/tiki-index.php?page=Download|Pogamut download page]]
* Date: 22.2.2015
* For Pogamut UT2004 Installer you have to have UT2004 installed somewhere.
* Both installers will install: Maven 3.0.4, NetBeans plugins, Pogamut Example archetypes. Note that you need [[http://netbeans.org/downloads/7.4/index.html|NetBeans 7.4]], otherwise Pogamut archetypes won't be accessible from NetBeans context menu (New Project -> Maven -> Project From Archetype -> Local Archetypes Catalog).
* Before you launch the bot, you need to start Unreal server:
* For UT2004, go to directory Unreal Anthology/UT2004/System and there launch startGamebotsDMServer.bat. To observe the bot in the environment launch startUT2004low.bat from the same directory.
**Alternatively**
* If you have UT2004 installed, you can follow guidelines of tutorial Pogamut 3 quickstart tutorial found at [[http://pogamut.cuni.cz/main/tiki-index.php?page=Documentation|Pogamut Documentation page]]. However, we recommend to use installers above.
======FAQ======
**Q:** **Which version of Pogamut are we using?**\\
**A:** 3.7.0, always check your pom.xml after you download bot templates or materialize Maven archetypes
to check whether you're using correct version.
----
**Q:** **I am missing help on all methods, attributes and classes (Javadoc is not working). :-/**\\
**A:** In NetBeans open your project and right click the **Dependencies** folder, click **Download Javadoc**, NetBeans should now download Javadoc and the help should be working. If it is not, click also **Download Sources** and after it is done (watch lower right progress bar) restart NetBeans. Sometimes NetBeans refuse to show help - it can be usually resolved by trying to **Download Javadoc** several times.
----
**Q:** **How do I create PogamutUT2004 Bot project in NetNeans from archetype?** \\
**A:** Its easy. Simply click New Project, from categories choose Maven. From projects choose Maven project. Click on Next. Click on Add... button and the NetBeans will ask you about archetype details. That is :
* **Group Id:** cz.cuni.amis.pogamut.ut2004.examples
* **Artifact Id:** 00-empty-bot-archetype
* **Version:** 3.7.0
* **Repository:** http://diana.ms.mff.cuni.cz:8081/artifactory/repo
Full list of available archetypes can be found [[http://diana.ms.mff.cuni.cz:8081/artifactory/libs-snapshot-local/archetype-catalog.xml|here]]. (always use repository above)
Also be sure that NetBeans is using Maven 3.0.4! Obtain Maven from here: [[http://maven.apache.org|Maven 3.0.4]]. After unpacking, go to NetBeans->Tools->Options->Miscellaneous->sheet Maven->set Maven home directory.
----
**Q:** **I have a problem with imports - the NetBeans help doesn't work. :-/**\\
**A:** Two solutions, either add PogamutUT2004.jar and PogamutCore.jar to libraries to
your project (the help should be working), or add imports to your class manually.
Some useful imports:
import cz.cuni.amis.pogamut.base3d.worldview.object.*; //for Location, Velocity..
import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.*; //GB commands
import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.*; //GB messages
----
**Q:** **I am a student and want to use Pogamut, but I don't have UT2004.** \\
**A:** Unfortunately school cannot provide you with UT2004 - however you are free to use Pogamut in SW1 laboratory (when it is free) and there is one Pogamut computer in MS lab (far end against the entrance) where we can create an account for you. Second solution is to use UnrealEngine2RuntimeDemo exclusively, which is free for educational purposes and which is installed with Pogamut Emohawk installer.
----
**Q:** **How to disable master server authentication in UT2004?**\\
**A:** In UT2004/System/UT2004.ini find **[IpDrv.MasterServerUplink]** and set the following:
[IpDrv.MasterServerUplink]
DoUplink=False
UplinkToGamespy=False
SendStats=False
----
**Q:** **I'm trying to setup @EventListener or @ObjectClassEventListener in POSH actions (or senses) and they are not working, why?** \\
**A:** These listeners works only in XxxContext classes. You have to declare them there and then access them from actions or senses.
----
**Q:** **How can I tell what version of Unreal Tournament 2004 I am running (v. 3369 required)?** \\
**A:** Just start Unreal Tournament 2004 GUI, open the Join Game tab and the news page will have the number in the upper right corner.