Code Rally is a racing game that we’ve built on top of Liberty profile. You play the game by writing an AI (Artificial Intelligence) for your vehicle. You then enter it into a race simulation and it follows the behaviour you programmed. The game is fully multiplayer-enabled so several players can program cars to run in the same race simulation. The server you run races on is a Liberty profile web application with an Eclipse plugin acting as your client-side UI.

The new WebSocket functionality in the Liberty profile Beta has enabled us to do something with Code Rally that I’ve been looking forward to for a long time. With WebSockets, you can now write your AI as part of a web application running on a local Liberty server and then connect to a remote Liberty server to run the race simulation with dynamically compiled code. Previously, you had to write your AI and then upload the AI file to the race simulation server, which would compile the code as part of the executable that simulates the race.

The new approach gives us a lot of advantages, including giving you the option of changing your AI code on the fly while a race is running and having those changes immediately take effect in the race.

For more information on Code Rally and to download the game, visit the dedicated community page.

Join The Discussion

Your email address will not be published. Required fields are marked *