Space Battle Arena

A Programming Game in Java for AP CS Students.

Download Client Jar Java Docs Download Server (Windows) View on GitHub

Client Setup

Any Java IDE should be able to be used for Space Battle Arena.

We typically use jGRASP or Eclipse. Look to the right for some walk-throughs on setting up Space Battle using different IDEs.

The general process involves:

  1. Adding both the Gson and SpaceBattle .jar files to your classpath.

  2. Creating a Ship class which either extends the BasicSpaceship abstract class OR
    implements the Spaceship<?> interface.

  3. Execute the TextClient's run method with the following arguments:

    1. IP address of the server
    2. An instance of your Java Ship class
    public static void main(String[] args)
    {
        TextClient.run("127.0.0.1", new ExampleShip());
    }
    

Alternatively, to the third step above, execute the TextClient's main method from within SpaceBattle.jar passing the IP Address and a string with the name of your Ship class.

If you need to run ships via the Command Line see these instructions.

We also have a complete set of Java Docs available.