Sunday, February 26, 2017

Landing on the Moon

Hello again, this week I bring you, jLander! A game where you must successfully land a lunar module on the moon. Careful, you have limited fuel and every input needs it! You get points by landing on a zone (smaller = more) and having extra fuel remaining. Landing zones are highlighted green. Landing empty means you won't be able to return to orbit.

I am going to stop bundling a runtime environment to keep download size smaller. If you are having trouble getting the app to work, be sure and download the latest version of Java here.

As usual I made jLander with the help of JMonkeyEngine LemurGui, Zay-Es, and this week I used dyn4j for the physics.

The hardest thing about jLander was setting the proper win or lose states. Turns out theres alot of different ways to win or lose, and I most likely missed a couple! For those who are curious, you are considered landed when: The lander is in contact with the terrain, the lander is pointed +-3 degrees from straight up, the lander is not applying thrust, the lander is not out of fuel and finally, when the lander has not moved more than 0.4 world units for a total of one second.

A short review for dyn4j. It took me the better part of 2 days to be fully comfortable with how dyn4j operates. Now that I am familiar I believe it will be easier for me to implement the engine and its features in the future. That said, the documentation is rather lacking. I gather that for the most part dyn4j is intended to be freely integrated how the user sees fit. This has positives and negatives but I believe I will attempt to use the library in future projects where it makes sense.

There is a known glitch where if you crash while applying thrust the particle effect continues to play. I could probably iron this bug out, but particles were one of the last things I implemented and I'm honestly feeling done with the game as it is now. Sorry :p

Download link:
https://drive.google.com/open?id=0Bz4nByoX2Ks7S2ZKRlRaNUJBLWM

No comments:

Post a Comment