Resolution question

My old monitor broke down so I got a new one (LED) the resolution is 1600x 900 If i set me program to fullscreen it looks stretched out.( mI had it set at 1024x 768 ) If I change settings to 1600 x900 I have to move camera back because some parts are out of screen. If someone else that tries out my program has a different res than 1600x 900 It won’t look that good. Is there a script that can automatically adjust for screen resolution or do I have to a blend saved for a particular res?
PS My program is finished with 2.49

digiman

Hm, that’s an interesting question. You can adjust the camera position and lens size (to make it wider), and change the fullscreen resolution by starting your game with command-line arguments, but I don’t know of a script that will do it automatically for you. I’m not sure if it’ll help, but I made a launcher that can launch BGE games with change-able settings (i.e. different resolutions, anti-aliasing settings, etc.). It’s called BlendSling, and you can find it in the Resources section.

It looks great but not sure if it will work for my 2.49 program. I also like that u can get rid of console.

digiman

I don’t think it will work for 2.49 as it’s built with a 2.6 version of Blender, though I’m not 100% sure. Porting the script to 2.49’s Python shouldn’t be too difficult. Otherwise, maybe you should just try changing the framing settings for each scene in your blend file. Extend will display more of the game screen as necessary, scale will stretch the game screen to fill the window, and letterbox will add black bars between the game screen and the window.

Expose might be the best suggestion though i would have to extend my scene a bit more so any res should be able to play it. Thanks

digiman

This is the code I use to change the resolution. It’s on a tiny Blender loading runtime that runs first, then launches the full game with the resolution of the screen.It was built for Blender 2.45 so it should work with 2.49b.

import osdef resolution():	try:		from win32api import GetSystemMetrics		width = GetSystemMetrics(0)		height = GetSystemMetrics(1)		if "windowed" in GameLogic.ini_settings and int(GameLogic.ini_settings["windowed"]):			return [" -w -p 0 0 " + str(width - 10) + " " + str(height - 65) + " game.exe"]		else:			return [" -f " + str(width) + " " + str(height) + " 32 60 game.exe"]	except:		return [""]os.execv("game.exe", tuple(resolution()))

You can see from the ini_settings variable that it can be launched in a window too.