[…]
What gets me is, q3 ut 2003 etc can get 150+ fps with all that
stuff going on and I can match them without anything being drawn at
all Should I just start with opengl and hope my fps will grow ?
The difference is hardware acceleration. The problem isn’t really the
video cards, but the APIs and driver architectures. 2D rendering is a
huge mess; many APIs (on average two or three per platform, from what
I’ve seen), poor drivers, and architectures that are not suitable for
the kind of stuff SDL is meant for. You can’t even count on plain
rectangular blits being accelerated, even if you do everything right.
These days, 3D is what it’s all about. 3D games make people buy video
cards. Software rendering is ignored by h/w designerns, so touching
VRAM with the CPU only gives you a tiny fraction of the maximum PCI
or AGP bandwidth. The quality of a driver is measured in terms of
OpenGL and/or Direct3D performance. All significant API
standardization efforts are aimed at 3D rendering. OpenGL is
available for pretty much anything with graphics, while there is
nothing like it for 2D rendering, that would work well with
accelerated drivers.
So, yes, if you need that kind of performance, you need h/w
acceleration, and then your best bet is to use one of the de-facto
standard 3D APIs; OpenGL or Direct3D.
If you’re interested in other platforms than Windows, the obvious
choice is OpenGL, since Direct3D is not available on anything but
Windows. If you’re going to sell something for Windows and want to
maximize sales, you should probably support both, for three reasons;
1) Microsoft want everyone to use Direct3D, so some
versions of Windows come with accelerated drivers
for Direct3D only. Users are on their own if they
need accelerated OpenGL, which may be an issue for
less hardcore gamers.
2) Some video cards don't have OpenGL drivers at all.
3) In some cases, the Direct3D drivers are faster
and/or more solid than the OpenGL drivers.
If you don’t want to code directly towards both OpenGL and Direct3D,
you might get away with an OpenGL-over-Direct3D layer of some kinds.
There are both free and commercial solutions, although it seems that
it’s more common for commercial games to implement higher level
layers for maximum performance with both APIs.
If you don’t want to code to a 3D API at all, and want relatively fast
(ie much faster than s/w OpenGL) 2D rendering as an extra bonus, you
might try glSDL, which implements the SDL 2D API on top of OpenGL:
http://olofson.net/mixed.html
It’s a compile time wrapper rather than a real backend, and there’s no
Direct3D support, but it might be handy if you want your 2D game to
run at all without 3D acceleration without coding for two APIs.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
— http://olofson.net — http://www.reologica.se —On Saturday 12 April 2003 08.42, David wrote: