Network Bot Wars

NetBotWars is a robot simulation that allows for robot, aka programs, to be controled over the intenet. At the moment there is no GUI or any form of graphics so any help in that area will be helpful.

The network system is really simple to understand as it consists of only a few commands. Most commands are in lowercase except a few but they all end in a new line. The main commands are Hello, Start, Go, ret, in, out, err. A more detailed listing will be below.

The Arena of this game is 1000 ru by 1000 ru, ru stands for robot unit. Each robot is one ru.

Headings start at zero and continue clockwise in a circle, ending at 360. There are no radians, or any other type of measurment. Only degrees. There is a turning speed, so you just can't turn in one cycle.

Speed is measued in ru / cycle. You can move upto 100 ru/c in both directions. There is acceleration but you can look in the code for that :)

Location is measured in X, Y but the robots can't see that. You start at a random location and heading in the arena (hopefully).

Commands

Hello - This is the server telling the robot to send its name and author in the format of Name\nAuthor (\n being newline)

Start - This is the server telling the robot that the game has begun. No action required

End - The game is over. Some time soon it will return the victor.

Go - This is the server telling the robot that it is its turn. This is where you command the robot.

ret (#)- This marks the end of your turn and if you called an in command, it returns the value.

err # #- This informs the robot of an error in the last command. If that was an out command it returns the arguments

in #- This is the robot asking for information from a port.

out # #- This is the robot sending information to a port in the format of out Port Data.

(#) - Optional Number
# - Required Number

IO Ports

0 Input Returns the robots health.
1 I/O Set the Desired Throttle or get the real Throttle
2 I/O Set the Desired Heading or get the real Heading
3 Output Fire (for now) with the value being the offset from -4 to +4 degrees

 

Help Me!

I need some help coding graphics and mabye equipment. Also collision detection and damage based on speed needs work.

My ideas to make a GUI would be another port on the server that writes the heading, X, Y and name of each robot and bullet to a listening GUI program. This could be useful to watch tournements or for raw debugging of a robot. The one downfall is that a robot could connect to this port and use it to get information.

Right now I don't even have the equipment started but we could say reserve in/out ports 10+ and use them to handle modular classes for each scanner, turret or anything else.

 

About Me

Hello, I am a high school student at Elliot Lake Secondary School and I am working on this as a project for fun. I am not too experianced with programming and this is my first public release of anything. If you like this post in the forums and if you have any sugestions, please sugest!

SourceForge.net Logo