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.

DarkBASIC Professional Discussion / Screen and pictures - Resolution problem - 32bit not supported

Author
Message
Tank202
14
Years of Service
User Offline
Joined: 23rd May 2012
Location:
Posted: 12th Nov 2012 21:43
Hello, my game was made using 1280x1024 32bit resolution but when i have tested it on a group of computers, I noticed a problem - the program wouldn't work and tell me that 32bit is not supported. The problem is resolution and i need to somehow make it smaller like 1024x768. If I make it 1024x768 then part of the game would be hidden and I can't let it happen. How do I achieve this by resizing window or camera or wathever else?

BTW: My game has over 1200 pics so image resize is not possible.
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 13th Nov 2012 09:45
Unfortunately this is just one of those things you have to design for, either with multiple resolution images, or by using sprites so that you re-size/position the images in real-time to fit the current resolution. DBPro doesn't have a magic "re-size everything for me" feature. For 3d it isn't a problem as the viewport (what the camera renders to) is created to the same size as the window and will automatically render at the correct size.


Previously TEH_CODERER.
Zwarteziel
15
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 13th Nov 2012 10:12
Are you sure it's the width and height that cause the error? Judging from your message, it could also be the bit-depth of the monitor. I suggest setting this to 24 instead of 32 and re-test your code on the PC's that gave you problems. (You might have to convert your game's graphics to make sure they still look good).
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 13th Nov 2012 10:49
There is no reason to not use 32 bit. If you attempt a screen resolution that isn't supported by either the monitor or GPU, DBPro will report that "display at 32 bit not supported by available hardware" or something very similar. It is maybe a little misleading, but it is the width and height you want to adjust. As an example, try "set display mode 4096, 4096, 32". You will get that same error. Changing to 24 bit won't fix that.


Previously TEH_CODERER.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Nov 2012 11:14
Tank202 - were you using any form of virtualisation or remote desktop by any chance?

These often force 16-bit displays...

Tank202
14
Years of Service
User Offline
Joined: 23rd May 2012
Location:
Posted: 13th Nov 2012 18:07
I am sure its resolution because today I've tried to run my project on 1024x768 32bit and it worked. No, its not BIT problem.

I have already succeded to semi-fit the game resolution to the users screen (run game in 1280x1024 and then set window on and maximize it), but it doesn't make much of a solution to the error.

The last hope I think is camera. So, can I resize or remap camera view
rendered on the screen ?
Zwarteziel
15
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 13th Nov 2012 22:54
Well, you might want to try SET CAMERA VIEW. From the DB-helpfile:

Syntax
SET CAMERA VIEW Left, Top, Right, Bottom
SET CAMERA VIEW Camera Number, Left, Top, Right, Bottom

Description
The viewport is the actual area on screen where all 3D is drawn. The default viewport area is the entire screen, but can be specified using this command. You must specify the screen coordinates using integer values.
Tank202
14
Years of Service
User Offline
Joined: 23rd May 2012
Location:
Posted: 14th Nov 2012 16:58
Well I've tried SET CAMERA VIEW but it didn't work. I think it is because this command works only for 3d content. I mean DarkBASIC 2D commands probalby use DirectDraw API.

Any other suggestions?
Zwarteziel
15
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 15th Nov 2012 08:10 Edited at: 15th Nov 2012 08:11
Several thoughts crossed my mind. First, it's a little strange that a SXGA resolution of 1280x1024x32 wouldn't work and you have to revert to XGA 1024x786x32. Both were developed in the 1990's. I don't think your test-systems are that old, right?

Second, there are several graphic modes you can set in the IDE when compiling. A program can run in Fullscreen, Windowed, Windowed Fullscreen or Windowed Desktop. Experimenting with some of the Windowed modes might help: even if the max resolution is 1024x786x32, a 1280x1024x32 program should be able to run instead of crashing.

Third, how are you setting your display at the moment? Do you have a function or routine in place that checks if the preferred settings are available? If not, you could try building it using the 'perform checklist for display modes' and 'checklist quantity()' commands. The DB-helpfile lists some stuff that can give you a good start.



Last, you can modify the above code to make a program run at the maximum allowed resolution. You can then implement a percentage based resolution in which you tell sprites to 'appear at 10% of the X-resolution and 56% of the Y-resolution' etc. This will assure your game will run in the same manner on all kinds of systems.
Tank202
14
Years of Service
User Offline
Joined: 23rd May 2012
Location:
Posted: 15th Nov 2012 18:45 Edited at: 15th Nov 2012 18:57
Thank you Zerotown for your ideas. But I have a limited period of time to make the game and image coordinate managing would consume to much time to manage.
//BTW: All my games drawing system work depends on pixels so I can't do anything with images, I think.
Another thing, My test-systems are the opposite of old. In fact, those computers are even better than mine.

Login to post a reply

Server time is: 2026-07-08 03:02:39
Your offset time is: 2026-07-08 03:02:39