01-12-2025, 12:35 AM
(01-11-2025, 11:48 PM)bplus Wrote: That is certainly way more difficult than this:
Code: (Select All)10 _Font 8: cnt = cnt + 1: If cnt < 1921 Then If Rnd < .5 Then Print "\";: GoTo 10 Else Print "/";: GoTo 10
I had to pester the other devs and dig into why this is such crappy code (and that's not saying @bplus is a crappy coder; that's just saying *THIS* is some crappy code), and after some digging and annoying everyone else, here's the issue:
_FONT shouldn't be called endlessly inside a loop like this!!
In a text screen (like the SCREEN 0 that we default to, and which is in play here), _FONT requires a complete redraw and resize of the entire screen *each and every* time it's called!
So what's going on here is:
_Font 8: Redraw and Resize entire screen
cnt = cnt + 1: increase count
IF cnt.... draw our slash and repeat entire process 1920 times
That 1920 calls to _Font 8 is the issue. You really don't need that pause for redrawing and resizing, and it certainly doesn't play nice with early termination of the program.
Lesson learned here??
Keep _Font calls to a minimum and definitely don't include them into the middle of a loop like this. Not unless you just WANT to generate issues for your programs and make them unstable for some odd reason.