Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusing Wiki explanation
#1
When checking the Screen options, Screen 0 (for example) shows 3 different options for rows: 25,43 and 50, and 2 for columns: 80 and 40.
But I can find no explanation of how to select one of these. There may be one somewhere; if so, maybe a link would help?
I may be the only one who doesn't get this, but I doubt it.
Also, I can type Screen 0: Width 120 and get a screen that allows 120 chars per line, which contradicts the Wiki claim.
Can these be clarified for Newbies and others like me?  Confused
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#2
The confusion lies in old hardware, which ran QB45 and DOS, and modern hardware with QB64PE.

Past hardware  had serious limitations to it.   SCREEN 0 could be either 40 or 80 characters wide, and 25, 43, or 50 rows tall  -- that's what you're reading on.

What you need to focus on is this line:
QB64 can alter all SCREEN mode widths and heights which may also affect text or _FONT block sizes.

So you can set it to any width and height that you desire.
Reply
#3
(06-28-2024, 03:50 AM)SMcNeill Wrote: The confusion lies in old hardware, which ran QB45 and DOS, and modern hardware with QB64PE.

Past hardware  had serious limitations to it.   SCREEN 0 could be either 40 or 80 characters wide, and 25, 43, or 50 rows tall  -- that's what you're reading on.

What you need to focus on is this line:
QB64 can alter all SCREEN mode widths and heights which may also affect text or _FONT block sizes.

So you can set it to any width and height that you desire.

Then shouldn't the Wiki be brought up to date, to avoid the confusion?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#4
In lesson 5 of the tutorial the legacy screens are covered and explained. As Steve pointed out the legacy screens had limitations imposed by QuickBasic and the hardware of the time.

QB64 can break the limitations of all legacy screens including SCREEN 0.

Personally I think all the legacy graphics screens are useless unless needed for legacy source code that relies on them. You should be creating all your screens using the _NEWIMAGE statement, including SCREEN 0:

SCREEN _NEWIMAGE(80, 25, 0) ' same as legacy SCREEN 0 with 80x25 text

SCREEN _NEWIMAGE(132, 66, 0) ' the dimensions of a wide format sheet of printer paper 132x66 text

SCREEN _NEWIMAGE(80, 66, 0) ' the dimensions of a standard sheet of printer paper 80x66 text

QB64 even allows the use of screen pages (PCOPY) with SCREEN 0 and screen 0 text screens created with _NEWIMAGE.

Using _NEWIMAGE has benefits:

VideoScreen& = _NEWIMAGE(80, 25, 0) ' 80x25 text for terminal
PrinterPaper& = _NEWIMAGE(80, 66, 0) ' 80x66 text for standard printout
WidePrinterPaper& = _NEWIMAGE(132, 66, 0) ' 132x66 text for wide carriage printout

Now switch between the screens at will using the SCREEN statement:

SCREEN VideoScreen&

SCREEN PrinterPaper&

SCREEN WidePrinterPaper&
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#5
I get it. So we can forget about the Legacy screens and always use _newImage. Thanks both.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#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
#7
In short, SCREEN 0 does it all. What the hell is hard to understand about that?

Pete Big Grin
Shoot first and shoot people who ask questions, later.
Reply
#8
I think it's SCREEN 0 then WIDTH 80,43 etc. to change the video modes.

wiki Wrote:SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25.

From here: https://qb64phoenix.com/qb64wiki/index.php/WIDTH

So if you are in SCREEN 0 and want 80 columns and 25 rows:

Code: (Select All)

SCREEN 0
WIDTH 80,25

If you want 40x25:
Code: (Select All)

SCREEN 0
WIDTH 40,25

If you want 80x50:
Code: (Select All)

SCREEN 0
WIDTH 80,50

Hope that helps!
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#9
(06-28-2024, 07:35 PM)grymmjack Wrote: I think it's SCREEN 0 then WIDTH 80,43 etc. to change the video modes.

wiki Wrote:SCREEN 0 can use 80 or 40 columns and 25, 43 or 50 rows. Default is WIDTH 80, 25.

From here: https://qb64phoenix.com/qb64wiki/index.php/WIDTH

So if you are in SCREEN 0 and want 80 columns and 25 rows:

Code: (Select All)

SCREEN 0
WIDTH 80,25

If you want 40x25:
Code: (Select All)

SCREEN 0
WIDTH 40,25

If you want 80x50:
Code: (Select All)

SCREEN 0
WIDTH 80,50

Hope that helps!
WINNER, WINNER, CHICKEN DINNER!

WIDTH 1,1 is my personal favorite. I use it to write my resumes to avoid the need for scrolling.

Pete Big Grin
Reply




Users browsing this thread: 1 Guest(s)