What API do 2D MacOSX games use?

Member
Posts: 469
Joined: 2002.10
Post: #46
Quote:Originally posted by Patrick
On older macines without graphics acceleration, QuickDraw will blow away OpenGL - I've noticed that software opengl has a terrible rendering speed. Some people still use iMacs/old powerbooks and the Rage IIc/Rage LT Pro chips in them don't support GL well AFAIK.

If your game doesn't need fancy GL effects, I'd think it would be better to go with QuickDraw for maximum compatibility. Just my two cents.


I dunno, I consider both of my systems old:
450Mhz PowerMac G3 B&W (16MB rage128)
500Mhz PowerBook G3 firewire (8MB agp rage128)
and OpenGL runs fine.

I can't imagine getting anything done with older systems, just getting around in Mac OS X would be slow, never mind gaming.

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Member
Posts: 31
Joined: 2004.09
Post: #47
Regarding the blurry look of many games, notwithstanding the issues regarding texture coordinates and an apparent rendering bug, keep in mind the following simple but oft unregarded fact:

if you are playing on an LCD screen, and you (or the application) chooses a non-native resolution, then the resulting screen image will be interpolated. This is really bad news for image quality.

For example, if you you are playing game X on your new iBook 14", at the native resolution of 1024x768, but you choose a fullscreen game mode of 800x600 (or, god forbid, 640x480) for reasons of speed, then the image is going to look absolutely lousy.

This isn't really an issue with OpenGL, at least not in this instance, but with the hardware and what the OS can do with it.

Switch to windowed mode (if possible) and hey presto, the game suddenly becomes sharp and clear (assuming of course, that you are running in a native resolution for your display device). Obviously, this is not always desirable but it does show that OpenGL can render sharp, pixel-perfect graphics.

Of course, if a game consists almost entirely of tiny textures overstretched on large polys, that doesn't help the overall aesthetic either. Wink
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #48
Quote:Originally posted by Patrick
On older macines without graphics acceleration, QuickDraw will blow away OpenGL - I've noticed that software opengl has a terrible rendering speed. Some people still use iMacs/old powerbooks and the Rage IIc/Rage LT Pro chips in them don't support GL well AFAIK.
I have a beige G3 with a Rage IIc running Mac OS X and OpenGL is still faster than QuickDraw.
Quote this message in a reply
Patrick
Unregistered
 
Post: #49
I guess it's just on Wallstreet and Lombard Powerbooks then, that OpenGL would be slower ( those machines have no graphics acceleration under OS X )

I thought I had read that the Rage IIc only supported RAVE, but perhaps OS X or one of the Classic iterations added opengl support.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #50
It doesn't have accelerated OpenGL, but it can still do OpenGL. I'm suprised QD is slower on your Wall Street...
Quote this message in a reply
Member
Posts: 233
Joined: 2003.05
Post: #51
Quote:Originally posted by kelvin
[b]ok, just to answer the big blurry 2D opengl thing:
In CocoaBlitz I use
Code:
gluOrtho2D(0, THE_VIEW_WIDTH, 0, THE_VIEW_HEIGHT);
to make all my pixels sharp.

I've noticed that CB doesn't seem to have the blurry/soft look but I haven't been able to verify that gluOrtho2D is THAT different from glOrtho2D.

In my programs (which are currently broken due to some change in OSX/SDL I haven't had time to figure out yet) I use glOrtho2D with the extra z range numbers. Are you saying that using gluOrtho2D makes the difference? I really wish my code was compiling right now because it would take 2 seconds to confirm on my own! Sneaky

Is it possible that using Cocoa has anything to do with it? (Seems unlikely, because it's using OpenGL the same way Rasp )

Anyway, if anyone can confirm for me that using glOrtho2D instead of gluOrtho2D is what causes the bug, I would be very grateful. Love

Also, I'd like to see that tutorial someone mentioned they were working on. Smile Mostly, I'm curious to see if any of these little problems pop up. Is that still in the works? Smile

Aaron

"Pay no attention to that man behind the curtain." - Wizard of Oz
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #52
could it just be that people are using 0,640,0,480 instead of 0,639,479 like they SHOULD be using Rolleyes None of my games have suffered from "soft pixel" look" check out SitS in another thread, my tile engine is sharp, crisp and smooth
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #53
Quote:Originally posted by skyhawk
could it just be that people are using 0,640,0,480 instead of 0,639,479 like they SHOULD be using Rolleyes None of my games have suffered from "soft pixel" look" check out SitS in another thread, my tile engine is sharp, crisp and smooth


This is wrong, check the redbook spec (appendix H):

Quote:If exact two-dimensional rasterization is desired, you must carefully specify both the orthographic projection and the vertices of primitives that are to be rasterized. The orthographic projection should be specified with integer coordinates, as shown in the following example:
gluOrtho2D(0, width, 0, height);

I bet that you simply aren't noticing that your pixels are slightly off. Try using a black and white checkerboard and zooming in with Pixie.

I invite you to download the sample I gave Apple, at
http://homepage.mac.com/arekkusu/bugs/gl...exact.html
and see if you can get it to display perfectly sharp. None of Apple's sample code can do it.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #54
0-512 is 513 pixels.... count them if you must.

Here is what I did:
I made a 800x600 window
I made a ortho view in it 0,799,0,599
I drew in it.


My view is COMPLETELY crisp.
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #55
Quote:Originally posted by skyhawk
My view is COMPLETELY crisp.


(downloads SitS007)

Well, yep, it looks crisp. But I wonder if you've got linear filtering turned on. And I bet you draw each tile into the viewport separately. What happens if you draw them all to an offscreen context, and then use that context as one big rectangle texture?

To see what I mean, download "TileScroller 02-15-2003.dmg" from
http://homepage.mac.com/arekkusu/FileSharing1.html

Turn off the block filtering and lighting (f, l). Now, it looks sharp at first glance but take a close look at the bottom right corner with pixie. It's smudged.

The problem is worse when you use linear filtering and large rectangle textures. Apple has no fix yet.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #56
>>Well, yep, it looks crisp. But I wonder if you've got linear filtering turned on.
no
>> And I bet you draw each tile into the viewport separately.
you mean I draw my quads on the screen? yes, since everything is double buffered in OS X, why would I want triple buffering? a friggin waste of speed. All my quads are drawn in 1 for loop... 1... bada bing bada boom K.I.S.S. Smile

>>What happens if you draw them all to an offscreen context, and then use that context as one big rectangle texture?
if you use the proper coordinates and stuff LIKE I TOLD YOU, then everything would look fine

>>To see what I mean, download "TileScroller 02-15-2003.dmg" from
http://homepage.mac.com/arekkusu/FileSharing1.html
Didn't run, Whined about no rectangle texture. Sorry, but that gets a pathetic in my book. Mad

>>Turn off the block filtering and lighting (f, l). Now, it looks sharp at first glance but take a close look at the bottom right corner with pixie. It's smudged.
then stop doing it your way and do it mine?

>>Apple has no fix yet.
I don't believe apple is the problem
Quote this message in a reply
Member
Posts: 233
Joined: 2003.05
Post: #57
Quote:Originally posted by skyhawk
0-512 is 513 pixels.... count them if you must.

Here is what I did:
I made a 800x600 window
I made a ortho view in it 0,799,0,599
I drew in it.


My view is COMPLETELY crisp.


If that is all it takes, then Blush ! It does make a good amount of sense that it would cause the exact problem we are having. As much as I'd feel stupid I really don't care as long as it works!

Arekkusu did you try using the 0 to max-1 as opposed to 1 to max?
Please confirm this. It's killing me that I can't compile right now. I'll just have to dig back in to my code. Sneaky

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.

Also It should be stated that another thread has been started about Allegro, another cross platform API (besides SDL) that is a 2D engine just being converted to OS X. Cool That's a lot more on topic than the rest of the discussion going on in this thread. Sneaky Rolleyes

Should we start a new thread about making OpenGL work as a 2D engine? Shock Or should we keep all this information locked away where no one will see it? Ninja

Aaron

"Pay no attention to that man behind the curtain." - Wizard of Oz
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #58
>>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
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #59
Quote:Originally posted by skyhawk
>>I wonder if you've got linear filtering turned on.
no
>> And I bet you draw each tile into the viewport separately.
why would I want triple buffering?

Perhaps your application doesn't need it. But more complex games might want to:

* Scale, rotate, shear, distort playfield elements or sprites. You want filtering for this.
* Reuse rendered playfield elements multiple times in once frame for effects. Heatwave, mirrors, feedback, etc. You need to render offscreen to do this (not quite the same as triple buffering.)

Quote:if you use the proper coordinates and stuff LIKE I TOLD YOU, then everything would look fine

Actually, it still doesn't.

Quote:Didn't run, Whined about no rectangle texture. Sorry, but that gets a pathetic in my book. Mad

Ah. Well, perhaps try again when you get a new Mac capable of Quartz Extreme.


Quote:Originally posted by aaronsullivan
Arekkusu did you try using the 0 to max-1 as opposed to 1 to max?


Yes, I investigated this quite heavily six months ago including asking Geoff Stahl about it. The bug is still open.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #60
well at least fix your "bug" page so it looks like you know what you are doing, your bug page clearly shows that you are sticking a 512 pixel sprite into 513 pixels

as for motion blurring and needing to write to a "third buffer", it would not cause this problem.

So far, if you claims this problem exist even after I told you to fix the coordinates then.

1) this problem is unique to you and a few others who are doing exactly what you are doing wrong

2) I recommend you change what you are doing. cause goshdamnit, I'm not going to rewrite your engine to show you how to fix it. Way too much work.

>>Ah. Well, perhaps try again when you get a new Mac capable of Quartz Extreme.

End of summer. and what is so advanced about this game that it requires such a high end mac? Shock
Quote this message in a reply
Post Reply