Author Topic: Newbie? How do I set the output screen to size 1920 1080? and text size?  (Read 282 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.

Paul.

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5069
  • 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"
END
I <3 DGArray's :D

PC:
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: 3928
    • 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:
https://www.glbasic.com/forum/index.php?topic=9848.0



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

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4340
    • View Profile
    • FUED
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.

Offline MrPlow

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