Newbie? How do I set the output screen to size 1920 1080? and text size?

Previous topic - Next topic

paulfromzzz

G'day from Australia.

Yesterday I downloaded the demo of GLBasic and I must say that I am extremely impressed. I want to purchase the professional edition, but before I do I need to get some experience with the demo program.

Although I have done programming in the past 1978-1980 (for the Vic 20), I am of course very rusty  =D

Here are two very simple questions so that I can get up and running.

1. How do I set the output screen to youtube screen sizes 1920 X 1080

2. How do I print to the screen in a much bigger text size, say 18 point.

An example of the coding would be much appreciated.

Thank you and best wishes to everyone there. Keep up the great work and seeya.

Paul.

Schranz0r

Hi and welcome to GLBasic :)

1. You can set the screensize with the command SETSCREEN in code. (Press F1 to see the help)
2. GLBasic use SpriteFonts. To create one go to Tools->Font Creator. Give the font a name and save it under the folder "Media"

Here code on how to load it:

Code (glbasic) Select
SETCURRENTDIR("Media") //set current Dir to "Media"!
SETSCREEN 1920, 1080, FALSE  // here you set the screensize windowed

LOADFONT "myFont.png", 1  // load the font, and give a number
SETFONT 1  // load the font by that given number


WHILE TRUE // mainloop

PRINT "Hello, world!", 500, 500 // print out a string to test the font

SHOWSCREEN // swap buffers
WEND // back to the top of "while"
END
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

spacefractal

First at all. welcome to the forum. nice to see.

If you plan to do a game, using one internal resolution, you should take a look into this thread:
https://www.glbasic.com/forum/index.php?topic=9848.0



Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

For fonts, you might wanna try DINGSFONT here:
https://www.glbasic.com/forum/index.php?topic=6421.0

In which case, I can´t see the download link anymore.
Was it integrated to GLB at some point?
It is a really neat font solution.

MrPlow

Your font size should correspond with the resolution you choose - for different colors of the same font, you can either build separate fonts or do Photoshop color change to the font.png and save under a new name.

There is also a scale setting in SETFONT command :  SETFONT 1,1.5 but this can make fonts loose definition and blur a bit.

Welcome and enjoy GLB!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs