CS370 - SUNY Polytechnic, Spring 2018.
Porting the classic competitive robot game, ATRobots, to modern operating systems with a more advanced and evolved interface.
Follow these steps if you want to compile ATR2 from the source code yourself.
- Go to https://www.qt.io/download, and select "Go open source".
- Click "Accept" on the pop-up window.
- Make sure the correct operating system is detected and click "Download"
- Run the downloaded installer.
- Click "Next" on the initial welcome screen.
- Click "Skip" on the account Qt Account screen.
- Click "Next" again on the second welcome screen. The installer will retrieve meta information from Qt servers, this may take up to 10 minutes.
- Choose a directory for Qt to be installed to (you need approximately 5GB of free storage), and optionally check the "associate common file types with Qt Creator".
- Close the "Preview" section of components and expand the "Qt" section.
- At the time of writing, our ATR2 port uses and has been tested with Qt 5.10.1. Expand this section.
- Click next and wait for the components to download and install. This can take anywhere from 20 minutes to 1 hour.
To obtain the ATR2 source code, there are two main options:
-
Download a .zip of the master branch for a one-time download. OR:
-
Download a Git program and be able to pull commits as they are made and the program is changed.
At the top of this page, look for the "Clone or download" button and click "Download ZIP". Extract the .zip file to a folder.
GitHub Desktop provides an easy-to-use graphical interface for using git commands.
- Download GitHub Desktop and install it.
- Sign in to your GitHub account
- On the Welcome screen of GitHub Desktop, you'll see 3 columns. Click on the "Clone repository" button in the column on the right.
- Click the URL tab of the pop-up window and type
conorahern7/CS370-ATRobots
as the Repository URL. Choose a directory that you want the repo to be cloned to.
- Click Clone. All contents of this repository will be downloaded into the folder you selected.
-
Open the folder of the CS370-ATRobots repository.
-
Open the ATR2.pro file. It should open automatically in Qt Creator. If it does not, select Qt Creator as the program to open the file with.
-
Select "Configure project" in Qt Creator to configure the project for your system.
- In Qt Creator's menu bar, select the Build tab, and click Build Project "ATR2".
- Building will take up to one minute, depending on your system. Look for a solid green progress bar at the bottom right corner of the window. If you see this, the build has completed successfully.
- Now that the build has completed, the run-time options must be set. On the left side of Qt Creator, select the Projects tab.
- Enter robot file names and program parameters in the "Command line arguments" field.
- See Program arguments for more information on options for running ATR2.
- Robot files must be located in the Working Directory. Place the robot files (.AT2 or .ATL) in the default working directory created by Qt, or choose your own directory with the Working Directory field.
- Go to the Build menu, and click Run.
- If everything worked, you should see the ATR2 arena begin playing. Congratulations!
Enter a space-separated list of robots to compete in a game. Up to 32 robots may be specified. Following the robot names, options may be specified.
Running an ATR2 game with 3 CIRCLES.AT2 robots, 20 matches, 5000 cycles per match, showing scan arcs:
CIRCLES.AT2 CIRCLES.AT2 CIRCLES.AT2 -M20 -L5 -A
[x] denotes a required user-specified variable, {x} optional user-specified variable
Option | Name | Description |
---|---|---|
-D[x] |
Game delay | Changes the speed of the game. (0 - 100, default = 1) |
-T[x] |
Time slice | (default = 5) |
-L[x] |
Game limit | Maximum cycles matches are allowed to run before ending in a tie. x is multiplied by 1000, so a limit of 1 = 1000 cycles. (1 - 100, default = 100) |
-Q |
Quiet mode | Disables sound. (default = sound on) |
-M[x] |
Matches | Number of matches for the game. (1 - 100000, default = 1) |
-S |
Hide source | Disables printing robot source to console when compiling. (default = source shown) |
-G |
No graphics | Disables graphics, running matches at full speed and printing results in terminal. (default = graphics enabled) |
-R{x} |
Report | (default = disabled) |
-C |
Compile only | Do not run game, only test robot compilation. (default = false) |
-^ |
Hide notices | Hides program version and copyright info. (default = false) |
-A |
Scan arcs | Shows scan arcs when graphics are enabled. (default = false) |
-W |
Not Windoze | (default = disabled) |
-$ |
Debug info | Prints various debug info to console throughout program execution. |
-#[x] |
Max code | Sets max code length of robots. (1 - 1023, default = 1023) |
-!{x} |
Insane missiles | (default = disabled) |
-@ |
Old shields | (default = disabled) |
-E |
Log errors | Logs robot errors to file, file name = (ROBOTNAME).ERR (default = disabled) |
We've implemented some of our own custom options for debugging purposes only.
Option | Name | Description |
---|---|---|
-I{x} |
Instructions | Prints robot instructions as they try to execute. (x = robot to filter instructions from, default = all robots) |