I noticed that sometimes the resolution that some people use are not able to be used with other computers, for example: 1600x1200x32 (Mine only supports upto 1200x1024x32
).
Anyways, i made a little function that will run down a list of predetermined modes, and choose an appropriate one. I assume that your game already has the ability to change to another screen resolution through the title menu to prevent frame rate drops. This simply allows the game to start up on all computers that meet the minimum requirements. And now, the feature presentation:
gosub _gfxsetup
FindMode()
`Temporary loop, you can remove this code
do
print "Hello World!"
sync
loop
`End of temp
_gfxsetup:
sync on
sync rate 90
dim modes(11,2) `For compatability, no 'as integer' added
modes(0,0)=320 : modes(0,1)=240 : modes(0,2)=16
modes(1,0)=320 : modes(1,1)=240 : modes(1,2)=32
modes(2,0)=640 : modes(2,1)=480 : modes(2,2)=16
modes(3,0)=640 : modes(3,1)=480 : modes(3,2)=32
modes(4,0)=800 : modes(4,1)=600 : modes(4,2)=16
modes(5,0)=800 : modes(5,1)=600 : modes(5,2)=32
modes(6,0)=1024 : modes(6,1)=768 : modes(6,2)=16
modes(7,0)=1024 : modes(7,1)=768 : modes(7,2)=32
modes(8,0)=1280 : modes(8,1)=1024 : modes(8,2)=16
modes(9,0)=1280 : modes(9,1)=1024 : modes(9,2)=32
modes(10,0)=1600 : modes(10,1)=1200 : modes(10,2)=16
modes(11,0)=1600 : modes(11,1)=1200 : modes(11,2)=32
`Add other modes if you wish to
return
function FindMode()
i=11
while i>-1
if check display mode(modes(i,0),modes(i,1),modes(i,2))=1
set display mode modes(i,0),modes(i,1),modes(i,2)
i=-999
endif
i=i-1 `I would use 'dec i' but i dont know if dbc supports that
endwhile
endfunction
if that doesnt work, sorry, i did that from memory. However, if it doesnt, it should be a quick-fix.
Your signature has been erased by a mod because it's larger than 600x128