Prevent Incompatibility

Blitz3D Forums/Blitz3D Tutorials/Prevent Incompatibility

jfk EO-11110(Posted 2009) [#1]
Please help me to write a list of things that became incompatible with new versions of windows and/or Graphics card drives etc.

>>>Alpha Bug:
Never load a texture with Flag "2", always use "3" instead (basicly: if you want alpha, add the 1 Bit!). On XP sp2 and later using 2 without 1 may crash on a wide range of graphics cards. Funny thing: Bit 1 should be set by default, even if you haven't got it in your flags, but actually it's not.

>>>Dropped Support for BMP in DirectShow.
It seems since SP3 a blitzapp crashes when you display a BMP using the PlayMovie etc. commands.


jfk EO-11110(Posted 2009) [#2]
>>> 2D-Drawing (Plot, Text etc.) directly to a Texturebuffer fails on a number of machines. Better draw to the backbuffer, then use Copyrect to copy to the Texturebuffer.


>>>PlayMusic can play only 500 Sounds. In a system with eg. Character Voice output and Dialog System you may easily reach this limit. Compared to PlaySound with PlayMusic you don't have to free the sound after usage, wich would be nice, if there wasn't the 500 Sounds Problem. It's possible to write s litte Substitute for PlayMusic, using PlaySound. Simply store the Sound handles in an array and then frequently check all sounds of the array using SoundPlaying, and remove Sounds that have ended, from memory and from the array.


BIG BUG(Posted 2010) [#3]
>>> ImagesCollide and ImageRectCollide cause MAVs on several machines due to incompatibilities with some graphic drivers. The problem: It happens sporadically. So it might work well 50 times but crash on the 51st.
Use mathematical calculations or ReadPixel instead of those commands.
Substitute routines can be found here:
http://www.mein-murks.de/quellcode/ImgCollReplace.bb

>>> LoadTexture and CreateTexture don't work properly on Intel graphic cards if the Color-flag is not set. This problem occurs also, if the Mode parameter is not used at all.
So you have to set this flag manually, even in combination with other flags.
Examples:
Use "CreateTexture(64,64,1) instead of "CreateTexture(64,64)
Use "LoadTexture("b.png",3) instead of "LoadTexture("b.png",2)


jfk EO-11110(Posted 2010) [#4]
Thanks Big Bug. You second Description is the same as the one I called "Alpha Bug". I wasn't aware that it happens with other Flagsets too, I mean other than Alpha-blending.

One more thing: I found it impossible to create a Alpha Texture by Code (for a shadow Blob) for some reason, on one of my computers, and not on the other one, even with the Color Bit set explicitely, as described. So I had to load a prerendered Texture instead.


jfk EO-11110(Posted 2011) [#5]
>>>Try not to use Sprites at all, some systems seem to be almost unable to handle it (at least some people reported the framerate going from 0.3 up to 60 or so, after the sprites in a certain game where replaced by quads.) There is an example in the code archives, on how to replace the Sprites in a rather painless way.

>>>Negative Amount of VideoRam bug: some systems will return a negative Amount of Vram, due to a strange DirectX bug. If TotalVidMem() or AvailVidMem() does return a negative value then you may assume it is a system in the vista to win7 area, usually shipped with at least 256mb or more. So far I cannot see a way to determine the true VidMem in this case, so I just assume the user has plenty of it.

Last edited 2011


Imperium(Posted 2014) [#6]
Sprites cause major issues on Windows 7 machines but I'm not sure about Win8. Also if you have a computer that is labeled a workstation your FPS may be a lot lower than expected because such 3d cards in those systems are not designed for gaming.