QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: ZapJackson on March 02, 2019, 12:05:24 pm
-
Sorry for the basic question (ha ha) but I'm having a hard time teasing what I'm trying to do out of the documentation.
I'd like to have a custom sized text mode window (call it 60x40 characters,) that uses the double width version of the default 8x8 font, and has 32 bit color available for text foreground and background.
I keep finding ways to do two of these three things, but not all three at once. What am I missing?
-
SCREEN _NEWIMAGE(60* _FONTWIDTH, 40 * _FONTHEIGHT, 32)
_FONTWIDTH and _FONTHEIGHT by themselves will give you the height/width for the default font. (_FONT 16)
_NEWIMAGE gives you custom image sizes.
,32 at the end of _NEWIMAGE gives you 32-bit color mode.
NOTE: This is actually a graphical mode and not text-exclusive, so blinking colors won’t work and the screen stores information in a pixel-by-pixel basis, rather than in 2-byte ASCII mode.
-
PRINT row
, "Hi, ZapJackson";
PRINT row
, "Welcome to the forum.";
'no cr lf LINE (0, 0)-(479, 319), , B
SLEEP 'wait for keypress to ruin screen
edit: 60 x 40
wait double "width" of font 8, oops too small.
Double width? 16 X 16 ? or 16 X 8? might take a special font.
-
Aha! Excellent, thank you all, this gets me more or less where I'd like to be.
I can get everything to look exactly the way I want it if I _FULLSCREEN, which is totally adequate. A resizable window would be nice. I know I can use $RESIZE:STRETCH to let the user resize it, but is there a way to stretch it in code? Like if I wanted it to be 2x the default size...
It sounds like I could achieve the same thing with a custom font, which is totally fine if it comes to that, but I thought maybe there was an easier way to just use _FONT 8 at double its native resolution.
-
This might be easy enough:
f8&
= _NEWIMAGE(60 * 8, 40 * 8, 32) 'set uo isolated screen to print and do graphics
_DEST f8&
'move to isolation and create the screen to show PRINT row
, "Hi, ZapJackson";
PRINT "Welcome to the forum.";
LINE (0, 0)-(60 * 8 - 1, 40 * 8 - 1), _RGB32(0, 0, 255), B
'blue box everything
_DEST 0 'set to screen it, 0 is handle for screen
SLEEP 'wait for keypress to ruin screen
EDIT: remove unneeded line and comment better
-
Hi guys
I like old ASCII screen with its 32 attributes of colors and its blinking!
PRINT row
, "Hi, ZapJackson";
PRINT row
, "Welcome to the forum.";
'no cr lf
SLEEP 'wait for keypress to ruin screen
but the request is an ASCII emulated screen 60x40 with 32bit colors...
so good example of Bplus but we must colorized it!
f8&
= _NEWIMAGE(60 * 8, 40 * 8, 32) 'set uo isolated screen to print and do graphics
_DEST f8&
'move to isolation and create the screen to show PRINT row
, "Hi, ZapJackson";
PRINT "Welcome to the forum.";
LINE (0, 0)-(60 * 8 - 1, 40 * 8 - 1), _RGB32(0, 0, 255), B
'blue box everything
_DEST 0 'set to screen it, 0 is handle for screen
SLEEP 'wait for keypress to ruin screen
here screenshot [ This attachment cannot be displayed inline in 'Print Page' view ]
-
Just use SCREEN 0 and you can avoid all this crap. Shesh.
Pete :D
-
Here's why I was asking... :)
https://jick.itch.io/ghost-wizard
Thanks for all the help!
-
Here's why I was asking... :)
https://jick.itch.io/ghost-wizard
Thanks for all the help!
Damn $7 to see the bas code! :P
-
Damn $7 to see the bas code! :P
Settle down Lucy. Everything can't cost 5-cents.
Pete :D
-
Damn $7 to see the bas code! :P
Settle down Lucy. Everything can't cost 5-cents.
Pete :D
Why not? People still say my thoughts are only worth a penny! And my time is worthless!
Anyway, that game looks like it would be easy enough to make in SCREEN 0 with 16 colors. on a normal WIDTH 80,40.
-
Sure, let's bring back inflation. If it's hard enough for BPlus to cough up $7 for it now, just think how hard it will be when someone remakes it in SCREEN 0, and the price jumps 200%.
Just putting in my 2-cents... which apparently means you can respond twice. :D
Pete SCREEN 0 Hero
-
It's pay-what-you-want -- you can see it for free. Also here's the BAS source in case that's easier. [ This attachment cannot be displayed inline in 'Print Page' view ]
-
Sure, let's bring back inflation. If it's hard enough for BPlus to cough up $7 for it now, just think how hard it will be when someone remakes it in SCREEN 0, and the price jumps 200%.
Just putting in my 2-cents... which apparently means you can respond twice. :D
Pete SCREEN 0 Hero
Today's ideology would be at least 400%, and I'll invest that other cent toward my retirement. sure it will go just as far as this conversation.
It's pay-what-you-want -- you can see it for free. Also here's the BAS source in case that's easier.
I was wondering where Bplus got the $7 when I saw that myself. Don't take most of us too seriously around here, light-hearted fun is typically on tap. :D
It does look cool, but are you sure it couldn't just be done in straight SCREEN 0? or are you going for an upgraded look?
-
It's pay-what-you-want -- you can see it for free. Also here's the BAS source in case that's easier. [ This attachment cannot be displayed inline in 'Print Page' view ]
Apologies, I misread the pop-up. Zack Johnson author sounds allot like Zap Jackson. :)
So this is how the author handled the font (with a full color graphics screen):
That is a 60 x 40 character screen with _FONT 8 just blown up with _FULLSCREEN and an option, _SQUAREPIXELS, that I had not known about before.
-
We really need stuff like this captured, tested, and added to the Wiki, well, if it works as intended. Who wants to be voted the next "Clippy?" Not it! Ouch! Guys, quit throwing stuff at me!!!
Pete
-
I am the author.
Why does everybody want this to be in SCREEN 0? Is it some ideological thing?
I want access to more than the EGA palette.
-
Because SCREEN 0 is the only screen any real programmer would ever need!
Pete
-
I am the author.
Why does everybody want this to be in SCREEN 0? Is it some ideological thing?
I want access to more than the EGA palette.
Pete is NOT everybody! :D
-
I'd say take a bow, BPlus, but maybe not in that skirt.
Pete :D
-
"Pete is NOT everybody! :D"
Yeah there is me too!
If you can read this you CHEATED!
I am the author.
Why does everybody want this to be in SCREEN 0? Is it some ideological thing?
I want access to more than the EGA palette.
when it comes to text based games SCREEN 0 is usually the norm. But if your after a larger palette then yeah.
Could go straight up with a graphics mode and use an image based font.
-
Sorry if
I'm being whiny
Hey Cobolt
Your font is tiny
Pete