Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / DBP - Automatic Resolution Selecter

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 6th Nov 2006 04:33
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:



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
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 7th Nov 2006 07:41
Comments, Suggestions?

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 7th Nov 2006 12:05 Edited at: 7th Nov 2006 12:05
I wrote something similar a while back.
it spits out the machines information so you can evalaute it for your game, however i think the ip detection is incorrect.

a sample of what it produces is this.



a few people helped me write key components for it.
they are included in the credits.
the files are attached to this post.



good work for trying however.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Nov 2006 00:40
what do u mean, "try" Doesnt it work?

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Nov 2006 08:14
your taking a negative approach to a positive compliment.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Nov 2006 08:31
Sorry. I was just unsure what you meant, and I did not want to make it seem negative. Also, at that time, I was using my PSP so it takes a while to get all of that in, as well as get to the page. I did not mean it in any negative way.

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Nov 2006 09:32
no worries mate.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Nov 2006 04:39
Cool. Do you/anyone have any suggestions for the code?

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Nov 2006 13:48
how about writing a loop for those arrays.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Nov 2006 23:29
Im not sure what you mean by a loop for the arrays.


Has anyone tried this with DBC yet? Does it work?

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Nov 2006 01:21
perhaps it is easier to define your array like you have.

I was suggesting to use a for loop.

in my code it captures every resolution with a few lines of code.


this future proofs it in case new larger resolutions are avaialable.

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 11th Nov 2006 04:06
load dll "user32.dll",1
ScreenWidth=call dll(1,"GetSystemMetrics",0)
ScreenHeight=call dll(1,"GetSystemMetrics",1)
delete dll 1
set display mode ScreenWidth,ScreenHeight,32,1


Gets the users display mode... then sets it

Is that what you were showing in your code?


Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Nov 2006 08:41
My code was simply a selector, it runs down a list of display modes, then selects the highest one available. Yours is much better though. Good job

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Nov 2006 11:27
mine was for a diagnostic, for your users to send you information about their machine, perhaps this is a great opportunity to bundle all the resolution snippets into one post.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Nov 2006 01:20
perhaps so.

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2

Login to post a reply

Server time is: 2024-11-22 23:38:26
Your offset time is: 2024-11-22 23:38:26