Window Size in Windowed Mode?
Miscellaneous Forums/General Discussion/Window Size in Windowed Mode?
If you have a game that runs at 800x600 full-screen and the player goes into windowed mode, you can't make it 800x600 as this is the client area and the actual window with title bar and border will be bigger and thus if the desktop resolution is only 800x600 the window will be too big for it. You can solve this by making the client area smaller BUT how much smaller as the titlebar can vary depending on installed theme, anyway to find out? Futhermore the Start Bar (can be anywhere) and applications go behind it if it is set to "Always on top".
Also if the window is smaller all your code to position logos, text etc needs to dynamically alter the positions slighty to take into account the different screen size, and possible some full-screen images need to be centered by moving the top left corner off-screen. At least this is what I did.
Any of you got any input into how you do it (or would do it)?
Thanks
Don't worry about it. Just do 800x600 windowed and full screen. You are worrying needlessly.
lol, but have you tried an 800x600 client area game when running in 800x600 desktop res, it's not very good?
It's really not worth worrying about.
hmm, now two of you say it. It's just that after making business software for years, I'm used to having a polished interface and making sure that the use can see all the data/functions on screen. For example, what if you have an OK button right at the bottom of your 800x600 screen? This would be off-screen and the user wouldn't be able to click it without moving the window!
Just checked Big Kahuna Reef and it is larger than 800x600 in windowed mode so I guess if the pros can get away with it ...
Well I'm all for not doing it as it's just more programming and it took ages to support in my last game, but it feels kinda lazy.
Bejewelled is bigger than 640x480 too.
Lego Builder Bots is bigger than 800x600 and doesn't even have minimise and close buttons.
GraphicsWidth() / GRaphicsHeight() ?
I use "percentages" in my games, just like HTML coding, except they're done with "graphicswidth" and "graphicsheight."
ScaleImage logo, GraphicsWidth()/5, GraphicsHeight/5
Something like that. That'd be equivilent to "20%" width and "20%" height.
Thanks for the input, my problem is not finding out how wide the graphics window is or how to postion the logos but just the fact that do you people have a slightly smaller than 800x600 window in windowed mode?
my problem is ... just the fact that do you people have a slightly smaller than 800x600 window in windowed mode?
Huh? This question/statement makes no sense.
I get the feeling that you want your application to "Maximize" in windowed mode. There might be a DLL or something that can return the dimensions of a maximized window.
Keep in mind that games typically do not provide this functionality - the best they do for people who are limited to a 800x600 desktop is to offer the ability to have a 640x480 window.
read "my problem is" as "my question is" ... and the rest as "those of you who have made windowed mode in games, did you make the window smaller than 800x600 or 640x480 so it all fits on a desktop of that resolution?"
I don't really want to maximise I just want to say, my game runs in 800x600 and if you use it in windowed mode it will fill the screen but none of it will be missing (i.e. off the edge because graphics 800,600 was called and the titlebar and borders weren't taken into account)
You could always make it run at 400x300. That'll fit almost anything.
Yeah it would but ... What I'm trying to say is if the full-screen is 800x600 the windowed mode should be as close as poss. to it.
you could make it print out to teletype, that should be supported by pretty much anything.
Okay, when the user switches to windowed mode get the desktop resolution via an API call, if it's 800x600 then set the window to 640x480 and don't worry with all that scaling rubbish - use the projection matrix to scale everything for you. Simple and quick - just the way we like it.
Just make it save out a text file, describing what's on the screen every second or so. Then the user can read it and decide where they want to poke the stick.
"you could make it print out to teletype" lol arg!
"to poke the stick" lol2 kinda like a dynamic text adventure I like it!
Actually I decided that when they try to disable full screen mode it's gonna say "F**K off and die! I'm not busting my arse programming such a dumb mode for you just so you can ebay for handbags and shoes at the same time as playing my game"
wtf? What's with all the 'noodle coward' names?
He wants to beat me up and Tim over there is no longer confused. =]