Fork Me on GitHub

Scalatron

Learn Scala with a Programming Game

Download the game as a .zip file Download the source code as a .zip file

Scalatron is a free, open-source programming game in which bots, written in Scala, compete in a virtual arena for energy and survival. You can play by yourself against the computer or organize a tournament with friends. Scalatron may be the quickest and most entertaining way to become productive in Scala. - For updates, follow @scalatron on Twitter.

Scalatron IDE and Game

To Play The Game…

…install Scalatron and work through the step-by-step tutorial to create your first bot. No prior knowledge of Scala is required and you do not need to install anything else (not even Scala).

Get Started
Just download the game, unzip it and start the server. Want more detail? Read about getting started with Scalatron.
Read The Scala Tutorial
Scalatron comes with a step-by-step tutorial (also as pdf) that talks you through Scala and bot coding with increasingly sophisticated examples.
Explore The Rules Of The Game
In the game, bots compete for energy in a cell-based arena with edible and harmful plants and beasts. All is explained in the game rules (also as pdf).
Find Out How Scalatron Talks To Your Bot
Scalatron loads your bot as a plug-in. The protocol specification (also as pdf) explains exactly how the game interacts with your code.
Benchmark Your Bot & Compare Scores
You can use the Scalatron benchmark to rate your bot in isolation and compare it to the bots of others.
Share Your Bots
Post a gist with your code and tweet it, or visit the Scalatron user group to discuss strategies, post code or publish scores.

To Run A Tournament…

…get together with some friends, set up a server, attach a projector, order some pizza and start hacking! A Scalatron hack-a-thon may be the quickest and most entertaining way to get a group of programmers into Scala.

Get Organized
Invite some friends, set up a server and have fun. For the more meticulous, here are some check-lists, resources and tips for organizers.
Optimize Your Server
Want to run Scalatron with special settings? The server setup guide (also as pdf) tells you how.
Share Your Experiences
Visit the Scalatron user group to share your experiences with running tournaments, hack-a-thons or training workshops.
Create Your Own Game
As an experimental feature, Scalatron can now be used as a platform for your very own programming game. Read how it's done, then write your own game and let others play it!

To Make Scalatron Better…

…get the source code here on github, build it on your machine, add cool stuff or fix some bugs and contribute your improvements back to the community! Scalatron is a resource for all Scala enthusiasts and is in the public domain.

Build Scalatron On Your Computer
Download the source code from github, then check out the simple build instructions to compile it on your own machine.
Contribute Improvements
Fork Scalatron here on github and send pull requests. Bring your own ideas or check out the list of open issues, many with info on how to get started. Read about the architecture.
Use the APIs
Scalatron comes with a Scala API and a RESTful web API that lets you manage users, create versions, share code, build bots and track a tournament. Check out the API specification for details.
Contact The Maintainer
Before embarking on something major, you could contact the maintainer and ask for feedback or tips on where to get started.

…Anything Else?

Command-Line Interface
Scalatron comes with a basic command-line interface (CLI) that lets you manage users, upload code and build bots from the command line.
Community
Enthusiasts post useful tips or tricks for Scalatron elsewhere on the web, which we are happy to share with you. Have something to add? Let us know!
command line
links

 

License. Scalatron is licensed under the Creative Commons Attribution 3.0 Unported License. The documentation, tutorial and source code are intended as a community resource and you can basically use, copy and improve them however you want. Included works are subject to their respective licenses.