Asteroid Redirect Project by master_spike
As Earth-threatening asteroids are discovered, your task is to knock them into an escape trajectory (i.e. off screen). Prevent them from crashing into Earth! If too many crash into the Earth, it will die. Inspired by the classic retro game Asteroids, and the Asteroid Redirect Mission of NASA.
Features: - Elastic collisions!™ - Realistic* Gravity!™ - Procedurally-generated asteroids!™ - Explosions!™
Made in Java, using the Lightweight Java Game Library 3. Tools used include BFXR, Eclipse IDE, Audacity, Photoshop, GIMP, and BMFont.
Requirements: Requires Java 1.8
Every resource was created ourselves except for the font. The physics were even created from scratch as well - we are proud of how well the physics turned out! (in fact all of our code was, except maybe a couple hundred lines of rudimentary base code). Yes we know we could have just downloaded a library for what we are doing, but we thought it would be more fun to try to program it ourselves.
Controls: - W: Thrust forward - S: Thrust backward - A: rotate counter-clockwise - D: rotate clockwise
- R: Restart (try not to accidentally press it)
- Spacebar: Pause
- Escape: Exit (only while paused)
Additional info/tips:
- The faster an asteroid is travelling, the more damage it will do if you hit Earth.
- All asteroids will start in a counter-clockwise orbit around Earth, at a random phase angle, a random altitude (within a range) and with some variation in velocity.
Download (13MB) at https://master-spike.itch.io/asteroid-redirect-project. Requires Java 1.8
KNOWN ISSUES: - You might get an error saying Failed to set to 44100hz, got 48000hz instead. If you get this try setting your audio playback device to 44100hz sample rate via control panel (Control panel -> Hardware and sound -> manage audio devices -> click your audio device -> properties -> advanced -> change the sample rate there). If you get this error on another platform, again its just a matter of changing the sample rate of your audio device. - You might get an error saying something along the lines of "lwjgl.dll not found" or something. If this happens at this stage, we're not sure what to do. I don't really know what causes it. It seems to be inconsistent but we've done our best to minimise the chance it occurs. Maybe try downloading the 64 bit version of Java if you have the 32 bit version, and vice versa. - Sometimes double clicking the jar doesn't work, in this case run the "run.bat" file (if on windows). If on Linux, run it through the terminal. Sometimes this actually works (for whatever reason, again I have no idea). If it still doesn't work it should output some sort of error message and you can comment it below. - Doesn't work on the only Mac I tested it on. I don't know if this always occurs on Mac or if its just the system i tested it on.
*Subject to subjectivity.
Ratings
| Overall | 2137th | 3.038⭐ | 28🧑⚖️ |
| Fun | 1478th | 3.2⭐ | 27🧑⚖️ |
| Innovation | 1663th | 3.06⭐ | 27🧑⚖️ |
| Theme | 2033th | 3.2⭐ | 27🧑⚖️ |
| Graphics | 2023th | 2.88⭐ | 27🧑⚖️ |
| Audio | 1418th | 2.72⭐ | 27🧑⚖️ |
| Humor | 1448th | 2.636⭐ | 24🧑⚖️ |
| Mood | 1833th | 3⭐ | 25🧑⚖️ |
| Given | 45🗳️ | 10🗨️ |
a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll
at org.lwjgl.system.Library.loadSystem(Library.java:162)
at org.lwjgl.system.Library.loadSystem(Library.java:62)
at org.lwjgl.system.Library.<clinit>(Library.java:50)
at org.lwjgl.openal.ALC.create(ALC.java:109)
at org.lwjgl.openal.ALC.create(ALC.java:69)
at org.lwjgl.openal.ALC.<clinit>(ALC.java:48)
at org.lwjgl.openal.ALC10.nalcGetString(ALC10.java:426)
at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:441)
at com.blade2d.audio.AudioMaster.init(AudioMaster.java:23)
at com.spacegame.main.Init.loadSounds(Init.java:35)
at com.spacegame.main.Init.main(Init.java:15)
sorry this a lengthy comment and you might need to delete it but I hope this helps you get it working. I think it has something to do with the lwjgl natives
OK apparently it was a problem with 32 bit Java. I have 64 bit java so this problem didn't occur on my end. Many thanks to all of you who notified me of the problem and my partner Ben for helping fix it :)
Anyways-
It is a well thought of game, and its fun to play but here are some suggestions-
- The movement feels stiff
- The game can easily be defeated by going full speed diagonally (you go to the other side again and again, cover the whole screen and kick all the asteroids off)
- The game doesn't go fullscreen (not an issue, but it will be better if thats possible)
- I love the 8/16 bit audio, BUT it kind of hurts your ear. Please try to reduce the pitch or the volume
Anyways, good luck in your future as a developer! :)
FOR PEOPLE WHO CAN'T GET IT TO RUN:
There is a .bat file called run in the folder, clicking on that rather than the .jar made it run for me
I'm getting this error now, I think it has something to do with my CPU clock speed? idk. I have an AMD Ryzen 7 1700
Next time I think I'll just use unity lol. Getting everything to work on everyone's systems has been quite a train wreck.
```
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoClassDefFoundError: org/lwjgl/openal/ALC10
at com.blade2d.audio.AudioMaster.init(AudioMaster.java:23)
at com.spacegame.main.Init.loadSounds(Init.java:35)
at com.spacegame.main.Init.main(Init.java:15)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.lwjgl.openal.ALC10
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 8 more
```
Let me know If you have a fix or a post jam version would be happy to give it a try! :slight_smile: