IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

CodeRally

A Java-based, real-time programming game based on the Eclipse platform.


Date Posted: May 2, 2003
Overview Requirements DownloadFAQsForum Reviews

1. What is the maximum speed of a car?
2. How many clock ticks are there in a match?
3. Does the oil that sometimes appears on the track affect the car`s movement?
4. How does the throttle setting affect the car's speed?
5. Why doesn't the public track work? I get only an empty window where I should select the opponents.
6. How much fuel does the car use when the throttle is negative?
7. What is the rate of fuel consumption?
8. Where can I find the source code for the sample cars?
9. What happens if two cars in protected mode run into each other? Do their speeds change?
10. How can I find the number of checkpoints or the current number of opponent cars on the track?
11. Are points awarded for hitting dead cars with a spare tire?
12. What is the rate of change of heading as a function of velocity and steering setting?
13. Can the CodeRally game be run outside Eclipse?


1. What is the maximum speed of a car?

There is no resticted maximum speed.
Back to top Back to top

2. How many clock ticks are there in a match?

There are 600 clock ticks in each match.
Back to top Back to top

3. Does the oil that sometimes appears on the track affect the car`s movement?

No.
Back to top Back to top

4. How does the throttle setting affect the car's speed?

The car's speed is increased by 5% of the throttle value for each clock tick.
Back to top Back to top

5. Why doesn't the public track work? I get only an empty window where I should select the opponents.

The public track will only work under the following conditions:
  • You are competing in a tournament.
  • Another player has successfully submitted their code.
  • You have successfully submitted your code.
Back to top Back to top

6. How much fuel does the car use when the throttle is negative?

The same fuel is required as the equivalent positive throttle value (that is, the absolute value of the throttle is used).
Back to top Back to top

7. What is the rate of fuel consumption?

Fuel usage is directly proportionate to the throttle setting. The formula is "fuel used per clock tick = throttle / 400". Changing the steering will not affect fuel consumption.
Back to top Back to top

8. Where can I find the source code for the sample cars?

Source code for the sample cars is not provided.
Back to top Back to top

9. What happens if two cars in protected mode run into each other? Do their speeds change?

Both cars will stop, but they will not transfer their momentum to each other. Neither car will lose fuel.
Back to top Back to top

10. How can I find the number of checkpoints or the current number of opponent cars on the track?

You can use getCheckpoints().length to find the number of checkpoints, and getOpponents().length will return the number of opponent cars.
Back to top Back to top

11. Are points awarded for hitting dead cars with a spare tire?

Cars are never "dead." You are still awarded points for hitting cars that are out of fuel.
Back to top Back to top

12. What is the rate of change of heading as a function of velocity and steering setting?

The formula is "change in heading per clock tick = steering * speed / 5". The getChangeInHeading() method returns this value.
Back to top Back to top

13. Can the CodeRally game be run outside Eclipse?

Yes; please see the instructions included in CodeRallyPkg.zip. for further information.
Back to top Back to top
Download now Download now

Related technologies

For platform(s):
Windows NT, Windows 95, Linux, Windows 2000, Windows 98, Java, MacOS, Win XP

For topics:
Eclipse, games, Java technology


Related resources

developerWorks Java zone

Java tutorials

Open source projects

JARS.com

IBM's CodeRally takes it to the streets

CodeRally programming contest results for UCSD

Press Articles

 

    About IBM Privacy Contact