|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[appleeaters]Java Animation 4u!
Hi guys,
I have created a Java program that animates the robots' movements. Now you can see exactly how your robot behaves. Text messages and before-and-after motionless images are just not enough to identify all those special cases. All that you have to do is modify your PHP script. I have provided a Java version of appleeater.php as an example. Here's a screenshot of the program: http://www.psynoc.za.net/robots/robots.png For more details, and to download the full source code and compiled class files, go to this webpage: http://www.psynoc.za.net/robots Cheers. |
|
#2
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
thx !
but why not realeasing a playable version ? I mean just 10 buttons for calling the move() method with the right argument, and an other button for letting the AI play one step. (I know it's not a great work compared to what you've already done ;) , and it could really be helpfull in developping our AIs) |
|
#3
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
Nice job with the Java thing. A couple bugs that I found though. I am working on my own variation of your java gui right now and will post it when its done. I have already fixed a few glitches, but there is one in particular that I am having a hard time tracking down.
|
|
#4
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
I have revamped your GUI and made several key changes.
First off, I fixed a couple bugs that you had, the biggest bein that you had the robots colliding with robots that havent moved yet. You must either move all robots at once, or only check against robots that have already moved. Another fundamental change that I made was that I updated your library so that it will use the randomly generated teleport coords as defined with Tylers generator/robotslib so that your robot will run the same every time. Next on the chopping block, I didnt like the idea of having to convert my php AI into java, so I wrote a bot that runs in your Java GUI that will load a file containing all the moves of your bot and mimic the php AI. In order for this to work, I made a small change to your robotslib (tyler) and made it create a file called robot.txt which contains each command, line by line, that your AI called. If someone wants to take more time and use a java system call and some fancy regexp to extract the moves from the results, then feel free, I am too lazy to do that. Another change that I have made to my version of robotslib (unrelated to the java stuff) is a modified draw_game_area() function (not sure who posted the origional??). This function will draw a nice colored html table, but because these tables are pretty big and makes it difficult to load on large maps, I made it so that it will only do a max of 50x50 centered around the player. Just plunk in $robots->draw_game_area(); before or after your move. Anywho, heres a link to the zip containing the updated stuff. http://www.stellarcore.com/phpcontest/java/java.zip |
|
#5
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
Is there any way to get random moves simulated?
|
|
#6
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
cypher, i've tried to compile ur code :
javac *.java java Game and it says Exception in thread "main" java.lang.NoSuchMethodError: main I'm a java n00b, what should i do ? |
|
#7
|
|||
|
|||
|
[appleeaters]RE: Java Animation 4u!
You need to run the driver class (the class with main() in it). It think it is 'fileRobot.class'.
So you'll type: java fileRobot |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [appleeaters]Java Animation 4u! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|