Difference between revisions of "Module"

From Robowiki
Jump to navigation Jump to search
m (tutorials category)
m
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=3634 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

Revision as of 01:48, 24 March 2008

Parts Repository:
/Movement - /Targeting - /Radar - /Gun - /SelectEnemy
Module
Current Version 0.1
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

Movement, Gun, Targeting, Radar and SelectEnemy extends Part


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