Author Topic: Random crashes  (Read 2852 times)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Random crashes
« Reply #15 on: April 26, 2010, 01:15:21 pm »
PlaneShift uses only OpenGL (to be compatible with several operating systems, not only Windows). If there are any DirectX functions used, then only where OpenGL support might be limited by Windows.

PlaneShift only uses funtions provided by the CrystalSpace 3D engine. So there are two possible limits compared to a highly optimized 3D game & engine: a) The rather generic CrystalSpace 3D engine has its limits; b) PlaneShift does not yet use all possible features of the current CrystalSpace 3D engine version, because it is not easy to adapt a whole game to major changes of the underlying engine, which is as much in development as the game itself.

A game is not fast only because it uses a specific level of 3D API features. To be efficient, it has to use most to all available features the API and engine provide to not waste too much rendering time. Even the structure of the content may need a specific design for specific speed-up technologies (e.g. to use "binary space partition", a city map would need much more than just a set of meshes and textures).

And as much both the game and the engine are in development, as much are there twice as many possible reasons for crashes. Every development step introduces new bugs. Already targeting the reason in either PS or CS is a kind of art (e.g. "debug builds" often don't crash at all...).
« Last Edit: April 26, 2010, 01:17:41 pm by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Lux, The Janitor

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
Re: Random crashes
« Reply #16 on: April 26, 2010, 01:55:52 pm »
I see. Very informative, thanks.


Why not allow players to choose between DX & OGL on Windows machines, though? Running purely on OpenGL is a risky move, I think. Most of the software I've tried to run with OpenGL under Windows either loses a lot of performance or will not run at all while running it in OpenGL under Wine in a Linux environment (Kubuntu, in my case) with the very same computer actually increased the performance of the very same programs in several cases.

It could be that the bottleneck for PS in Windows isn't the engine (or even related to the game code at all), but the choice of method to process the graphics in an environment that doesn't really support OpenGL at all. (I realize that ATI & nVidia tries to maintain OpenGL support in their Windows drivers, but as far as I can see it's not working out too great)
I wouldn't be surprised of bad OpenGL support is a purposeful move from Microsoft either. After all, their DirectX is totally superior in every way imaginable. Completely. Right...

Have to stop now before I start a rant about Microsoft long enough to fill a novel.


[edit]: Might be good to know that the software I've tested usually run on DX & not OpenGL.
« Last Edit: April 26, 2010, 02:02:25 pm by Lux, The Janitor »

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Random crashes
« Reply #17 on: April 26, 2010, 02:06:20 pm »
I see. Very informative, thanks.


Why not allow players to choose between DX & OGL on Windows machines, though? Running purely on OpenGL is a risky move, I think. Most of the software I've tried to run with OpenGL under Windows either loses a lot of performance or will not run at all while running it in OpenGL under Wine in a Linux environment (Kubuntu, in my case) with the very same computer actually increased the performance of the very same programs in several cases.

It could be that the bottleneck for PS in Windows isn't the engine (or even related to the game code at all), but the choice of method to process the graphics in an environment that doesn't really support OpenGL at all. (I realize that ATI & nVidia tries to maintain OpenGL support in their Windows drivers, but as far as I can see it's not working out too great)
I wouldn't be surprised of bad OpenGL support is a purposeful move from Microsoft either. After all, their DirectX is totally superior in every way imaginable. Completely. Right...

Have to stop now before I start a rant about Microsoft long enough to fill a novel.
ati drivers tend to have a bad opengl implementation unfortunately as directx is a windows only api it's not a good idea to support it (time to code such a thing) also because it should be implemented on crystal space side where it would take a lot to reimplement all the g3d functionalities for directx (this excluding the fact you need also a directx expert) so far i know of no games which use directx and opengl chooseable but i might be wrong, most games which want to go multiplatform use opengl or use 3rd party engine which have support of only one api per platform (eg: unreal engine=> dx for windows and xbox, opengl for ps3).
unfortunately opengl 4.0 is on par with dx 11.0 so i'd not say this superiority but sure supporting old cards (using dx9 or ogl 2.x in place of dx10 ogl 3.3) is definitely a big performance gap for newer hw as many new techniques aren't possible, while it's a showstopper for old hw.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Random crashes
« Reply #18 on: April 26, 2010, 02:22:02 pm »
OpenGL does not need to be slow.

Compare e.g. with "Sauerbraten" (Cube²): You can get insane fps with this engine. All pure OpenGL. But so extremely optimized on octrees and space partitions that modelling a level is a completely different issue.

The decision to use CrystalSpace 3D was already done about 10 years ago. And it won't change next week.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Aiwendil

  • Guest
Re: Random crashes
« Reply #19 on: April 26, 2010, 07:21:35 pm »
...so far i know of no games which use directx and opengl chooseable but i might be wrong...
WoW offers rendering with d3d or openGL. I guess they needed the openGL renderer for the Mac and then packed it also in the windows version, so also a multi-platform decision. For the choose-able...Yes, not really. You have to edit a ini file to get openGL rendering, so not really a choice for most windows users.

And for me directX and openGL aren't really comparable. If you want to compare openGL to something then only to direct3D. OpenGL doesn't offer any functions for user input, network or sound. You have to use other libraries to get this. And not so sure about graphics anymore, I haven't looked much into openGL 3.0 specs and even less in 4.0 yet, so no idea if this changed, but at least openGL 2 didn't offer some mathematical functions like quaternions which direct3D has. Also openGL doesn't offer support for VIPM methods directX has as far as I know. OpenGL is really only a library for graphics while directX is an API that offers much more needed in games.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Random crashes
« Reply #20 on: April 27, 2010, 10:18:05 am »
- Google Earth offers both (switchable via start menu links) and prefers Direct3D (e.g. refuses OpenGL on an old S3 chipset).
- The "Tirtanium" benchmark supports both (and differences are sometimes ovbious).
- The OGRE engine supports both (selectable if no INI is present).
- The Vavoom Engine supports both (via launcher or CLI).

Some drawback of the DirectX system is that the different versions partially lack in compatibility among each other - you will have to chose either a specific DirectX Version level or support several API versions if you want to chose between compatible and up-to-date Direct3D features at runtime (which might not be a great issue with object classes and inheritance). OpenGL is a bit more flexible, it is possible to check for the support of extensions and to use them when available - but it is also a bit more abstract, while Direct3D offers a few more closely hardware related features.
« Last Edit: April 27, 2010, 10:21:29 am by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Jagefad

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Re: Random crashes
« Reply #21 on: April 29, 2010, 06:45:28 pm »


This is what I get. :(

But the crashes aren't so often anymore, it does lag all the time, but not so much crashes.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Random crashes
« Reply #22 on: April 30, 2010, 08:33:42 am »
Jagefad:

Those are hard to solve because they don't give any hint in which routine of the application it happened. And from my experience, debug builds somehow avoid those crashes. Sometimes they may be related to possibly unsafe CPU optimizations by the compiler. Sometimes they may be related to differences between the "shadercache" and updated art (then it might help to delete that file once, but at most once in a month).

Hint: Capture only the active dialog by pressing Alt+PrtScr. And sometimes you may even be able to copy its text by pressing Ctrl+C.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty