Hi Jeffrey,
I have a lot of thoughts around making Robocode available on Android - actually more devices including iPhone and iPad. I think it is a great idea to have Robocode on Android phone and tablets and well - perhaps also Raspberry PI devices. :-)
But I haven't found a good way to do this with the existing code base.
As you know, Robocode currently runs on desktop computers, and is written in Java SE and a .NET plugin is available for .NET developers.
Most existing Robocode developers might prefer developing on a desktop PC, but that should of course not stop us from making Robocode available on e.g. tables.
However, the biggest challenge I see with creating an Android version is that this will or might require two code bases to be maintained if Robocode for Android should follow the mainstream version for the desktop?
If Java is not used, all existing code should be translated into another language and/or platform, and the GUI and stuff must be moved to other frameworks. This is extremely challenging and requires huge amounts of time.
Another challenge would be to let robots run in separate threads sharing resources, and behave the same way as usual, and existing robots written in Java would not be able to run on a new version written in another language or for another platform. So this is not easy.
A third challenge would be how to write robots on a tablet? Should there be a built-in source code editor. What about the compiler etc.? This might be possible to handle though. :-)
I think the best way to make the existing version available for Android devices would be to use the existing code base as inspiration and write a new one from scratch for made specifically for Android.
The API should be similar except for deprecated methods. The GUI needs to be written from scratch anyways for tablet and would need to support touch screens and a more modern way of doing things.
I should like you to describe how you think this could be done. I think that a Android version would not necessarily have to follow the mainstream desktop version, but could have its own life.
I you want to get started on this, I welcome it. :-)
My current plans for Robocode is to finally get started with Robocode 2. I have already done lots of research for it and made small prototypes for minor parts of it like e.g. a new communication protocol (IPC).
I want to make use STDIN and STDOUT for sending commands from robots to the game (when running Robocode on the same machine/device), and the game will send game status and events to each robot.
Each robot will run in its own process, and could be written in any language. However, it will be up to the end-user to decide if a "native" C/C++, Python or robot written in any other language is allowed to run on his/her system.
Robots written in sand-boxed languages e.g. for the JVM and .NET would of course be allowed per default, but only if they don't contain dangerous code? They must follow some security restrictions of course.
The game could be written in any language, the same way as the robots. So the crucial part for Robocode 2 would be the new protocol for the communication using STDIN and STDOUT.
Robocode written for desktop PC's could be written in Java SE like the original Robocode in order to support as many platforms as possible, and could be written in Objective C for iOS, and Java using the Android SDK for Android.
In the next week (from Tuesday to Saturday) I will be on a trip to Ireland for the GamesPro including Robocode Ireland 2013 (
http://www.gamesfleadh.ie/compete/robocode/) together with Mathew Nelson, the original author of Robocode.
Here I will discuss the ideas for a new version of Robocode 2 written from scratch. I expect to get started on this from April. I certainly don't expect Robocode 2 to by written finished within a couple of weeks or months. It will require much more time to do.
But I expect it to be fun while doing it too.
Perhaps we could cooperate, so that you could focus on Robocode (2) for Android, and I could focus on the desktop version. That is, developing these in the same time? This would require that the design and rules are settled first as first priority for the core game.
Next the core (serving the game) must be made to handle the game and communication to and from robots using the new communication protocol. Then a basic GUI (view) could be provided for viewing and controlling the game. Sounds easy? It is not. ;-)
I expect lots of prototypes and adjustments made to the game while it is being developed to balance weapon powers, behaviors etc.
Perhaps it is easier to finish a simple prototype for desktop PC's first written in Java, adjust it, and then port this to Android and continue improving both version?
Just my thought, which you asked for. ;-)