Quote:Originally posted by skyhawk >>BTW, having 100's of rotating, scaling, transparent, animating sprites at way over 60 fps is really nice. You can't do that without OpenGL on the Mac as far as I know.

EV Nova does it, but they do dirty rectangles and that is a complicated procedure

EV Nova has hundred's of sprites on screen? As in OVER 200 sprites? That scale? I know it has some transparency and it also uses pre-rendered animations to simulate rotation... but that's not true rotation and the sprites don't scale at all.

EV Nova uses a modified version of SpriteWorld, which has since been updated to use OpenGL for hardware acceleration.

Obviously, the game is still great.

I've never implemented dirty rectangles at a low level, but it's actually not TOO complicated. You just widen a rectangle to include any changed spots on the screen and update only that part in the buffer. (Or use multiple rectangles.) SpriteWorld does this for you "for free."

I like SpriteWorld but, Anders who did all the recent work with it has frustrating opinions about dealing with OS X. He doesn't like the fact that the API's are changing, and complains about buying new versions of the OS, but also doesn't consistantly support the FREE Project Builder, instead only making sure the expensive CodeWarrior projects work. BUT DON'T GET ME WRONG, he did incredible work on it, all for free.

Anyway, SpriteWorld was great when I was using it, and Anders has passed the torch on to someone (Ken) JUST before it came out of beta. It's been a long wait and I moved on as it isn't currently cross platform.

If you're interested in SpriteWorld check out the site. To find out the most recent info and where to get the latest version 3.0b2 check out the mailing list and just look at the archives.

Btw, let's keep it a bit more civil. No need to argue, just to figure this all out together.

Just wanted to point out that you are using examples from Apple code that you said DOESN'T look correct anyway. So... they are poor examples of how it "should" be done. :ohmy:

I'm still curious if either of you have tried the other persons' tests.

I'd be doing all the testing myself except: My Project Builder code is building everything fine and then gives me a nice big green checkmark next to the phrase BUILD FAILED. I check the "tree" using the contextual menu and I get a failure to create an object or something... I could use a hint on where that's coming from, since I haven't changed the actual code at all. I'll do a more specific post about it if I can't figure it out, but if it sounds familiar I'd love to hear about it.

No, the original version is correct. OpenGL's coordinate system just
just like the lines on graph paper, with pixel centers in the middle of
the squares. So if you were to draw a box surrounding the same number
of pixels as your window size, you can see that you'd want 0,w,h,0 in
his case.

Aaron

P.S. Am I allowed to do that? I'll have to check the list guidelines again. :ohmy:
P.P.S. It's customary to give a link to the lists where it came from:Apple Lists

Quote:Originally posted by Tycho All I can say is that if you're going to release a 2D game with requirements as high as Doom 3, it had better be one hell of a good 2D game.

Well, Doom 3, and I predict more and more 3D games after that, will be requiring vertex and pixel shaders to get the best visuals. That means Geforce 3 or Radeon 8500 or newer. And really, Geforce FX or Radeon 9700 for the real floating point pixel shaders.

A Radeon or Geforce 2 is already quite a low minimum requirement. Apple has the same requirements for Quartz Extreme, I don't think it's too much to ask for. Sorry if you feel otherwise.

Just using gluOrtho2D... well, that was an answer to the "big" blurry question. In other words, since the imagery matches the resolution, it shouldn't be scaled and aliased. That answered Carl's larger question, but there is another.

The more difficult problem is the slight pixel shifting that gives a soft look near the bottom right hand side of the screen.

Skyhawk's proposed solution:
gluOrtho2D(0,width-1,0,height-1);
In my program, I tried subtracting 1 from my width and height values (starting at 0) and it made the effect even worse.

Why does it work for his program? Well, I tried what arekkusu suggested in my program, (after removing my hack) and, indeed, turning on GL_Nearest filtering fixed everything. Except, that scaling or rotating would look awful! I'm assuming that, if Skyhawk turned on GL_Linear filtering in his program, he'd see the same ugliness in the corner of his window.

So, where does that leave us? It leaves us waiting for a bug fix. In the mean time, I'm using my old hack, which, as said before, works:
[SOURCECODE] if (destX > 300)
{
glTranslatef(0.05, 0.0, 0.0);
}

if (destY > 200)
{
glTranslatef(0.0,-0.05, 0.0);
}[/SOURCECODE]

The only problem with this, is that if Apple fixes the bug, the hack may CAUSE the effect it's supposed to fix... but I'm guessing it won't, since the offset is so small.

Quote:Originally posted by aaronsullivan So...
The more difficult problem is the slight pixel shifting that gives a soft look near the bottom right hand side of the screen.

This problem is very slight. It is most obvious when you use high-contrast images, and one large quad. It also has slightly different behavior between 2D and rectangle textures, and between ATI and nvidia hardware.

As you point out, turning off filtering is one way to reduce (but not completely eliminate) the problem. But you might require filtering to be on depending what you're doing.

Geoff Stahl at Apple recently implied an upcoming fix for this problem, so my advice is to just ignore it for now. Any tweaks you make could well break on future systems.

Quote:Originally posted by aaronsullivan etc. etc.
Just wanted to point out that you are using examples from Apple code that you said DOESN'T look correct anyway. So... they are poor examples of how it "should" be done. :ohmy:

I'm still curious if either of you have tried the other persons' tests.

That's true, the "correct" way to do it doesn't work. But that doesn't make an incorrect way any better.

I've tried many many incorrect ways. It's really a bug in GL. Hopefully fixed in 10.2.7, if not, 10.3.

Quote:P.S. I dig the icon with the Ultima dude from the Apple ][ version