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.

3 Dimensional Chat / Display modes for all?

Author
Message
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 5th Mar 2004 23:29
In the game I'm making I want the display mode to be set at the users highest possible mode. When I was coding a 2d box on the screen and ran it at 800 by 600, and then changed it to 1024 by 768 the box size and position changed. I decided I needed to fix this because not everyone is going to be at the same resolution I am (And i don't want to hard code it to one particular display mode). I want to design a function that can be read in the beginning of the program that adapts to the users highest possible display mode (for optimim proformence), but here's the catch... I want the box to be the same size and in the same place on all display modes. Does anyone know an equation, source code, example, or anything else that can help me out? Thanks.

Strad
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Mar 2004 00:37
there are commands screen width() and screen height()

from this you can determine the current width and height and use them as parameters in your box size.

eg: ink rgb(255,255,0),1 : box 0,0,screen width(),screen height()

Did you mean something else a little more complex?

after you have set the display mode store the current resolution into a couple of arrays or global variables.

eg:
global SW : SW = Screen Width()
global SH : SH = Screen Height()


or

eg:

rem ignoring the zero location in the array for simplicity

Dim SW(1) : SW(1)= ScreenWidth()
Dim SH(1) : SH(1)= ScreenHeight()


Login to post a reply

Server time is: 2025-06-28 16:40:51
Your offset time is: 2025-06-28 16:40:51