06-28-2024, 03:33 PM
(06-28-2024, 08:49 AM)PhilOfPerth Wrote: I get it. So we can forget about the Legacy screens and always use _newImage. Thanks both.Yep, the legacy graphics screens (1, 2, 7, 8, 9, 10, 11, 12, 13) are, in my opinion, only needed for legacy source code that uses them. SCREEN 0 is fine for the standard 80x25 text screen but as you found out old QuickBasic SCREEN 0 rules can be broken by using statements like WIDTH.
SCREEN 0 ' 80x25 text mode
PRINT STRING$(80) ' print 80 asterisks
SLEEP ' wait for key press
WIDTH 120 ' allow 120 characters per line (will also clear screen like reissuing SCREEN 0)
LOCATE 3, 1 ' put cursor on third line
PRINT STRING$(80) ' print 80 asterisks
The WIDTH statement above did the same as:
SCREEN _NEWIMAGE(120, 25, 0) ' create 120x25 text based screen
RPG clone games like Rogue could really make use of this in a big way:
SCREEN _NEWIMAGE(128, 48, 0) ' 128x48 text screen (equates to 1024x768 in size)
128 x 8 = 1024 pixels wide
48 x 16 = 768 pixels high
That's a big RPG text based game screen.
The best QuickBasic legacy screens could muster was SCREEN 12 (640x480 graphics with up to 80x60 text)
SCREEN 12
WIDTH 80, 60
LOCATE 2, 2
PRINT "This is 80 x 60 text."
but the text was squished and hard to read.