Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusing Wiki explanation
#6
(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. Smile

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.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
Confusing Wiki explanation - by PhilOfPerth - 06-28-2024, 02:30 AM
RE: Confusing Wiki explanation - by SMcNeill - 06-28-2024, 03:50 AM
RE: Confusing Wiki explanation - by PhilOfPerth - 06-28-2024, 04:51 AM
RE: Confusing Wiki explanation - by TerryRitchie - 06-28-2024, 05:58 AM
RE: Confusing Wiki explanation - by PhilOfPerth - 06-28-2024, 08:49 AM
RE: Confusing Wiki explanation - by TerryRitchie - 06-28-2024, 03:33 PM
RE: Confusing Wiki explanation - by Pete - 06-28-2024, 04:02 PM
RE: Confusing Wiki explanation - by grymmjack - 06-28-2024, 07:35 PM
RE: Confusing Wiki explanation - by Pete - 06-28-2024, 09:38 PM



Users browsing this thread: 1 Guest(s)