Zero to racing in 60 seconds
So you've installed Code Rally - now what?
Once you have the Code Rally game installed it is really easy to start racing. The first thing you need to do is to start the Code Rally client. Once started you should see the below screen.
Close the welcome screen by clicking the "x" on the welcome tab. You should now see the below screen.
From this view you need to click on window>open perspective>other and choose the "code rally" option at the top of the list. This will open the Code Rally perspective shown below.
This is the basic Code Rally view - the large, empty area is where you will write your code. The section at the bottom ("my races") will show you all of the races you have run in the game and the left hand side will show a list of cars you have created and servers you are connected to. Before you can race you need to connect to a server - the easiest way to do this is to connect to the IBM Cloud Server. The IBM Cloud Server is a free to use global server where anyone can race where you will race people from around the world!
Connecting to the IBM Cloud Server
To connect to the cloud server click on the "Servers" tab on the left hand side - this will change what is in the left hand pane to look like the image below.
There should be 1 server listed - either "My Computer" or "IBM Cloud" - whatever it is called you need to right-click on it and click "edit" to open the below screen.
IBM Cloud information
You will need to enter the information so that the Host and Port are as above. You will also need to enter a username for yourself - this is visible to others and if you change it you will lose your race history. If the username you choose is already in use you will be told that it already exists - if you have not used this username before then you will need to choose a different username.
Once you have your username set you are ready to go - you need to create a car to enter in a race though!
Creating a basic car
If you want to know more details around creating a car and coding your first AI we have a blog
In the Code Rally client you need to change the left hand pane to the "vehicles" tab.
Now you need to click the green "+" to open the create car window.
You will need to give your car a name (don't start the name with a number and only stick to letters and numbers). Below are some car attribute boxes - put 1 in each of the enabled boxes (to find out what these boxes mean and how to use them properly see our
Your vehicle will now appear on the left hand side - right-click on the name and go enter race on...> your server name. You will now be asked to choose a track to race on - choose any track as well as the "vehicle type" - this is just what your vehicle looks like in the race. When you have chosen a track and vehicle type click on enter race.
Watching a replay of your race
In the bottom part of the UI you should now see an entry for the race you just entered - if someone else was about to enter a race on the same track you will join that race, otherwise a new race will be created. If you create a new race it will wait upto 30 seconds to see if anyone else wants to race against you. Your race will then start and will take approximately 10-30 seconds to complete. You cannot watch the race as it runs but as soon as the status for your race changes to "finished" you can double-left-click on the race in the table and a race replay window will open that should look similar to the screenshot below. (tip: if your race takes longer than 1 minute to change to "finished" click the sync button above the list - the sync button is the two yellow lines pointing in opposite directions).
From here you can click the blue play button at the bottom of the screen and the race will run - cars with names next to them are other players - if a car does not have a name next to it then it is a bot generated by the game for this race. Each race is 3 laps and has a maximum time of 5 minutes 30 seconds (if you have not finished by then you will be marked as "did not finish").
See where you stand
If you want to see how you are doing compared to other racers you can view the IBM
Now you have gone through the basics of connecting to the IBM Cloud Server and running a race you can go and create a more advanced AI or learn how to tweak the intermediate difficulty AIs - go r