PDA

View Full Version : Game Performance



PompeyBlue
3rd July 2004, 03:49 AM
What's the relative CPU performance between linux & windows ?

I want to render 6 sided, texture mapped, shaded cubes on my GeForce2 card.

Will I get more cubes at 60fps from linux, or more from windows ?

I understand, there's LOTS of if's, but's, maybe's, but as a general, finger in the air test ?

Which will be faster for raw physics / AI / graphics power ?

David
3rd July 2004, 05:43 AM
It depends on those ifs, buts and maybes you were hoping to avoid! :p

I think Red Hat is one of the slower distros because of its all-round nature. If you had a tailored linux then I'm sure it would beat Windows hands down. That's why the film industry use Linux boxes. But for use on your PC there are other factors to consider too. Firstly, it's your GeForce 2 that's going to be doing the bulk of the work, so that means that the drivers are more important an issue. In this case go with Windows because the drivers are older, more stable, more reliable and probably better. Having said that NV is doing a great job in supporting Linux and their drivers aren't half bad. I'm sure they're fine for rendering cubes :)

But does it matter very much? I mean, above a certain threshold both systems are going to be more than adequate for a said purpose. I think it really depends on what your end goal is. What is it you're actually trying to achieve here? Are you hoping to do a spot of programming, or what?

PompeyBlue
5th July 2004, 08:49 AM
Hello,

So, I haven't really decided what to yet, that would depend on what sort of answers I got back. I want to write some kind of game software but my random thoughts are:

1. Online

Although linux is obviously well served for networking software there, rather suprisingly, doesn't seem to be any kind of NAT traversal solution. This would make peer to peer networked games a large undertaking. Client\server would be OK as long as the client recognised that they had to be outside of a NAT\Firewall box.

2. Graphics

The chromium demo runs at a snail's pace using the NV driver (although admittedly NVIDIA makes it run fine). As far as I can see it's only rendering a few sprites, and struggling with that. Is the graphics performance that dire ? The only other game I've seen is TUX racer which seems to run at a half decent frame rate but is not exactly pushing the graphics envelope. Should I be thinking 2d puzzle type game, or is 3d possible, if so how much 3d ? From what I can see a few textured polys seem OK, but not sure what else would be

3. CPU Performance

Nothing I've seen under FC2 seems to be pushing the CPU very hard. Is 3d collision detection \ rigid body possible ? Yes, it all depends on the code you've written, the integrator type, your world partitioning etc. Should I completely discount this, or is a 3d rigid body system feasable ?

4. Kernel

Just how good is this ? My experience of multi-threaded systems is that the multi-threading adds significant overhead to the code, LINUX is ment to excel at this, so should I think single threaded (i.e. no streamed world) or is multi-threaded fine ?

So given all this, I really don't know where linux stands, which means I'm not sure what I should be aiming for. I guess the best thing to do is to just measure it. Throw some transformations onto the screen to measure poly performance, and then throw some rigid bodies into a world in order to measure floating point performance. However, if anybody had undertaken something like this before and could share up the results then it means I could move onto the next phase of designing and implementing :p

Viro
11th July 2004, 12:04 AM
Hello,
2. Graphics

The chromium demo runs at a snail's pace using the NV driver (although admittedly NVIDIA makes it run fine). As far as I can see it's only rendering a few sprites, and struggling with that. Is the graphics performance that dire ? The only other game I've seen is TUX racer which seems to run at a half decent frame rate but is not exactly pushing the graphics envelope. Should I be thinking 2d puzzle type game, or is 3d possible, if so how much 3d ? From what I can see a few textured polys seem OK, but not sure what else would be



UnrealTournament 2004 runs fine on my machine with the ATI drivers. The open sourced xorg drivers aren't really good at openGL since they mainly rely on Mesa's software implentation of the OpenGL specification. Depending on your graphics card, the drivers may support OpenGL acceleration, or they may not.

If you do get OpenGL hardware acceleration, the speed should be about par with Windows.




3. CPU Performance

Nothing I've seen under FC2 seems to be pushing the CPU very hard. Is 3d collision detection \ rigid body possible ? Yes, it all depends on the code you've written, the integrator type, your world partitioning etc. Should I completely discount this, or is a 3d rigid body system feasable ?


Err... what does this have to do with the OS? Nothing. Its all to do with the hardware you have. So if it runs alright in Windows, it will run alright in Linux.



4. Kernel

Just how good is this ? My experience of multi-threaded systems is that the multi-threading adds significant overhead to the code, LINUX is ment to excel at this, so should I think single threaded (i.e. no streamed world) or is multi-threaded fine ?



Linux doesn't really excel at multi-threading. The New Posix Threading Library (NPTL) has recently been added to RedHat and that kinda solves things. But since its new, many programs don't quite support it yet.

On the other hand, Linux excels at multi-processing and is much better at this than Windows could ever be. So instead of using multi-threading, many times Linux programmers opt instead for multi-processing via the fork()/exec() combo which is a lot more elegant than either CreateProcess or CreateThread on Windows. IMHO anyway :-)



So given all this, I really don't know where linux stands, which means I'm not sure what I should be aiming for....

Floating point performance under Linux is the same as on WIndows assuming the hardware is the same. However, GCC seems to generate better code on linux than it does on Windows, so most of my research experiments in chaotic neural networks (very floating point intensive) tends to run faster on Linux. There shouldn't be any problems performance wise on Linux.

btw. You Malaysian? I'm asking because of the logo by your user name.

PompeyBlue
2nd August 2004, 11:15 AM
Thanks for all the info.
I hadn't seen this reply in the forums, and only just checked this thread again.

No, I'm not malaysian, this website should give you a clue!

http://www.pompeyfc.premiumtv.co.uk/page/Home