Difference between revisions of "Module"

From Robowiki
Jump to navigation Jump to search
m (Tutorials category)
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
; <nowiki>Parts Repository:</nowiki>
 
; <nowiki>Parts Repository:</nowiki>
: '''[[/Movement]] - [[/Targeting]] - [[/Radar]] - [[/Gun]] - [[/SelectEnemy]]'''
+
: '''[[/Movement]] - [[/Targeting]] - [[/Radar]] - [[/Gun]] - [[/SelectEnemy]] - [[/Special]]'''
  
 
{{Infobox Robot
 
{{Infobox Robot
 
| bgcolour        = #CCCCFF
 
| bgcolour        = #CCCCFF
| current_version = 0.1
+
| current_version = 0.2
| download_link  = http://robocoderepository.com/BotDetail.jsp?id=3634
+
| download_link  = http://robocoderepository.com/BotDetail.jsp?id=3378
 
}}
 
}}
  
Line 20: Line 20:
 
== Get started ==
 
== Get started ==
  
[http://www.ibm.com/developerworks/java/library/j-tipreuse.html Download Module] and take a look at the class ExampleBot that extends Module to see how it works. Then look at the packages movement, targeting etc. to see the implementation that comes with the example.
+
[http://robocoderepository.com/BotDetail.jsp?id=3378 Download Module] and take a look at the class ExampleBot that extends Module to see how it works. Then look at the packages movement, targeting etc. to see the implementation that comes with the example.
 
Now you can build your own independent reusable parts for your bots using the Module structure, or check the parts repository to learn new techniques.
 
Now you can build your own independent reusable parts for your bots using the Module structure, or check the parts repository to learn new techniques.
  
Line 33: Line 33:
 
   
 
   
 
*Movement: Move and turn the bot
 
*Movement: Move and turn the bot
*Gun: Choose the power of the bullet power and fires
+
*Gun: Choose the power of the bullet and fires
 
*Targeting: Turn the gun to aim the enemies
 
*Targeting: Turn the gun to aim the enemies
 
*Radar: Turn the radar to scan the enemies
 
*Radar: Turn the radar to scan the enemies
*SelectEnemy: Select the current enemy from list of enemies in the battlefield
+
*SelectEnemy: Select the current enemy from the list of enemies in the battlefield
 +
*Special: Do whatever you want in that parts
  
[[Image:moduleBotPartsClasses.png|Movement, Gun, Targeting, Radar and SelectEnemy extends Part]]
 
  
  
Line 47: Line 47:
  
 
*Graphical debug of the parts
 
*Graphical debug of the parts
 +
 +
 +
==== License ====
 +
*Module is released with the license [[RWLPCL]]
 +
*Each part of the Parts Repository can have its own license
 +
 +
 +
==== Version History ====
 +
*V0.2 Now special parts can be activated/deactivated
 +
*V0.1 Initial version
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Latest revision as of 20:04, 8 May 2008

Parts Repository:
/Movement - /Targeting - /Radar - /Gun - /SelectEnemy - /Special
Module
Current Version 0.2
Download

Introduction

Module is a simple bot structure that can be extended to create your own bots. There are many other approaches (AbstractBot, PluggableRobot...) and most of the mega Bots use some kind of modular architecture.

Main advantages:

  • Ease of maintenance
  • Reusability capacity

Module is also intended to be the reference for the beginners to see the different techniques through a reusable parts repository.

Get started

Download Module and take a look at the class ExampleBot that extends Module to see how it works. Then look at the packages movement, targeting etc. to see the implementation that comes with the example. Now you can build your own independent reusable parts for your bots using the Module structure, or check the parts repository to learn new techniques.


Details

Bot parts

The following parts define the bot behavior in Module.

Movement, Gun, Targeting, Radar and SelectEnemy

  • Movement: Move and turn the bot
  • Gun: Choose the power of the bullet and fires
  • Targeting: Turn the gun to aim the enemies
  • Radar: Turn the radar to scan the enemies
  • SelectEnemy: Select the current enemy from the list of enemies in the battlefield
  • Special: Do whatever you want in that parts


Module manages

  • Information about the enemies
  • Information about my own bullets
  • Information about enemy bullets
  • Graphical debug of the parts


License

  • Module is released with the license RWLPCL
  • Each part of the Parts Repository can have its own license


Version History

  • V0.2 Now special parts can be activated/deactivated
  • V0.1 Initial version