Author Topic: Support Fullscreen at lower resolutions or make windows scalable  (Read 4490 times)

Offline Havard

  • Mc. Print
  • *
  • Posts: 19
    • View Profile
Title says it all really.  For retroremakes it would be helpful to support fullscreen at 320x200, 320x240 etc


Could you make windows scalable so that they can be dragged to any size on the desktop?


  • Guest
Do your graphics on a low resolution 3rd screen, then scale it to fullscreen.

To be preciser:

- use CREATESCREEN screenID, spriteID, 320, 240 to create a virtual screen with the resolution of 320x240
- call SCREENSIZE screenX, screenY to get the current screen width and height
- before drawing your game stuff call USESCREEN screenID
- after drawing your game stuff call USESCREEN -1
- then call STRETCHSPRITE spriteID, 0, 0, screenX, screenY

Be happy with blocky retro graphics at FullHD  :good:
« Last Edit: 2009-Aug-06 by The Five17 »

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4176
  • On the shoulders of giants.
    • View Profile
    • My Apps
Or draw your screen as normal, then call the following function instead of using SHOWSCREEN

Code: (glbasic) [Select]
GLOBAL platform$


IF platform$="DESKTOP" THEN SETSCREEN 640,480,1

// Scale screen

IF platform$="DESKTOP"
 LOCAL temp% = GENSPRITE() // get temp image sprite slot
 GRABSPRITE temp%,0,0,320,240 // grab to that sprite

 ZOOMSPRITE temp%,160,120,2,2 // stretch it
 GRABSPRITE temp%,0,0,0,0 // delete temp image



Simples. :)
« Last Edit: 2009-Aug-07 by Kitty Hello »
I came. I saw. I played.

Offline Havard

  • Mc. Print
  • *
  • Posts: 19
    • View Profile
Ah - but which is quicker?

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5116
  • O Rly?
    • View Profile
i think the first one
I <3 DGArray's :D

AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard