Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Falcon 9 Landing Game
#1
I wanted to create an example program for lesson 18 of my tutorial that encompassed everything covered up to that point. What was supposed to be a simple demo ended up becoming an entire game. It's not very polished as I only spent a few days on it but it's good enough for the tutorial.

Use your arrow keys to maneuver the Falcon 9 stage 1 booster to a smooth landing:

UP ARROW - main thrust
RIGHT ARROW - side thrust left
LEFT ARROW - side thrust right

I made a pretty epic intro sequence for it as well that lasts 1:30. After watching it the first time you can simply press a key to skip it each time you run the program.

Simply put the files into your QB64 (or QB64pe) folder and run Falcon9.BAS. The included Falcon9.ZIP file contains everything you need.


Attached Files Image(s)
   

.zip   Falcon9.zip (Size: 5.97 MB / Downloads: 44)
Reply
#2
(09-26-2022, 10:27 PM)TerryRitchie Wrote: I wanted to create an example program for lesson 18 of my tutorial that encompassed everything covered up to that point. What was supposed to be a simple demo ended up becoming an entire game. It's not very polished as I only spent a few days on it but it's good enough for the tutorial.

Use your arrow keys to maneuver the Falcon 9 stage 1 booster to a smooth landing:

UP ARROW - main thrust
RIGHT ARROW - side thrust left
LEFT ARROW - side thrust right

I made a pretty epic intro sequence for it as well that lasts 1:30. After watching it the first time you can simply press a key to skip it each time you run the program.

Simply put the files into your QB64 (or QB64pe) folder and run Falcon9.BAS. The included Falcon9.ZIP file contains everything you need.

Nice appearance, but (for me at least) not playable. Guess I just ruined Elon, crashing 100 of his rockets. Big Grin
Reply
#3
Well I'm glad I'm working from home, saves me the trouble of packing my desk after crashing the lander 20 times.
Reply
#4
Yeah, it's a bit difficult to land at first. While building the darn thing I got so good at it that I have about a 75% success rate. Heck, I was thinking of making it harder. Glad I didn't. Perhaps someone could add a difficulty level option to it.
Reply
#5
I'd love to try it out, if I could just get out of James D. Jarvis's falcon cave!

Pete
Reply
#6
Is it necessary to close sound files and frees images before terminating
the program with SYSTEM? Thought SYSTEM freed up everything.

As always from Terry, it's mighty interesting code to study, made much
easier with meaningful variable names and tidy comments.
Reply
#7
(09-27-2022, 05:07 PM)ChiaPet Wrote: Is it necessary to close sound files and frees images before terminating
the program with SYSTEM? Thought SYSTEM freed up everything.

As always from Terry, it's mighty interesting code to study, made much
easier with meaningful variable names and tidy comments.

+1 and impressive Intro, but you'd think by now we could program a Lander that a 3 year old could land safely 100% of time! How are we ever going to get to Mars and beyond by making it hard? Hope his cars are easier to drive.
b = b + ...
Reply
#8
This is great, thank you Terry.

I had trouble at first but now I'm landing it most of the time. There's a bit of a learning curve, but then "You're The Man!" haha. I didn't expect praise from Elon but hey I'll take it.
Reply
#9
(09-27-2022, 05:07 PM)ChiaPet Wrote: Is it necessary to close sound files and frees images before terminating
the program with SYSTEM? Thought SYSTEM freed up everything.

As always from Terry, it's mighty interesting code to study, made much
easier with meaningful variable names and tidy comments.

To tell the truth I'm not sure what SYSTEM does upon exit. I've always taken the opinion that cleaning up RAM before a program exits is best practice. Can someone with knowledge of the underlying C code chime in on this? Is garbage collection taken care of properly when a QB64 program exits?

I got into the habit of over-commenting source code when I used to dabble in Assembler many years ago. The comments are more for me than anything else. It amazes me how hard it is to decipher my own un-commented code from even a year earlier. A quick stroll through my comments brings me up to speed pretty quick.
Reply
#10
(09-27-2022, 05:40 PM)james2464 Wrote: This is great, thank you Terry.

I had trouble at first but now I'm landing it most of the time.  There's a bit of a learning curve, but then "You're The Man!"  haha.  I didn't expect praise from Elon but hey I'll take it.

Save him a couple million dollars by landing his rocket and he better praise you! Smile
Reply




Users browsing this thread: 2 Guest(s)