Remember that bot tournament thing?

Miscellaneous Forums/General Discussion/Remember that bot tournament thing?

I was searching through the various games that I could download through Synaptic, and came across a few bot programming games. One of them was using Assembler and seemed like a complete horror to figure out (more of a simulator than a game -- I hope! Probably puts a smile on one's face when they get their first bot done with it though, so I kept it installed. It's called DroidBattles.)

Another one that I discovered now that my curiousity had been awakened is Robot Battle:
http://www.robotbattle.com
Does the proprietary language thing, and a bit odd looking, but it has a pleasant interface.
(Though I have to say, having played the Mindrover demo ages back, it's difficult to impress me with these!)


The one that really caught my eye, though, was this one:
http://realtimebattle.sourceforge.net/
Seems to be a pretty popular project... Acts as a server to exchange messages with other programs, meaning some excellent compatibility. Needs Linux/Unix or Windows with Cygwin. Potential for an epic and decisive battle between B3d and DB.
I'm playing with it now... haven't yet attempted to write anything for it, but I'm expecting that Max can work with it. If it can't, it's a travesty. (Hopefully B3d, too, after a quick DLL)
...Hopefully, we can eventually find a slightly more productive way to use this section of the forum by staging some very exciting robot battles using practically any language we want! :P

Here is the appropriate page of docs to figure out how programs work:
http://realtimebattle.sourceforge.net/Documentation/RealTimeBattle-4.html
How exactly to compile bots for it seems a bit more difficult to find, but I'm assuming that we just rename the executable to have a .robot extension.
There's a bit of variety in how these work, though; the jBot example is just pointing the program to Java code, which is presumably compiled at runtime, while the xt-bot-a.robot example looks like a compiled program.

Let's see who can get something running first!
I haven't done anything with stdin and stdout in Max (or, for that matter... anywhere), and they appear to not exist there in an easily found way, so I currently am blank.

...Which is why I'm going to go to sleep and wait for someone else to solve my problems!
Goodnight!

Edit:
Note that examples have to be recompiled to run in Cygwin, so use Linux :P
If I manage to get any of the examples compiled for Windows (or, better, my own robot), I will upload them.

Okay, thanks to BlitzWiki having a search option (as opposed to MaxIDE) I quickly found the two functions I think I'll be needing:

ReadStdin
WriteStdout

Only noteable difference being that, for some reason, they begin with read and write which seems a bit illogical to do for such functions as the name already implies Standard Output and Standard Input, which should be enough, but I guess it's allowed. (It is Blitz, after all).
I'll see about porting MessageTypes.h into a module or some such and hope that it actually works!

A quick test running the bots through a terminal tells me that the .robot files are renamed binaries, except in some weird circumstances which are completely unnecessary and we need not think about.
I imagine nobody minded doing that originally because it's built for Unix/Linux. (Only those weird Windows people use filenames to determine file types; everyone else uses MIME types like they're supposed to).

This would be so fun to make :D

Too bad I lack the knowledge to understand half the stuff they say, so I would love it if someone could make a simple (module?) example for this.

Hehe, this reminds me of a similar programmer's game called PCRobots I used to write bots for back in the DOS era. Instead of communicating via stdin/stdout, your bots communicated via a software interrupt. I gave up in disgust when some of my (less scrupulous) gaming buddies figured out how to cheat by directly accessing memory areas containing critical data structures - which of course a real-mode DOS program can't prevent.

PCRobots was a lot of fun and so I think I'll definitely have a go at RTB as well. I haven't been able to compile it on my Mac (OS X) yet, because it seems I need to download Fink, GTK, GDK, pkg_config and a few other bits and pieces first.

Actually, one idea I had been considering for a project was a 3D tank game version which you can enter and roam about as a neutral observer to watch the bots do battle (or just observe from the point of view of one of the combatants).

They are working on pulling the GUI out from the core program, and there has already been one full GUI modification, so you may be able to build that on top of this if you want :)

I'm going to work on a quick tutorialish thing for Max (I am reluctant to say tutorial because I'm bad at tutorials) as I figure this out today.

Mr PussyCat,

Probably your worklogs would be good enough. (As you are figuring it out, the notes you make when figuring it out will aid us in figureing it out)