Falcon 9 Landing Game - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7) +---- Thread: Falcon 9 Landing Game (/showthread.php?tid=926) Pages:
1
2
|
Falcon 9 Landing Game - TerryRitchie - 09-26-2022 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. RE: Falcon 9 Landing Game - RhoSigma - 09-26-2022 (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. Nice appearance, but (for me at least) not playable. Guess I just ruined Elon, crashing 100 of his rockets. RE: Falcon 9 Landing Game - James D Jarvis - 09-26-2022 Well I'm glad I'm working from home, saves me the trouble of packing my desk after crashing the lander 20 times. RE: Falcon 9 Landing Game - TerryRitchie - 09-27-2022 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. RE: Falcon 9 Landing Game - Pete - 09-27-2022 I'd love to try it out, if I could just get out of James D. Jarvis's falcon cave! Pete RE: Falcon 9 Landing Game - ChiaPet - 09-27-2022 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. RE: Falcon 9 Landing Game - bplus - 09-27-2022 (09-27-2022, 05:07 PM)ChiaPet Wrote: Is it necessary to close sound files and frees images before terminating +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. RE: Falcon 9 Landing Game - james2464 - 09-27-2022 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. RE: Falcon 9 Landing Game - TerryRitchie - 09-27-2022 (09-27-2022, 05:07 PM)ChiaPet Wrote: Is it necessary to close sound files and frees images before terminating 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. RE: Falcon 9 Landing Game - TerryRitchie - 09-27-2022 (09-27-2022, 05:40 PM)james2464 Wrote: This is great, thank you Terry. Save him a couple million dollars by landing his rocket and he better praise you! |