confused by screen resolution

Previous topic - Next topic

tormentor33

Ok!, so I bought the full version of GLBasic, but even though I have plenty of experience with B.A.S.I.C dialects in the past (blitz, dark, ...down to Amos, Spectrum etc), I can't seem to get a full screen program to work, according to the help file all I need to do is "setscreen 1920,1080,1", (I added this to the start of the object creation example code as the first line), but what happens when I run it is I get a black screen with the windows taskbar across the bottom and two empty glbasic windows over the black area, no visible code running, if I rem out the line I added it works windowed fine, tried different resolutions as listed in settings (1024x768 for eg), and it does a similar thing but at low resolution and at the wrong aspect ratio for my display (black borders at the sides)

tutorials and help files all just seem to use this one line to set display mode, am I missing something?

system specs

intel I7 quad core 3.5ghz
16 gig ram
320 gig ssd(boot) and 2TB hd
Nvidia GeForce gtx970
running on sharp 40" tv on hdmi port as display
Windows7 home 64bit

maybe someone could hack some quick high res example code that works for me to try, I suspect it's a system thing or I misunderstood Glbasics intended use and it's just aimed at low res display for phones etc, also compile targets available are just windows32 and windows dll, where are the other targets (eg Android or Linux), shouldn't there be a windows64 option?

bigsofty

#1
Easy option, you can set the default resolution + windowed option from the project options. That's "Project" and then "Options" from the IDE menus. Click on the "Resolution" input box and add a custom res their e.g "2560x1440".

Once this has been done and you don't wish to change your res then you don't need to mess around with SETSCREEN.

But if you do, you can use SETSCREEN but don't put it in your game loop.

So...

Code (glbasic) Select
SETSCREEN 2560, 1440, TRUE
WHILE 1 = 1
PRINT "Hello world!", 10, 10
SHOWSCREEN
WEND
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

spacefractal

dont forget not anyone have fullscreen display. so use GETDESKTOPSIZE to get the user display resolution.

Can also been an eventuelly driver issue or directx9c is not installed. Can you test, its really require it?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

tormentor33

#3
@ Bigsofty

I know about the default resolution, but it still gives no joy, I get the same effect, and I want to be able to alter the resolution "on the fly" to help optimise performance for different PC's automatically. I have posted a picture of what your example code does on my screen when I run it, I have a fair bit of experience with programming, I just want something I can make up code quickly in without loads of low level work.

edit, this is a different effect to what my code gets, in mine you can't see the desktop at all, just the taskbar and a black screen in a fullscreen window with a blank ide window frame inside it, will add my codes image if possible (might not screenshot) and code

@spacefractal

the version of directx I have is 11, they are supposed to be backwards compatible are they not?, I tried downloading 9.0c and running the installer, but it completes so fast I think it doesn't actually install anything, just goes "oh! he has 11, no need to bother" 


spacefractal

Can you still show a little example? Even using draw rect.

I'm have not seen that kind of issues, like your machine not support OpenGL.

Also directx9 is not compatible with directx11. Many games fails to start due that.

Also make sure you not using ms default graphics driver..... Do you have graphics driver installed?

Would Been nice to know is it's this issue or not.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

tormentor33

#6
that app says 9.0c is installed, I know the latest Nvidia driver is installed as well, still does it, could it have something to do with me trying out the demo version 1st?, that had  3d disabled iirc, maybe something is "stuck", some random flag or settings file for eg, I will try removing all instances of glbasic I can find, then reboot, then re-install, but not tonight, I will keep you informed, thanks.


last minute edit: it's odd they all work in windowed mode just fine, you would think the task of rendering 3d scenes in a system window would be MORE complex and prone to fail, O_O object creation example code runs at 120fps windowed.


edit edit: OpenGL must be there or windowed code would not work imo.

bigsofty

#7
Try this, it's a version that I compiled and works fine on my setup...

And your correct, if OpenGL is missing, GLBasic displays a message that OpenGL does not exist as it can't create a rendering context.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Paul Smith

Make sure you have the latest version of glbasic. I had this after I reinstalled the other week. Found out the web page version is not the newest. Do and update from the GUI.
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD RYZEN 7,RTX 3060TI

Paul Smith

This was fixed in v14.003 if it is that. Also if you have zoomed the screen in windows I found it does not increase the text size but stretch the screen to your resolutions causing weird and missing screen surface.make sure it's at 100%.
I have a 1920x1080 laptop
The text was small so I changed it to 125% in desktop properties and written a test program. Tried it on my other PC and everything was wrong.
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD RYZEN 7,RTX 3060TI

spacefractal

Yes default font is very very small. Might been better to use some drawing commands instead to confirm.

Yes there might have a bug in early v14.

Here I'm need to update before the game working again.

Could have been similar issue.

I'm so still got screen tearing on some platforms.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

tormentor33

@ paulsmith

:nw: THANK YOU! update from ide worked, I now get full screen with no problems, I never thought to update since I had the "latest" version, (or so I thought), now back to learning glbasic :happy:


oh! wouldn't it be a good idea to update the download page?  ;/

bigsofty

@SF SETSCREEN and LIMITFPS doesn't work 100% of the time when trying to set the screen res. AND the monitor refresh rate. Specifically, SETSCREEN does not always change the refresh-rate to the same rate your game. Also the "vsync%" parameter in LIMITFPS, limits the speed of your gameloop but does not wait for the actual monitor vsync before swapping buffers. It's something I've looked into but haven't solved as of yet.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Paul Smith

No Problem  =D

Totally  agree with the update, Even the webpage needs updating.
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD RYZEN 7,RTX 3060TI

Ian Price

TBF pretty much EVERYTHING about GLB and the website needs updating! :P
I came. I saw. I played.