GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2017-Oct-24

Title: screen aspect changing
Post by: MrPlow on 2017-Oct-24
Hi

Say I have a windows portrait game and I want to put the portrait game within the window of a landscape backdrop.

Is that easy or possible with createscreen or viewports?

Has anyone done this?
Title: Re: screen aspect changing
Post by: dreamerman on 2017-Oct-24
Never used viewports, but createscreen and usescreen are sufficient for this. Calculate scaling and borders, draw all game stuff on offscreen texture/sprite, then draw that sprite centered normally on screen with scaling, to get proper mouse coords just something like finalX = (currX - borderX) / scale.. On desktop there shouldn't be any problems with SCREEN commands.
Title: Re: screen aspect changing
Post by: spacefractal on 2017-Oct-24
Vertical games often dont look good on a pc landscape screen. yes you can use the VIEWPORT command to limit the drawings. But would around property same when people take vertical based videos.

So if you can, recode so they works in landscape. That why all my games is landscape mode only or priority landscape higher than portrait mode. Portrait is good on mobile or arcade, but not that good on pc....Even it's should been easy with VIEWPORT.