<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Should a 2D tile-based map be rendered in 3D?</title>
		<link>http://www.allegro.cc/forums/view/590499</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 06 Apr 2007 22:18:18 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was told by a fellow classmate (the few that aren&#39;t terrified to talk to a &quot;girl programmer&quot;, that is) that the few tile-based games I&#39;ve been working on could be optimized if I were to rethink the entire tilemap idea.</p><p>He said that I&#39;m doing a lot of my own routines (from scratch) that redraw several layers of tiles, and that I must have not done something right because there&#39;s a lot of flickering, etc. when the map scrolls to follow the player.</p><p>He suggested that I use some 3D implementation (like OpenGL) to do basically the same layout (2D tiles, etc.) but have OpenGL be in charge of all the redraws, scrolling, etc.  Since others have already spent countless hours optimizing the redraw routines for 3D to be &quot;incredibly fast&quot;, that would be the best thing for me to do.  Then, simply tell the camera to look &quot;straight down&quot; onto the map to get the 2D feel.</p><p>Has anyone else here done this, or is this just a lot of hot air from someone who doesn&#39;t know what he&#39;s talking about?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeamTerradactyl)</author>
		<pubDate>Mon, 12 Mar 2007 01:16:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can do it that way if you want. The benefit of doing it in 3D is you get lighting, blending effects etc which make it look prettier in general. Plus all textures are filtered so they look nicely stretched and it will run nice on all computers with a 3D graphics cards since it won&#39;t be that intensive.</p><p>The down side is it wont run on a computer lacking a 3D graphics card... so realistically there aren&#39;t many <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />.</p><p>Now keep in mind there is no reason Allegro shouldn&#39;t be able to handle a few layers.  Even on a 400mhz Celeron I was able to get the engine to pump out a ridiculous frame rate (several hundred fps) with translucency, several layers etc etc. This was in 8 bit colour. At 16 bits and 640x480 then some more careful optimization would be needed on the Celeron, but on other computers there was no issue.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hard Rock)</author>
		<pubDate>Mon, 12 Mar 2007 01:31:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">TeamTerradactyl said:</div><div class="quote"><p>
He said that I&#39;m doing a lot of my own routines (from scratch) that redraw several layers of tiles, and that I must have not done something right because there&#39;s a lot of flickering, etc. when the map scrolls to follow the player.
</p></div></div><p>
Flickering indeed means something&#39;s wrong. What kind of buffering do you use?</p><div class="quote_container"><div class="title">TeamTerradactyl said:</div><div class="quote"><p>
He suggested that I use some 3D implementation (like OpenGL) to do basically the same layout (2D tiles, etc.) but have OpenGL be in charge of all the redraws, scrolling, etc. Since others have already spent countless hours optimizing the redraw routines for 3D to be &quot;incredibly fast&quot;, that would be the best thing for me to do.Then, simply tell the camera to look &quot;straight down&quot; onto the map to get the 2D feel.</p><p>Has anyone else here done this, or is this just a lot of hot air from someone who doesn&#39;t know what he&#39;s talking about?
</p></div></div><p>
Bit of both. The reason it&#39;s going to be a lot faster in OpenGL isn&#39;t because someone&#39;s &quot;spent countless hours optimizing the redraw routines for 3D&quot; - it&#39;s because you&#39;re using hardware acceleration. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /><br />(Plus, you get stuff like texturing, coloring, lighting, and general blending more or less for free)</p><p>And... the concept of &quot;having OpenGL be in charge of scrolling&quot; is just... wrong. Yes, I suppose you <i>could</i> brute-force draw the entire map and just translate it, but why oh God why?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Mon, 12 Mar 2007 01:36:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have done a tile map like that a few times before with DirectX. The D3D sprites made it very simple and the speed difference was definitely noticeable. Like gnolam said you definitely don&#39;t want to draw all the tiles then just scroll them, I was only drawing the tiles that were in the view of the camera.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GrantG)</author>
		<pubDate>Mon, 12 Mar 2007 05:39:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
He said that I&#39;m doing a lot of my own routines (from scratch) that redraw several layers of tiles, and that I must have not done something right because there&#39;s a lot of flickering, etc. when the map scrolls to follow the player.
</p></div></div><p>

Probably what you need to smooth your scroll is a high resolution timer.<br />There are a lot of Side Scroller games featuring smoothly scrolls without 3D hardware acceleration.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Mon, 12 Mar 2007 11:41:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
is this just a lot of hot air from someone who doesn&#39;t know what he&#39;s talking about?
</p></div></div><p>
Its mostly hot air.  Theres a small hint of a good idea in there (using OpenGL) but his reasoning for it makes absolutely no sense.</p><p>Just ignore the guy.</p><p>Besides, OpenGL isn&#39;t always the answer anyways.  <i>Use the right tool for the right job<sup>TM</sup></i>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Mon, 12 Mar 2007 12:33:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You mean the right <i>tool</i>? <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (James Stanley)</author>
		<pubDate>Mon, 12 Mar 2007 12:46:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Besides, OpenGL isn&#39;t always the answer anyways. Use the right tool for the right job
</p></div></div><p>
For example, if you&#39;re doing graphics work then use the graphics processing unit. Your laptop users and users of OSs with modern compositing engines (i.e. Vista, OS X, etc) will thank you forever.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Mon, 12 Mar 2007 23:04:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, so due to the hardware acceleration and all the other fancy stuff built into OpenGL, it would be a lot more computer-friendly to take the simple side-scrolling (or top-down) tile-based game and reduce flickering, movement jumpiness, etc.?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeamTerradactyl)</author>
		<pubDate>Mon, 12 Mar 2007 23:08:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>yes.<br />If you would do it on CPU using software routines you&#39;d be basically emulating what GPU does. That means you&#39;ll waste a lot more power than needed.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Mon, 12 Mar 2007 23:16:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There shouldn&#39;t be any flickering, no matter what method is used.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Mon, 12 Mar 2007 23:17:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Every time I hear about someone using <i>3D</i> acceleration for a strictly 2D task, part of my childhood dies.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Tue, 13 Mar 2007 00:40:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, OpenLayer seems to be quite nice for doing 2D stuff. You can also get a lot more eyecandy with it compared to using CPU-only <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Tue, 13 Mar 2007 00:59:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Hard Rock said:</div><div class="quote"><p>
The down side is it wont run on a computer lacking a 3D graphics card... so realistically there aren&#39;t many
</p></div></div><p>

but if your main coding computer lacks a 3d graphix card then your in trouble;D;D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Alysher)</author>
		<pubDate>Tue, 13 Mar 2007 01:05:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but if your main coding computer lacks a 3d graphix card then your in trouble;D;D
</p></div></div><p>

I dunno, one of those nice (and yet annoying, in some cases) things with openGL is that, by design, any and all features can be implemented in hardware or software transparently (AFAIK).  If only some of the API can be implemented on the hardware, so be it; the software end can take care of the gap.  Granted, this isn&#39;t great for performance, but just because you don&#39;t have a 3d graphics card doesn&#39;t mean you will get zero hardware acceleration for ANY of the opengl calls. (You likely won&#39;t get any acceleration, but if you do have an older 2d-acceleration-only card, in theory, it is possible for some of the routines used by OpenGL are mapped to a hardware implementation).</p><p>Besides, the software implementations of the OpenGL spec are not THAT slow (they are no where near hardware speed, but if you are careful in what features you use, you should get playable performance from it with a decent CPU.  Of course, if you have a decent CPU, you probably have 3d acceleration anyway, so it is a moot point.) <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Carrus85)</author>
		<pubDate>Tue, 13 Mar 2007 01:14:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Every time I hear about someone using 3D acceleration for a strictly 2D task, part of my childhood dies.
</p></div></div><p>
Oh, it&#39;s not like that. The Atari 2600/etc all have specific graphics hardware, and if you went something like Atari 2600 -&gt; C64 -&gt; Amiga -&gt; PlayStation -&gt; now then you&#39;d never have had a platform that just used a CPU to write to a dumb framebuffer. It just so happens that the algorithms used by todays graphics hardware allow for 3d visuals as well as 2d visuals.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Tue, 13 Mar 2007 01:35:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but if you do have an older 2d-acceleration-only card, in theory, it is possible for <br />some of the routines used by OpenGL are mapped to a hardware implementation).
</p></div></div><p>
<b>In theory</b>. Have you ever tried using the software implementation that comes with windows (I know there are libraries out there, but unless you distribute them with you game they don&#39;t count)? In the games software renderer i think I hit like 20-30fps. </p><p>With the OpenGL renderer I hit 1 or 2 every few seconds. I&#39;m not actually joking either.</p><p>This is Counterstrike on a 400mhz celeron. Before you comment keep in mind: <br />a)Half life before the patches ran playable. After patches it got considerably slower. But I could still play with the software renderer. <br />b)This particular Celeron generation was actually pretty good as far as Celerons go. It was basically the Pentium 2 chip with a little less cache, but it STILL had some. <br />c)This is the type of computer that wont have a 3d accelerator. The generation of integrated Intel afterwards(possibly 2 afterwards, I know my Dell has it) included bare bones 3d acceleration. But once again, any and all effects that needed to run in software will drop the game to 1 to 2 fps.(I could run Max Payne 2 up until the part where they had stairs. It took me a good 5 minutes to get to the top :S)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Hard Rock)</author>
		<pubDate>Tue, 13 Mar 2007 01:56:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I could run Max Payne 2 up until the part where they had stairs. It took me a good 5 minutes to get to the top
</p></div></div><p>
You mean you were programming the gameplay <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Besides I don&#39;t see anything wrong on having the camera fixed at 90° to a surface, having orthographic projection and making a 2d game. It&#39;s what you use OpenGL for too. I know a lot of games done this way.</p><p>Unless you don&#39;t have gfx accelerator, in that case it sucks.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But if your main coding computer lacks a 3d graphix card then your in trouble
</p></div></div><p>
That&#39;s why I had to buy new laptop, because my old one had 8MB ATI card which didn&#39;t supported OpenGL and I think HW acceleration at all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Tue, 13 Mar 2007 02:13:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Thomas Harte said:</div><div class="quote"><p>

[quote I]<br />Every time I hear about someone using 3D acceleration for a strictly 2D task, part of my childhood dies.
</p></div></div><p>
Oh, it&#39;s not like that. The Atari 2600/etc all have specific graphics hardware, and if you went something like Atari 2600 -&gt; C64 -&gt; Amiga -&gt; PlayStation -&gt; now then you&#39;d never have had a platform that just used a CPU to write to a dumb framebuffer. It just so happens that the algorithms used by todays graphics hardware allow for 3d visuals as well as 2d visuals.<br />&lt;/quote&gt;<br />What I had in mind was that gfx-card manufacturers were spending so much time working on 3D accelleration that they were neglecting to improve 2D accelleration (for sprite-based games), and in order to keep costs down, the quality of 2D accelleration even got worse as time went on (this was probably the case in 1999, not sure about today). Around 1999, I even came accross a bitmap font-renderer that actually worked by drawing two textured 3D-triangles for each glyph it was meant to render. While there&#39;s nothing inherently wrong with coming up with an outside-the-box solution to obtain the fastest-possible performance, the fact that you need to draw two 3D-triangles to render a font-glyph in the first place makes part of me want to scream. Perhaps it&#39;s just me being upset that an attempt was made to kill off the 2D game.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Tue, 20 Mar 2007 02:45:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>3D acceleration still is mostly really 2D. The graphics card doesn&#39;t have a 3-dimensional frame buffer, but rather a 2D frame buffer that holds 5 or 6 dimensional <i>values</i> (R, G, B, A, Z, Stencil). This is not the same. For the GPU, the triangles (after all transforms) are 2D, with an additional vertex parameter that controls texture mapping.<br />And if using the highly optimized rendering pipeline that is already in place to render 2D graphics; what&#39;s the problem? As long as it produces the expected results and works fast and reliably, by all means use it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Tue, 20 Mar 2007 03:56:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Tobias Dammers said:</div><div class="quote"><p>

And if using the highly optimized rendering pipeline that is already in place to render 2D graphics; what&#39;s the problem? As long as it produces the expected results and works fast and reliably, by all means use it.
</p></div></div><p>

Would a highly optimised pipeline be able to take special cases into account in order to save GPU-cycles?</p><p>Even if we turn off things like lighting, multi-texturing, mip-mapping, bi/tri-linear filtering, perspective-correct texture-mapping, Z and S buffers, we&#39;d end up with the minimum requirements for drawing a diffuse texture-mapped polygon. Even that is a bit overkill if we want to do a simple 2D sprite-game. A point-sampling function for texture-mapping a 3D polygon also has to take the depth into account. Also, for each scanline, the direction of texture-sampling is different (whereas for a rotated 2D sprite, it&#39;s the same). And if we don&#39;t want to use sprite-rotation, the point-sampling functions only need to work in one dimension, and then if we&#39;re not even zooming, the point-sampling function is just a one-to-one mapping between texels and pixels.</p><p>Unless the hardware takes into account special cases for things such as the polygon-plane being perpendicular to the camera/screen, or the texture-space as defined by the texture-coordinates mapping to screen-space coordinates by purely using a displacement (that is, one texel maps to one pixel and no rotation is required), the hardware will be doing a lot of extra work unnescescarily. Even if the hardware is optimised enough to be able to do all the lighting, transformation and perspective-correction etc. within the time it takes to fetch the texture from texture-ram, it will mean that using the entire pipeline will use up more energy than is needed and therefore produce more heat.</p><p>But by all means, if this is the fastest way of drawing a 2D sprite, then go for it. Game-players want the fastest possible graphics, and don&#39;t care about heat-generation. I just think it&#39;s a pity that the hardware-designers didn&#39;t take 2D sprites as a special case into account (if they haven&#39;t).</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Mon, 26 Mar 2007 21:29:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Andrei Ellman said:</div><div class="quote"><p>
I just think it&#39;s a pity that the hardware-designers didn&#39;t take 2D sprites as a special case into account (if they haven&#39;t).
</p></div></div><p>

I think they probably HAVE taken 2D sprites into account.  For example, most 3D games have some sort of on-screen menu, or names of other players walking around, or something else that is drawn onto the screen that should not be rotated by any 3D calculations.</p><p>Since 3D objects always have textures overlaying their polygons, I&#39;m sure they have all SORTS of 2D functions (software and hardware both) that have been optimized and loops unrolled.</p><p>I agree, though, that for a top-down, or even side-scroller, you probably won&#39;t be doing very much sprite rotation, zooming, change of depth, or all those other things you mentioned.  And since they&#39;re not being used, there&#39;s no reason for the GPU to have to heat up calculating anything unnecessary.</p><p>I&#39;m just thinking that someone else who has worked on OpenGL (or DirectX or whatever) and has already done all the math.  I just come along and use what they&#39;ve already optimized.  Like Allegro: I wrote my game for Windows, with 2GB RAM, 256MB graphics card, etc.  However, I used the Allegro libraries.  Now, anyone who has Allegro compiled for their machine can play the game.  I didn&#39;t have to do any of the math or #ifdef __MACINTOSH__&#39;s.</p><p>So if I use a 3D library to render the 2D game, I take advantage of all the hardware acceleration and code optimizations that I have never had to think about: I simply tell it, &quot;You! Shift all the tiles over by 8 pixels!&quot; and it does it however it feels happiest.</p><p>TT
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeamTerradactyl)</author>
		<pubDate>Mon, 26 Mar 2007 21:45:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">TeamTerradactyl said:</div><div class="quote"><p>

I think they probably HAVE taken 2D sprites into account. For example, most 3D games have some sort of on-screen menu, or names of other players walking around, or something else that is drawn onto the screen that should not be rotated by any 3D calculations.
</p></div></div><p>
I would have thought so too, but I&#39;ve seen at least one implementation of a 2D font-renderer that turns the texture into two triangles and renders them as 3D polygons. Maybe this was just a one-off, but who knows...</p><div class="quote_container"><div class="title">TeamTerradactyl said:</div><div class="quote"><p>

Since 3D objects always have textures overlaying their polygons, I&#39;m sure they have all SORTS of 2D functions (software and hardware both) that have been optimized and loops unrolled.
</p></div></div><p>
Actually, texturing a 3D polygon is a much more involved process than drawing a 2D bitmap. Even a single-textured (diffuse-mapped) polygon that is textured without perspective correction can take more effort to render than a 2D scaled and rotated object. Once perspective-correction is taken into account, the processing-time becomes even greater.</p><div class="quote_container"><div class="title">TeamTerradactyl said:</div><div class="quote"><p>

So if I use a 3D library to render the 2D game, I take advantage of all the hardware acceleration and code optimizations that I have never had to think about: I simply tell it, &quot;You! Shift all the tiles over by 8 pixels!&quot; and it does it however it feels happiest.
</p></div></div><p>
I agree. I was just commenting from the perspective of a low-level programmer. Anyone who uses a rendering engine does not need to worry about what goes on inside the black box and just have faith that it does it&#39;s thing in the best possible way. However, I&#39;ve been around a few engines in my time, and my faith has become a bit wobbly.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Tue, 03 Apr 2007 03:36:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You know I think for a simple side-scroller OpenGL is a bad idea.  You&#39;re hurting your user-base.</p><p>It wont work on half the computers you wish it did.</p><p>This is the sort of thing Allegro was <b>made for</b>.  Remember to <i>Use the right tool for the right job<sup>TM</sup></i>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 03 Apr 2007 03:42:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>With using opengl you get a lot of effects and capabilities for free. One that hasn&#39;t been mentioned is resolution independance and camera capabilities. </p><p>I&#39;d say go ahead and learn opengl because I feel its worth knowing.</p><p>Sometimes its also a good idea to take a look at how other people implement things. Opengl is pretty well thought out and designed. There are probably ideas you can take from it to improve your own design.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Goalie Ca)</author>
		<pubDate>Tue, 03 Apr 2007 04:12:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
With using opengl you get a lot of effects and capabilities for free. One that hasn&#39;t been mentioned is resolution independance and camera capabilities.
</p></div></div><p>
Who cares?  User-base is more important.</p><p>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.</p><p>And using OpenGL for a smaller project <b>hurts your user-base</b>.  For a smaller project like this one <b>user-base</b> is probably more important.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 03 Apr 2007 04:15:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And using OpenGL for a smaller project hurts your user-base. For a smaller project like this one user-base is probably more important.
</p></div></div><p>

Weird. I never really thought about &quot;my user-base&quot;. 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&#39;d be hard pressed to find a friend&#39;s computer that couldn&#39;t handle  the level of graphics that my artistic skills currently consume <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Goalie Ca)</author>
		<pubDate>Tue, 03 Apr 2007 04:47:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Opengl is really well supported
</p></div></div><p>
Ha!  Thats funny...  Really well supported by <i>whose</i> computers?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 03 Apr 2007 07:07:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Really well supported by whose computers?
</p></div></div><p>I guess his every friends computer supports it. </p><p>Even my ancient P1 from &#39;97 did. For some reason I don&#39;t think there are a lot of PCs out there that can&#39;d do some basic OpenGL, at least I don&#39;t have any friends or relatives whose computer doesn&#39;t support it. Perhaps I&#39;m kind of special or something <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Tue, 03 Apr 2007 11:29:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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&#39;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...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (tobing)</author>
		<pubDate>Tue, 03 Apr 2007 11:54:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yep, I had the same problem with my old laptop - the card didn&#39;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&#39;d go the accelerated way, if I&#39;d want to use heavy blending and lot&#39;s of flashy particles.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Tue, 03 Apr 2007 17:33:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>D3D is far more supported then OpenGL, which is exactly why I made the <a href="http://www.allegro.cc/forums/thread/589392">Thing Library</a> support D3D.</p><p>If you want a bit more solid proof, just look at the early Intel chipsets.  Those things are rampant...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 03 Apr 2007 23:38:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
D3D is far more supported then OpenGL
</p></div></div><p>
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 (<a href="http://blogs.zdnet.com/ITFacts/?p=12448">source</a>). So in total, OpenGL is supported by 88.9% of the PC market. So it isn&#39;t <i>far</i> 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.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Tue, 03 Apr 2007 23:47:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Thomas Harte, in a naive moment, said:</div><div class="quote"><p>

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&#39;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.
</p></div></div><p>
Ya now try <i>actually running</i> your app on those Intel driver sets and <i>then</i> tell me how well OpenGL is supported...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Tue, 03 Apr 2007 23:48:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Ya now try actually running your app on those Intel driver sets and then tell me how well OpenGL is supported...
</p></div></div><p>
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 &quot;a 2D tile-based map&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Tue, 03 Apr 2007 23:56:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well prepare to be surprised <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 04 Apr 2007 00:01:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Well prepare to be surprised
</p></div></div><p>
Of course you have no evidence, but I don&#39;t suppose that bothers you. Sites like <a href="http://www.extremetech.com/article2/0,1697,1821806,00.asp">extremetech</a> 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.</p><p>EDIT: <b>ahem</b> 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.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 04 Apr 2007 00:16:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Of course you have no evidence
</p></div></div><p>
Screw evidence, <b>not working</b> is evidence enough for me.  The earlier* intel chipsets&#39; &quot;support&quot; of OpenGL is buggy at <i>best</i>.<br /><sub>

* and by earlier I mean very recently.
</sub>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 04 Apr 2007 00:20:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Dustin Dettmer said:</div><div class="quote"><p>
Screw evidence
</p></div></div><p>
I think that concludes this conversation.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 04 Apr 2007 00:24:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I think that concludes this conversation.
</p></div></div><p>
Yeah I agree, we&#39;re not going to get anywhere.  We&#39;re just talking on different levels.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 04 Apr 2007 00:29:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Why limit your game to only one API, if you can offer support for both?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 04 Apr 2007 00:41:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Because OpenGL is really portable and generally the code in DX is 6 times longer than in OpenGL - even John Carmarck said this.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Wed, 04 Apr 2007 01:00:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Paul whoknows said:</div><div class="quote"><p>
Why limit your game to only one API, if you can offer support for both?
</p></div></div><p>

1) I don&#39;t know DirectX<br />2) I don&#39;t know OpenGL<br />3) I don&#39;t know D3D</p><p>Since all 3 of these (or is D3D a &#39;DirectX&#39; something-or-other?) are different, I would have to assume that I cannot simply say, &quot;render_stuff()&quot; 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.</p><p>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&#39;t handle it, but a lot more people using Linux/Mac/BSD/non-Windows <i>could</i>, and isn&#39;t that more important?  Getting your game out to as many people as possible?</p><p>Now, if I wanted to do something like <a>Planeshift</a> and had a million people all working on my project, then sure, I don&#39;t see a reason NOT to support as many APIs as justifiable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeamTerradactyl)</author>
		<pubDate>Wed, 04 Apr 2007 01:01:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In OpenGL you typically do something like this:
</p><div class="source-code snippet"><div class="inner"><pre>glBegin<span class="k2">(</span>GL_POLYGON<span class="k2">)</span><span class="k2">;</span>
  glVertex3f<span class="k2">(</span>x1, y1, z1<span class="k2">)</span><span class="k2">;</span>
  glVertex3f<span class="k2">(</span>x2, y2, z2<span class="k2">)</span><span class="k2">;</span>
  glVertex3f<span class="k2">(</span>x3, y3, z3<span class="k2">)</span><span class="k2">;</span>
  glVertex3f<span class="k2">(</span>x4, y4, z4<span class="k2">)</span><span class="k2">;</span>
glEnd<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
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&#39;s plain simple, you just use one line to open up window.</p><p>Anyway if you want really abstract API and high level programming, just grab OpenLayer. It&#39;s hardware accelerated addon for Allegro. Its API is really easy.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Wed, 04 Apr 2007 01:17:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>C++ polymorphism and wrapper designs can help, however it all depends on how you have designed your project.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
1) I don&#39;t know DirectX
</p></div></div><p>

Use Allegro.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
1) I don&#39;t know OpenGL
</p></div></div><p>

Use AllegroGL and OpenLayer.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
1) I don&#39;t know D3D
</p></div></div><p>

Dustin&#39;s OGL/D3D wrapper could be the solution to that.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Because OpenGL is really portable and generally the code in DX is 6 times longer than in OpenGL - even John Carmarck said this.
</p></div></div><p>

Yes! as an allegro user, when I see D3D code I vomit, however I can&#39;t deny the importance of a D3D support.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 04 Apr 2007 01:20:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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 &quot;minimalistic&quot; code in AllegroGL which has done the same in just one line of code <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Wed, 04 Apr 2007 01:25:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re saying Directx is more supported than opengl!? Tell that to my linux boxen.. or my mac.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Goalie Ca)</author>
		<pubDate>Wed, 04 Apr 2007 01:31:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Yes! as an allegro user, when I see D3D code I vomit, however I can&#39;t deny the importance of a D3D support.
</p></div></div><p>
D3D isn&#39;t like OpenGL. OpenGL has had a version of the same API (i.e. it&#39;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.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You&#39;re saying Directx is more supported than opengl!? Tell that to my linux boxen.. or my mac.
</p></div></div><p>
I&#39;m typing this on a Mac but nonetheless I don&#39;t think Linux &amp; Mac OpenGL support really amounts to much on a total supported scale.</p><p>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%.</p><p>All Macs since about 1999 have hardware OpenGL, so we&#39;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&#39;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.</p><p>It&#39;d be more impressive if I hadn&#39;t made the Linux &amp; 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.</p><p>My OpenGL advocacy arguments would be simply:
</p><ul><li><p> AllegroGL, SDL, OpenLayer all give you a tried and tested OpenGL interface that is popular amongst hobbyist programmers</p></li><li><p> OpenGL is not only easy but, on account of its historic API stability, very well documented by free resources</p></li><li><p> games are less common on Mac/Linux, so OpenGL may equal more recognition for you due to proportionally fewer competitors</p></li></ul><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 04 Apr 2007 02:57:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I believe the D3D interface has become quite a bit nicer with age.
</p></div></div><p>
One point to back this up is threading safety (OpenGL provides none while D3D appears to support it fully).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 04 Apr 2007 03:07:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh even CAD aplications use OGL.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (OICW)</author>
		<pubDate>Wed, 04 Apr 2007 13:12:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Using 3D acceleration to render a 2D scene <i>is</i> a good idea. Since you don&#39;t know D3D or OpenGL and it is a good idea to support both, I would suggest getting your hands on a 3D graphics engine that supports both. For ease of use, you can&#39;t go past <a href="http://irrlicht.sourceforge.net/">Irrlicht</a>. It supports Direct3D 8 and 9, and OpenGL.</p><p>EDIT: An advantage of using Irrlicht is that it is a scene manager. You can simply use a flat 3D model to represent each map layer and let Irrlicht do the rest. Of course, you&#39;ll need to actually move the models at different speeds to get the parallax scrolling effect.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Steve++)</author>
		<pubDate>Fri, 06 Apr 2007 22:18:18 +0000</pubDate>
	</item>
</rss>
