"TheEndless" wrote:Sure you can 😛 - although i won't consider the behavior guaranteed across models.
You can't draw a bitmap/screen onto itself. If you want to scale down, then you'd need to first draw to a bitmap, then draw that scaled to the screen.
IF m.sy.shrink THEN screen.DrawScaledObject(128, 72, 0.8, 0.8, sizer) ELSE screen.DrawObject(0, 0, sizer)
screen.SwapBuffers()
"Komag" wrote:
Alright, I added a bitmap just after creating my screen, called "sizer", and set all my regions to draw to sizer instead of to screen.
I also added a boolean flag called "shrink" to my global system "sy" variables, which can be changed in the game settings.
Then, just before screen.SwapBuffers() I have:IF m.sy.shrink THEN screen.DrawScaledObject(128, 72, 0.8, 0.8, sizer) ELSE screen.DrawObject(0, 0, sizer)
screen.SwapBuffers()
And it works great, exactly as wanted! 😄
My plan is to offer this for those 17 people out there who play on an old CRT and have too much overscan and can't see the edges of the game which are sometimes important, rather than never being able to use the outside areas for needful things.
"Komag" wrote:
No, I haven't noticed that, but perhaps there is some performance impact and I'm just not seeing it. How can I measure it? The way my cycle works it doesn't seem like it would cut the framerate in half, I still have do drawAll() on the compositors and SwapBuffers() on the screen regardless. I may be making a newbie mistake in my understanding of how it all works though.
fpsTimer = CreateObject("roTimespan")
frames = 0
While True
' increment the frame counter
frames = frames + 1
' Do screen updates
screen.SwapBuffers()
If fpsTimer.TotalMilliseconds() >= 1000 Then
? "FPS:"; frames
' Reset the timer and frame counter
fpsTimer.Mark()
frames = 0
End If
End While
"EnTerr" wrote:
Maybe something can be done by "cutting" piece of roScreen with roRegion and do most all drawing to that roRegion instead of the screen? I have never used it - but drawing to a region directly affects the parent bitmap, no?
"Komag" wrote:
My plan is to offer this for those 17 people out there who play on an old CRT and have too much overscan and can't see the edges of the game which are sometimes important, rather than never being able to use the outside areas for needful things.