Asteroid Redirect Project by master_spike

[raw]
made by master_spike for Ludum Dare 46 (JAM)

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🗨️

Feedback

defectivemelon
20. Apr 2020 · 21:28 UTC
I was unsuccessful in opening this on my computer (Windows) - I have java installed but when clicking the jar, nothing happens
Rhayegar
20. Apr 2020 · 21:36 UTC
Same as above((
🎤 master_spike
20. Apr 2020 · 21:47 UTC
@defectivemelon @rhayegar That's bizarre. Is your Java up to date (req. Java 1.8)? There shouldn't be any other dependencies. Try opening command line in the folder containing the jar and run "java -jar AsteroidRedirectProject.jar" let me know what happens
JAsonsumm1
20. Apr 2020 · 21:58 UTC
aye, couldn't open this :/
Inventivum Games
20. Apr 2020 · 22:16 UTC
same can't play
Meemog
20. Apr 2020 · 22:18 UTC
I was a bit confused at the start on how to play, but once I got the hang of it, it was quite fun
David P
20. Apr 2020 · 22:19 UTC
I couldn't get the game to run. The jar file didn't do anything even after installing Java.
ImmortalityBH
20. Apr 2020 · 22:19 UTC
hey @master-spike I took your suggestion about using command prompt and I got this out put: [LWJGL] Failed to load a library. Possible solutions:
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
🎤 master_spike
20. Apr 2020 · 22:51 UTC
I've updated the library folder, I think the problem might have been i forgot to add the windowsX86 native libraries. I've actually reuploaded the whole thing as one zip file containing the libraries for every OS rather than different downloads. Although now its 10MB :(. @immortalitybh @david-p @inventivum-games @jasonsumm1 @rhayegar @defectivemelon maybe it will work now. if anyone still has issues let me know.

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 :)
Ben Hack
21. Apr 2020 · 00:36 UTC
Yeah, we've ensured it works at least across windows and linux properly now - sorry for the earlier confusion
tri11paragon
21. Apr 2020 · 00:55 UTC
pretty neat
MatheusBorba
21. Apr 2020 · 01:00 UTC
Muito Legal
qqcs
21. Apr 2020 · 03:41 UTC
This is a neat take on the planet defence game. Surprisingly enjoyed needing to make a gravity turn to get back into orbit.
TechnoNugget
21. Apr 2020 · 06:09 UTC
I was unable to execute the jar :( I'm using win64 10. It's saying I need `lwjgl_opengl.dll`
Berlm
21. Apr 2020 · 07:19 UTC
After some donwloading, it started working. Please put a README.txt file in the folder which says please download java if you haven't, and give a link to the oracle java website.

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! :)
KreGames
21. Apr 2020 · 10:06 UTC
Some How to run it would be nice for the non Java-friendly users.
🎤 master_spike
21. Apr 2020 · 15:44 UTC
@technonugget should be fixed. Didn't realise it was necessary to put that in the root folder as I got it to run on 32 bit and 64 bit Java on my system without extracting that particular .dll into the root folder. Should be there now, hopefully that fixes the issue?
J_C - One Bit Studio
21. Apr 2020 · 19:59 UTC
Couldn't open it unfortunately.
Gallahron
21. Apr 2020 · 20:29 UTC
Cool game, I found it difficult to control at first.

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
Math-s
21. Apr 2020 · 20:52 UTC
Cool game (love the idea) but it is really difficult to control
TechnoNugget
22. Apr 2020 · 00:06 UTC
![error.png](///raw/67e/z/3214d.png)

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
defectivemelon
22. Apr 2020 · 00:07 UTC
Working now! Thanks for fixing :) This was fun, as others have mentioned it's hard to control but I enjoy the chaos that causes -- so maybe finding a balance between hard to control, but more predictable would've been helpful. I learned I'm very good at crashing asteroids into earth today
🎤 master_spike
22. Apr 2020 · 03:30 UTC
@technonugget OK I think that is something to do with audio sample rate and OpenAL. I think if you try to set your drivers to 44100hz sample rate it should work. You can do this by going to control panel -> hardware and sound -> manage audio devices -> click your audio device under [playback] -> properties and on one of the tabs on the top you should be able to set audio sample rate.

Next time I think I'll just use unity lol. Getting everything to work on everyone's systems has been quite a train wreck.
Kayahr
22. Apr 2020 · 06:45 UTC
Doesn't start on Linux with `java -jar AsteroidRedirectProject.jar`. I have OpenJDK 11 and it gives me this error:

```
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

```
Makse
22. Apr 2020 · 13:29 UTC
Sorry, i couldn't play :-/
Wassim
23. Apr 2020 · 04:15 UTC
Sadly I couldn't play the game :cry:
Let me know If you have a fix or a post jam version would be happy to give it a try! :slight_smile: