Author Topic: Newbie? How do I set the output screen to size 1920 1080? and text size?  (Read 740 times)

Offline paulfromzzz

  • Mc. Print
  • *
  • Posts: 1
    • View Profile
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.


Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
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"
I <3 DGArray's :D

AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3958
    • View Profile
    • Space Fractal
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:

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4397
    • View Profile
    • FUED
For fonts, you might wanna try DINGSFONT here:

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.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1785
    • View Profile
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!
Speccy-48k, Speccy-128k, Amigas, PCs