Sun
SDK: 1.44


Today in Galaxy
Participants total: 1018
Spacecrafts created: 20
Top Rated: dabino
Today's leader: dabino

 Game rules

Getting Started

  1. Preview the Galaxy FX game on the Internet. Try the Manual mode.
  2. Install the latest version of JDK.
  3. Install NetBeans 6.5.1 with JavaFX 1.2.
  4. Download the GalaxyFX project, open it, then run it.
  5. Look at "My first spacecraft" sample and try it out.
  6. Leverage all the capabilities of the API to drive the spacecraft and to create the best algorithm of the game.
  7. 1.Upload your algorithm to the game server to start participating in the contest.

 What is what

Resources

Resources are the primary game objects. They are displayed on the screen and on the radar. Use the following attributes to operate the resources:

  • x - the x coordinate of the resource
  • y - the y coordinate of the resource
  • value - the resource cost
  • timestamp - the moment, when the resource has been detected on the radar or on the scanned map

Map

The map shows static allocation of resources and competitor spacecrafts. The map can be updated, however, the spacecraft cannot move while the map is being updated (otherwise, the update will not happen). Use the following attributes and functions to operate the map:

  • map.resources - resources on the map
  • map.timestamp - the moment of the last map update
  • map.gameTime - the overall duration of the contest on this map
  • map.skip_time - the time spent on updating the map while scanning
  • SpaceScanAction{} - the action used to update the map

Radar

The radar functions continuously providing new information about resources and competitor spacecrafts nearby your spacecraft. The radar has the following attributes:

  • radar.resources - resources detected by the radar
  • radar.range - the radar range, its range is constant and its value cannot be changed

Actions

You drive your ship by giving orders. An order is a specific Action returned by the nextStep() function. Each order is described by the execution time, which is available before the contest. You can check the status of the currently being executed order by using the action attribute. If this attribute is mull, the execution of the order is completed.

A captain can give a new order once per 20ms (if you'd like to keep the current order executing, the nextStep() function should be null). If the execution of an order took more time than expected, the execution will continue; however, the execution of the next step will be postponed. Note that accepting a new order takes some time as well, so it is more advantageous to give orders for a long period of time.

  • position - the current coordinates of the spacecraft
  • MoveAction{} - the order to move along the specified path

    Examples:

    MoveAction{ resources: radar.resources }; 
    MoveAction{ path: map.resources[0] }; 
  • SpaceScanAction{} - the order to scan space and to update the map. This action requires stopping the spacecraft and keeping it motionless during the scanning period (SpaceMap.skip_time). If the spacecraft starts moving before the scanning is completed, the updated is terminated.

    Examples:

    SpaceScanAction{}; 
About Sun  |  Trademarks  |  Copyright 2009 Sun Microsystems Inc.