Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Should a 2D tile-based map be rendered in 3D?

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Should a 2D tile-based map be rendered in 3D?
ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

With using opengl you get a lot of effects and capabilities for free. One that hasn't been mentioned is resolution independance and camera capabilities.

Who cares? User-base is more important.

Besides lets be honest, shes probably not a professional game developer (yet) and hence she probably wont need or use all that extra fancy stuff OpenGL lets you do.

And using OpenGL for a smaller project hurts your user-base. For a smaller project like this one user-base is probably more important.

Goalie Ca
Member #2,579
July 2002
avatar

Quote:

And using OpenGL for a smaller project hurts your user-base. For a smaller project like this one user-base is probably more important.

Weird. I never really thought about "my user-base". Sometimes i give them to friends, or just myself. I run mac, linux, some of my friends use windows. Opengl is really well supported and i'd be hard pressed to find a friend's computer that couldn't handle the level of graphics that my artistic skills currently consume ;)

-------------
Bah weep granah weep nini bong!

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

Opengl is really well supported

Ha! Thats funny... Really well supported by whose computers?

HoHo
Member #4,534
April 2004
avatar

Quote:

Really well supported by whose computers?

I guess his every friends computer supports it.

Even my ancient P1 from '97 did. For some reason I don't think there are a lot of PCs out there that can'd do some basic OpenGL, at least I don't have any friends or relatives whose computer doesn't support it. Perhaps I'm kind of special or something :D

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

tobing
Member #5,213
November 2004
avatar

Most computers support OpenGL. On the other side, some of the OpenGL implemenations are buggy, so programs using OpenGL may not work (display) correctly: My work-in-progress game does not work correctly on my laptop, but everywhere else (where I can test, and some other people can test), so even if OpenGL is supported, you can't always assume that your game will work. The more advanced features and effects of OpenGL you use, the more of potential users may have problems...

OICW
Member #4,069
November 2003
avatar

Yep, I had the same problem with my old laptop - the card didn't support more than untextured polygons. Though I think that most, even all, of the modern cards support OpenGL. But as mentioned. Some implemenatations are buggy. Though I'd go the accelerated way, if I'd want to use heavy blending and lot's of flashy particles.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

ImLeftFooted
Member #3,935
October 2003
avatar

D3D is far more supported then OpenGL, which is exactly why I made the Thing Library support D3D.

If you want a bit more solid proof, just look at the early Intel chipsets. Those things are rampant...

Thomas Harte
Member #33
April 2000
avatar

Quote:

D3D is far more supported then OpenGL

On the contrary, both D3D and OpenGL are supported by Intel, Nvidia and ATI. Intel has a 37.4% share of the market, Nvidia has 28.5% of the market, and ATI has 23% of the market (source). So in total, OpenGL is supported by 88.9% of the PC market. So it isn't far more, no matter what the manufacturers of the other 10.1% of cards are doing. As it is, I doubt if many of them support D3D.

ImLeftFooted
Member #3,935
October 2003
avatar

Thomas Harte, in a naive moment, said:

On the contrary, both D3D and OpenGL are supported by Intel, Nvidia and ATI. Intel has a 37.4% share of the market, Nvidia has 28.5% of the market, and ATI has 23% of the market (source [blogs.zdnet.com]). So in total, OpenGL is supported by 88.9% of the PC market. So it isn't far more, no matter what the manufacturers of the other 10.1% of cards are doing. As it is, I doubt if many of them support D3D.

Ya now try actually running your app on those Intel driver sets and then tell me how well OpenGL is supported...

Thomas Harte
Member #33
April 2000
avatar

Quote:

Ya now try actually running your app on those Intel driver sets and then tell me how well OpenGL is supported...

Amongst other things, I found that a circa 1999 Intel chipset was more than able to run Half-Life. I would therefore be surprised if it failed to handle "a 2D tile-based map".

ImLeftFooted
Member #3,935
October 2003
avatar

Well prepare to be surprised :)

Thomas Harte
Member #33
April 2000
avatar

Quote:

Well prepare to be surprised

Of course you have no evidence, but I don't suppose that bothers you. Sites like extremetech seem to get 16 fps from an Intel GMA 950 for Doom 3. To me, that sounds quite sufficient for (a) any game at least 6 months older than Doom 3; (b) any 2d tilemap anything.

EDIT: ahem I was missing the point. At 1024x768, the tests also show that a GeForce 6200 TC runs Flight Sim 2004, a DirectX game, at almost twice the framerate of an Intel GMA 950. In Doom 3, an OpenGL game, it gets about twice as many frames per second.

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

Of course you have no evidence

Screw evidence, not working is evidence enough for me. The earlier* intel chipsets' "support" of OpenGL is buggy at best.
* and by earlier I mean very recently.

Thomas Harte
Member #33
April 2000
avatar

Dustin Dettmer said:

Screw evidence

I think that concludes this conversation.

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

I think that concludes this conversation.

Yeah I agree, we're not going to get anywhere. We're just talking on different levels.

Paul whoknows
Member #5,081
September 2004
avatar

Why limit your game to only one API, if you can offer support for both?

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

OICW
Member #4,069
November 2003
avatar

Because OpenGL is really portable and generally the code in DX is 6 times longer than in OpenGL - even John Carmarck said this.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

TeamTerradactyl
Member #7,733
September 2006
avatar

Paul whoknows said:

Why limit your game to only one API, if you can offer support for both?

1) I don't know DirectX
2) I don't know OpenGL
3) I don't know D3D

Since all 3 of these (or is D3D a 'DirectX' something-or-other?) are different, I would have to assume that I cannot simply say, "render_stuff()" and all of them would understand it the same way. I would have to write code specific for one, then the other, and possibly the third (and fourth, and fifth) different kinds of 3D implementations out there, and all I want to do is write a single game. It would take more time to make all the different APIs as it would to write the game itself.

If I limit myself to DirectX, no one using anything but Windows can use the game. That limits my game more than if I simply used OpenGL; some people couldn't handle it, but a lot more people using Linux/Mac/BSD/non-Windows could, and isn't that more important? Getting your game out to as many people as possible?

Now, if I wanted to do something like Planeshift and had a million people all working on my project, then sure, I don't see a reason NOT to support as many APIs as justifiable.

OICW
Member #4,069
November 2003
avatar

In OpenGL you typically do something like this:

glBegin(GL_POLYGON);
  glVertex3f(x1, y1, z1);
  glVertex3f(x2, y2, z2);
  glVertex3f(x3, y3, z3);
  glVertex3f(x4, y4, z4);
glEnd();

Usually preceeded by OGL initialization and opening the window, which is platform dependent - done some way on WinAPI - where actual drawing code is way shorter than that one managing the window. Some other way under xorg etc. Either way, you can even use AllegroGL (which merges Allegro and OGL) and then it's plain simple, you just use one line to open up window.

Anyway if you want really abstract API and high level programming, just grab OpenLayer. It's hardware accelerated addon for Allegro. Its API is really easy.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Paul whoknows
Member #5,081
September 2004
avatar

C++ polymorphism and wrapper designs can help, however it all depends on how you have designed your project.

Quote:

1) I don't know DirectX

Use Allegro.

Quote:

1) I don't know OpenGL

Use AllegroGL and OpenLayer.

Quote:

1) I don't know D3D

Dustin's OGL/D3D wrapper could be the solution to that.

Quote:

Because OpenGL is really portable and generally the code in DX is 6 times longer than in OpenGL - even John Carmarck said this.

Yes! as an allegro user, when I see D3D code I vomit, however I can't deny the importance of a D3D support.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

OICW
Member #4,069
November 2003
avatar

Paul: for me it was enough to see OpenGL initialization under WinAPI. The things you have to do in order to get window opened resulted in acute headache. Then I showed my "minimalistic" code in AllegroGL which has done the same in just one line of code :)

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Goalie Ca
Member #2,579
July 2002
avatar

You're saying Directx is more supported than opengl!? Tell that to my linux boxen.. or my mac.

-------------
Bah weep granah weep nini bong!

Thomas Harte
Member #33
April 2000
avatar

Quote:

Yes! as an allegro user, when I see D3D code I vomit, however I can't deny the importance of a D3D support.

D3D isn't like OpenGL. OpenGL has had a version of the same API (i.e. it's evolved, but you can still recognise is) for at least 15 years. Conversely Microsoft make no bones about the fact that they frequently completely redesign significant parts of DirectX. Though I have no direct experience, I believe the D3D interface has become quite a bit nicer with age.

Quote:

You're saying Directx is more supported than opengl!? Tell that to my linux boxen.. or my mac.

I'm typing this on a Mac but nonetheless I don't think Linux & Mac OpenGL support really amounts to much on a total supported scale.

From memory, Macs were about 5% of sales last December so if we genersously give Mac + Linux say 7% of the market, accept 88.9% as the figure for OpenGL on PC and give Direct3D 95% then total computer Direct3D support is 0.95 * 0.93 = 0.8835, i.e. about 88.35% of all computers. Windows/OpenGL makes 0.889 * 0.93 = 0.8277, i.e. 82.77%.

All Macs since about 1999 have hardware OpenGL, so we'll just call that all Macs. That gives 82.77% + 5% = 87.77% market support for OpenGL. Give hardware OpenGL to 75% of the 2% of the market I arbitrarily gave to Linux and that's another 0.75 * 0.02 = 0.015 = 1.5% of all the computers. Giving OpenGL 87.77 + 1.5 = 89.27% of the market.

It'd be more impressive if I hadn't made the Linux & Direct3d numbers up! But the point is, DirectX is fractionally more supported on Windows. If you account for the entire market, OpenGL may be fractionally more suported. But the differences are tiny.

My OpenGL advocacy arguments would be simply:

  • AllegroGL, SDL, OpenLayer all give you a tried and tested OpenGL interface that is popular amongst hobbyist programmers

  • OpenGL is not only easy but, on account of its historic API stability, very well documented by free resources

  • games are less common on Mac/Linux, so OpenGL may equal more recognition for you due to proportionally fewer competitors

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

I believe the D3D interface has become quite a bit nicer with age.

One point to back this up is threading safety (OpenGL provides none while D3D appears to support it fully).

OICW
Member #4,069
November 2003
avatar

Oh even CAD aplications use OGL.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

 1   2   3 


Go to: