[…]
| > I’ve been reading all the fun about how X doesn’t give you hardware
| > surfaces, and timing problems, etc.
|
| Actually, it’s not as bad as it may sound - as some people don’t even
| seem no notice the difference!
I wrote a really simple Snake game, and there’s a noticeable 'jerk’
every few seconds. That’s the Linux scheduler doing its thing, isn’t
it?
Probably. Depends a bit on what’s running in the background on your
system. (That is, what is being kept away from the CPU by your game -
until the scheduler decides it should be allowed to breathe.)
| You have to know that a few of the persons discussing this (me
| included) have extremely high demands on smoothness in animation,
| compared to the current standards.
Yeah, I’ve seen the Amiga demos that show full-screen smooth scrolling
too
Well, I’ve actually seen that kind of stuff - including overscan
scrolling even on the C64.
Either way, both machines had hardware scrolling. We do not - but then
again, h/w scrolling is pretty limited anyway, unless you have multiple
layers like on some arcade machines and consoles. (Right the Amiga had
two, and could be “tricked” into generating a third layer, but that would
reduce depth to 8 colors… heh)
| Call us “relics of the PAL/NTSC graphics era” or whatever - I still
| maintain my position that things should improve over time, not the
| other way around.
Well things should improve. If a cranky old Atari ST with a 16Mhz cpu
8 MHz, actually. (Well, I had an STE once…)
can draw smooth animations, so should my 500Mhz Celeron.
Yeah.
| > I’ve also read you can make OpenGL do 2D projections, and something
| > about making your games out of lots of quads (or triangles).
|
| Actually, OpenGL solves only one of those problems: Speed. Still no
| retrace sync.
The NVIDIA drivers (which have now a nasty habit of totally crashing my
PC every morning) have a retrace-sync environment variable you can set.
Yep, I know.
| > Does anyone have any recommendations on which I should use? Plain
| > old 2D stuff, or OpenGL?
|
| If you don’t know your ways around OpenGL, it might be a good idea to
| use SDL’s 2D operations for starters. They’re easy to use, and
| provide quite decent speed, as long as you stick with sensible
| resolutions, or minimize the screen area you update every frame.
I think I’ll try normal 2D SDL. At least until NVIDIA fix their X
server. 640x480x8bit is a sensible resolution, isn’t it?
Perhaps, but you have to be aware that
* ...you probably won't get 8 bits on most systems
(more likely 16 or 32)
* ...that anything more than 8 bits in 640x480 will be
rather slow on some platforms, including Linux, unless
you can get away with updating less than about 50% of
the screen area per frame.
* ...there's no way that 640x480 full screen animation
will run at a playable speed on a Pentium [MMX].
Celeron, P-II or better is needed.
* ...that alpha blending and 8 bit modes don't really
mix. (It's theoretically *possible* of course, but
AFAIK, SDL doesn't bother.)
320x240 reasonably fast on practically anything, but of course, it’s a
very low resolution for modern monitors, and some targets don’t even come
with such a mode. Has to be added manually by the user, or he/she will
have to put up with a small box in the center of a 640x480 screen.
That said, Kobo Deluxe is a 100% 320x240 game, and just scales the
320x240 graphics to higher resolutions. I can’t really recommend creating
a serious new game project with lots of graphics in 320x240 these days,
but for a smaller project, it’s an easy way to get decent speed on all
targets.
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
-------------------------------------> http://olofson.net -'On Tuesday 19 March 2002 10:39, James wrote: