[SDL] sensible optimization [was re: tile based _junk_]
rival at Nayzak.com
Thu Aug 19 16:18:10 PDT 1999
> Ahem, how were you regenerating the screen every time? In one
> assembly-coded long linear write to the screen buffer (the kind of
> sensibly optimized 2d engine I was talking about), or unoptimized C
In your first message, you say not to use assembly code because it's not portable
(which was grossly patronizing, since there's not one person on this list who
doesn't know that) And now you're saying I should use it?
> If you haven't made a near-optimal full-regeneration version, how can
> you claim another strategy is better? The truth is that you are
> comparing an unoptimized engine to an optimized one, nothing more. This
Like I said, my engine origionally regenerated the whole screen. I couldn't get it
at a reasonable framerate. I understand what you say about sacrificing speed for
more cool effects, but not everyone has a fast enough computer for that.
> To reiterate, I have never said that optimization is bad. I do,
> however, believe that reusing the unused parts of the screen is a bad
> optimization; it limits you to modifying only small parts of the screen
> at a time, so you can't have animated tiles or hundreds of sprites on
> the screen.
If you have an animating tile on the screen, you just keep track of it, and update
it when necessary. And even in StarCraft you rarely ever have 100 sprites on the
screen, and when you do, it's slow! Even games like tetris have an inconsistant
> BTW, you don't actually think that you're really running at 150 fps, do
> you? If nothing else, your monitor can't keep up with that.
See? Very patronizing...
Listen, take a look at my code AND THEN tell me what's wrong with it. I can tell
you one thing wrong, it redraws the screen everytime you move out of a 640x480
screen, there's a more efficient way to do that, and I know what that is, and I'll
implement it later. I truly do wish that you were right, I want to be able to
redraw the whole screen every time. It makes things MUCH easier. But the only way
I've seen to attain this is to assume the video card has (good) 2D acceleration,
and I have no intention of that. I would like this to run reasonably fast on a
My code -= http://www.Nayzak.com/~jerryma/rival/emotion.cpp
-= aaron p. matthews
More information about the SDL