25 February 2008

Problems with OpenGL implementations

For this update, we are having 3 major new (new as in for EL) OpenGL features:
1. Using vertex programs to render the actors.
2. Using a different selection mode to determine what we have under the cursor.
3. Pixel shaders for the water.

The first two features can increase the frame rate a lot, as I posted before, so it is very important that we can use them in this new client.
Unfortunately, there are a few problems with different OpenGL implementations.
OpenGL is a standard, and it mandates how the programming interface with the video hardware is done. It's not very flexible in terms of the API used, so, in theory, all the video cards that are OpenGL compliant should be 100% compatible, although they don't have to support the same set of features.

The problem is that many video drivers from the major 3d card makers (Intel, NVIDIA and ATI) have problems. Usually, older drivers have more bugs than newer drivers, although this is not always the case.
Some of those bugs are pretty bad, where even if your program respects the OpenGL specifications, it can still crash due to an error in the driver.

If a new player downloads the game, he or she might not have the latest video driver, so it is important that the client detects their specific driver version, checks to see if there are any problems with it, and if so, disables the features that will cause problems.

Xaphier proposed to have an ini file where we can store which OpenGL extensions must be disabled for each video card manufacturer and each driver version.
The problem is, there is no standard way to find out the driver version, so we must rely on the OpenGL Version string returned by the video driver. Sometimes the driver version is there, and sometimes it is not. We asked our players to post some information about their video cards, and then based on that information we might be able to compile that ini file.

Once we are done with it, we will be able to use the auto update feature to constantly add new information in the ini file, so in case a new driver will missbehave we can maybe solve the problem 'on the fly', without a whole client update.


Anonymous Anonymous said...

Interesting article(s) Ent. Just a little note about the editors: I've been using Oxygen for a while, it's very powerful and cheapish (gift license from a friend) but proprietary.

Recently I stumbled on XML Copy Editor (http://xml-copy-editor.sourceforge.net/), a feature-complete, free software (GPL license) editor available both for Windows and Linux; the author is very friendly and open to suggestions, feature requests, etc. Well worth a try.


4/3/08 10:09  

Post a Comment

<< Home