screen aspect changing

Previous topic - Next topic

MrPlow

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?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

dreamerman

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.
Check my source code editor for GLBasic - link Update: 20.04.2020

spacefractal

#2
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/