Clone of the classic Asteroids game.
- What's happening?
- How to play
- Running Meteoroids (easy)
- Running Meteoroids (advanced)
- Importing project to Eclipse, Netbeans, etc. (IDE)
- Troubleshooting
- Known issues
You must protect Earth from flying meteoroids! Destroy all the meteoroids before they hit the ground.
Try to keep planets alive as long as you can by shooting all the meteoroids.
Key | Action |
---|---|
UP | Accelerate |
DOWN | Slow down |
LEFT | Steer left |
RIGHT | Steer right |
SPACE | Fire |
LEFT CTRL | Change weapon |
P | Pause game |
ESC | Main menu |
This is the easiest way to build and run Meteoroids when you are in Linux environment. This has been tested also on Windows when using GitBash (unix like shell).
Run these Linux scripts from Meteoroids/
folder:
./libinstall
./cleanbuild
...and then you can start the program with:
./run
Happy shooting!
- Install slick-util library:
mvn install:install-file -Dfile=lib/slick-util.jar -DgroupId=slick-util -DartifactId=slick-util -Dversion=1.0 -Dpackaging=jar
- Clean and compile project with Maven:
mvn clean:clean && mvn compile && mvn nativedependencies:copy
-
Sometimes needed when failing to copy native dependencies to the target/natives directory:
mvn package
-
Set up MAVEN_OPTS environment variable (use unix version ALSO in Windows when using GitBash in unix mode):
**windows:** set MAVEN_OPTS="-Djava.library.path=target/natives"
**unix:** export MAVEN_OPTS=-Djava.library.path=target/natives
- Run Meteoroids:
mvn compile exec:java -Dexec.mainClass=meteoroids.Meteoroids.Main
More information on setting up LWJGL project with Maven: http://wiki.lwjgl.org/wiki/Setting_Up_LWJGL_with_Maven
Use IDE's own import Maven project tool and import the Meteoroids folder. Add -Djava.library.path=target/natives
to the project's VM options.
Eclipse: "Run" -> "Run configurations..." -> "Java Application" -> "Main" -> "Arguments" -> "VM arguments:"
NetBeans: Project Properties -> "Run" -> "VM Options:"
Problems starting the application?
Try this:
mvn clean:clean
&&
mvn compile
&&
mvn nativedependencies:copy
&&
mvn package
&&
export MAVEN_OPTS=-Djava.library.path=target/natives
&&
mvn compile exec:java -Dexec.mainClass=meteoroids.Meteoroids.Main
After this, the program should start. Hope this works!
- some graphical glitches appear
- star field isn't drawn on some Windows machines when running from jar/exe-file
- some objects are drawn wrong when OpenGL version > 3.0
mvn package
does not include native libraries (using JarSplice instead)- tests run with
mvn test
doesn't work if native libraries are needed (works well when using IDE)