|
Post by B+ on Nov 30, 2018 19:59:06 GMT
Hi Rod,
Your Martian landscape is great! and your gameloop mod looks like it might work, one test and no shutdowns. It appears similar to one thing up my sleeve, going back to goto branches because I remember some old discussion about using Timer with subs, eg dont. My mod on that line too, appears to have worked, more testing will be done as I fine tune HAL more. It will be much more pleasant to test code without that annoying shut down.
Yes, not much of a game but this is nice coding challenge. The Mars lander has to work remotely as well to avoid crash landings.
Oh I had a run of shutdowns when changing back to branch labels, also with no error log entries (but no blue circle swirls either)!
|
|
|
Post by carlgundel on Nov 30, 2018 23:48:07 GMT
In attempts to rid myself of the blue swirl circle and shutdown, I tried putting everything in one window, still shows up, dang! Try the original lander game a bunch of times to see if that also crashes.
|
|
|
Post by B+ on Dec 1, 2018 1:16:53 GMT
Yeah, the problem seems the conversion from branch labels to subs, specially when timer is involved. No further problem with blue swirl since converting back.
|
|
|
Post by Rod on Dec 1, 2018 8:36:26 GMT
Wrapping the timer statement completely inside its own Sub has fixed the problem for me.
sub pause ms timer ms ,[done] wait [done] timer 0 end sub
|
|
|
Post by B+ on Dec 1, 2018 16:25:34 GMT
I confess I avoided using it because I don't understand quite how it works. But I definitely prefer doing code in subs instead of goto's.
Rod this is very nice way to have my cake and eat it too! (I have converted it back to follow your suggestion. Thanks again!)
|
|
|
Post by carlgundel on Dec 2, 2018 0:03:15 GMT
Yeah, the problem seems the conversion from branch labels to subs, specially when timer is involved. No further problem with blue swirl since converting back. Interesting.
|
|
|
Post by B+ on Dec 2, 2018 3:10:04 GMT
Yep, and Rod's suggestion works well too. After conversion back to subs, I put the Lander program with auto pilot on it's own auto pilot and just let it run with current HAL settings. Walked the dog and watched an old Star Trek episode on BBC "The Corbomite Manuever" now 70 minutes long with commercials, came back and watched another 38 rounds and took this snap: Thanks (originally for displaying how many times God mode was used) are the number of times HAL was never engaged because it is activated randomly. Half the crashes are probably caused by activating HAL too late. Looks like I have the drifting problem fixed. BTW, according to my brother the Mars lander had less than a 50% chance of surviving the landing.
|
|