[Home]Robocode2/Additions

Robo Home | Robocode2 | Changes | Preferences | AllPages

What should Robocode2 add that isnt in RC1?


Some comments on accurate physics

I was scratching my head thinking about how to simulate elastic collisions, when I realised that there are a lot of resources out there that deal with this sort of thing. For example, if you like a bit of bedtime reading then there's a book called Physics for Game Developers. Also, searching on Google for phrases such as "collision detection physics" turns up all sorts of things.

Here's a link to a site which has [4 physics articles] and some sample applications. The articles were originally published as articles in Game Developer magazine a few years ago. It's definitely worth reading the first three of them.

I've already started porting his C++ physics code to Java... :-) --David Alves

That's good. I look forward to seeing it. --Rod Hyde

After some more exploring, I found the [Fast Car] page. This is a commercial C++ library (2.5D not 2D - also free for evaluation) but it also contains freeware in the form of full source code for rigid body dynamics. I think it is worth taking a look at the code and the documentation as it is more complete than Chris Hecker's code. There are a few downloadable demos (Windows/OpenGL?): watching the collisions in the one with the cars and the blocks is very interesting as it gives a flavour of what RC2 could look like if extended to 2.5D. However, I am inclined to suggest that we should keep the physics in 2D as I'm not sure if I'm prepared to write code to handle the case of my robot being toppled over completely :-) --Rod Hyde

What exactly does "Each point could correspond to ....8% damage" mean, anyways? --Insectoid

I created a page at which eneryone can spread their toughts, knowledge and URL's about more accurate physics: /Accurate Physics. --DaniŽl Pelsmaeker

I think RoboCode2 robots should be able to be controlled through socket communication, that way, you could code the robots in virtually ANY other programming language besides Java. --Acid06

I belive you can do that with RoboCode1?, there a bot, HCBot i think, that has a separate program that takes human input and uses that the control the robot. I see no reason why that program couldn't be written in any language you like, and control the bot automatically. -- Tango

I think that bot depended on File I/O, so it would be a challenge to make a bot that measures up to normal performance in another language. -- Kawigi

It was files, rather than sockets, was it? OK. How about DeathMatch? That uses sockets to communicate with the server, is it possible for the server to control the robot? -- Tango

Could be done by adding a new robot class into the robocode package. -- Kawigi

Comment about Oriented bounding box

I wrote a class for oriented bounding box in another project, it make collision and all calculation quite hard and so I don't thing it's a good thing (like you can hit something by rotating). I mean Robocode is cool because of it's simplicity. --Synnalagma

A circle might be a good substitute. Checking for collisions would be pretty straightforward too:

 if(xDistance * xDistance + yDistance * yDistance) < 4 * robotRadius * robotRadius){ ...
Using a circle would guarantee that SittingDuck is equally easy to hit from every angle, which is not the case right now. It would also be simple to program and run almost as fast as the current system. --David Alves

Would it still be worthwhile to check a line's intersection with a circle rather than a point's lying within the circle? (especially for fast-moving bullets?) -- Kawigi


Robo Home | Robocode2 | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited May 7, 2006 4:53 EST by Voidious (diff)
Search: