Blitz3D supported resolutions

Blitz3D Forums/Blitz3D Beginners Area/Blitz3D supported resolutions

Makis(Posted 2011) [#1]
Hi
I'm new to game programming and i have a simple question to ask!
Can Blitz3D support resolutions below 640x480 in full screen mode? If i set the resolution to 320x240 i get an ''unable to set graphics mode'' error.
Any help?


GaryV(Posted 2011) [#2]
B3D can likely support 320x240, but the chances are that modern hardware can't.


Floyd(Posted 2011) [#3]
I'm not sure if I was ever able to set a 3D mode of 320 x 240, but I definitely used it in 2D. I think I even used 320 x 200.

That was all in the distant past. Now 640 x 480 is my minimum. That must be a hardware or driver limitation.

In fact I just tried Blitz3D in 640 x 480 and it looked surprisingly non-horrible, but much worse than native LCD resolution.


Makis(Posted 2011) [#4]
I'm aiming for a Freescape Engine look and at resolutions from 640x480 and above the graphics look very clean with no jagged lines, as AA is applied on. Can't describe it better than that:(

Last edited 2011


Yasha(Posted 2011) [#5]
You can take a look at which modes Blitz3D supports with the CountGFXModes and CountGFXModes3D commands, then iterate through them checking their width and height (see the 2D\Graphics and 3D\GraphicsModes chapters of the command index). You need to count the modes first or the list won't exist.

Blitz3D itself has more or less no limitations on what it can create (it can go as low as 1x1 in windowed mode). The upper limit is 2048x1536, which presumably doesn't interest you much right now.

As for what you actually want to achieve, perhaps you could do something similar to this? http://superfriendshipclub.com/forum/viewtopic.php?f=4&t=117#p1324

What that person's done more or less translates to:

1) Set the graphics mode to whatever the user wants, because it's largely irrelevant

2) Have a 3D scene camera with the viewport set to the ultra-low resolution you want; render the scene to the corner of your screen

3) Create a quad and position it the correct distance in front of a second camera so that it fills the screen (this is something of an art, but experienced Blitzers do this a lot, don't worry). It needs to be fullbright and so on. Apply a texture of the resolution you want to the second quad.

4) Now your render cycle is:
-- Hide the quad and its camera. Show the world and the world camera.
-- RenderWorld, no flip
-- CopyRect from the world camera's viewport on the backbuffer to the quad texture
-- Hide the world and world camera. Show the quad and quad camera.
-- RenderWorld
-- Flip

...and that will draw a low resolution to any size of screen.


Unfortunately, the result will be really ugly and blurry due to bilinear filtering trying to smooth the output texture. The only easy way to turn this off is with a DirectX 7 library, and the only one of those that I personally know will work is FastExtension from MikhailV, which costs money (although it's the princely sum of $12 for an immense amount of power - well worth it to get the most out of Blitz3D). There is at least one free one as well (ask GfK).


Makis(Posted 2011) [#6]
Thanks Yasha,i'll have a look into these.


Kryzon(Posted 2011) [#7]
I'd change this point in what Yasha listed:

"Apply a texture of the resolution you want to the second quad".

The texture needs to be just slightly bigger than the low-viewport you're using. By using, for instance, CreateTexture(320, 240), Blitz3D will create a texture with the next biggest power-of-2 numbers it can find (512 x 256). You don't need more resolution than that.
This way, when you render the high-res camera, that low-res texture won't have a 1:1 match to the screen (which will have a much bigger resolution), and so the hardware will have to filter\up-scale this texture out.

To prove my point:



Kryzon(Posted 2011) [#8]
Managed to remove the Magnification filtering, thus giving that jagged look like in that other forum.

You need these libs: DX7-Libs_for_Blitz3D.ZIP
- Download the package.
- Extract only dx7Test.DECLS and dx7test.DLL to your "Blitz3D\Userlibs\" folder. I don't really remember which goes with which (there are several versions inside), but try to match the two with the biggest filesize.

- Open the Blitz3D IDE and paste the following:

Updated code without filtering (or in other words, filtering set to Nearest-Neighbour = jagged look):


Last edited 2011


Yasha(Posted 2011) [#9]
Nice catch on the texture size, I always forget that the sizes can catch you out.

...and a really great example! (I'm a bit embarrassed now - I had the right DLL all along and never knew how to use it...)

As far as I know this is the first time someone's solved this problem (that gets asked about constantly) without using the proprietary FastExtensions, right? If so, this example makes a really nice and simple default answer that we can link people to in future. Perhaps worth your time to promote it to the code archives.

Thank you!


Kryzon(Posted 2011) [#10]
Oh, don't be! I had no idea how to use this DLL either. It was thanks to someone who posted the original .bb code example that came with the package that I was able to know the values this userlib uses (the code uses an older version of this DLL, but the constants are the same and the use is still similar).

Originally written by Tom "Speed":


See yas!


D4NM4N(Posted 2011) [#11]
b3d can support both 320x200 and 320x240 but only on the hardware that can take it. I have an old intel laptop somewhere that could do them, but it looked bloody awful :D
(i think they may only be 16 bit modes as well.. not sure about that)

Last edited 2011


Osoko(Posted 2014) [#12]
@Yasha : The upper limit is 2048x1536

Do this means that blitz doesn't work on the new UHD resolution ?