Your missile base is at bottom, middle of screen. When you click mouse you want your missile to strike the incoming one before it reaches the bottom of screen. If incoming is not going to reach bottom don't worry about it unless you can hit it for sure (not likely).
Title: Re: Missile Command
Post by: Dav on June 12, 2021, 11:32:30 am
Nice compact code. My first try of 20 was horrible. 4 hits and 16 misses. No wonder my grand-dad never took me hunting.
By LB do you mean Liberty Basic?
- Dav
Title: Re: Missile Command
Post by: bplus on June 12, 2021, 01:10:32 pm
Nice compact code. My first try of 20 was horrible. 4 hits and 16 misses. No wonder my grand-dad never took me hunting.
By LB do you mean Liberty Basic?
- Dav
Yes Liberty but actually I am too cheap to spring for Liberty so I use Just Basic the trainer for Liberty which is pretty standard Basic until you get into the Windows part then it is very idiosyncratic.
I am planning heat seeking missile code next so we hopeless human shooters have a better shot at survival.
Can you believe 25 lines of code could offer such an intriguing challenge? :)
Title: Re: Missile Command
Post by: bplus on June 12, 2021, 01:14:27 pm
BTW you can click again and change course, usually it's too late but sometimes it helps.
PS compact code because the challenge was 1K bytes.
Title: Re: Missile Command
Post by: bplus on June 12, 2021, 01:26:53 pm
QB64 version comes in at 842 bytes because IDE formats with spaces, Steve could probably get down to 500 :) JB version was 757 bytes but different commands for their Windows (what we call Screens over here).
Title: Re: Missile Command
Post by: bplus on June 13, 2021, 01:10:06 am
It stops after 50 hits, note the number of misses.
Title: Re: Missile Command
Post by: johnno56 on June 13, 2021, 07:51:27 am
I let it run "as is" for all 50 "shots". Impressive. If this program does not develop into a full game, the program as it stands, makes a pretty good version of a digital flower arranger... lol
Nah seriously... It would be cool to develop a "basic" based MC game... I like the "heat seekers"... Perhaps can be added as a bonus for reaching either a higher score or "hitting" specific "power ups"... Too much too soon? I am intrigued in this program. Time to research other "basic" versions for ideas... or are you trying to produce a militaristic (as is file size) game?
Title: Re: Missile Command
Post by: bplus on June 13, 2021, 09:46:43 am
Quote
the program as it stands, makes a pretty good version of a digital flower arranger... lol