<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Making 2.5D / 3D elements with Allegro 5?</title>
		<link>http://www.allegro.cc/forums/view/606451</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 19 Feb 2011 18:49:03 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I want to make a 2D table card game with Allegro, but I also want the cards to flip onto the table which would require: a depth buffer, creating OpenGL textures from pngs, and creating VBOs for the card planes. I would be basically reinventing many elements of Allegro. I was wondering if Allegro might have a simple and convenient way of doing something like this? Games Like World Of Goo also implement something similar with a goo mesh when you fill the bottle with goo. Is there a simple way to incorporate these things? Would the primitives addon be what I&#39;m looking for? Can it texture a 2 sided plane eg: a card? Can Allegro do transformations for depth?</p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Sat, 19 Feb 2011 07:25:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606451/904187#target">jmasterx</a> said:</div><div class="quote"><p>would require: a depth buffer, creating OpenGL textures from pngs, and creating VBOs for the card planes. I would be basically reinventing many elements of Allegro. I was wondering if Allegro might have a simple and convenient way of doing something like this?</p></div></div><p>
Allegro can create the OpenGL context and create the main framebuffer, load OpenGL extensions (if required) for VBO, and convert BITMAP* to OpenGL texture (GLuint).</p><p>The depth buffer and VBOs are done via OpenGL directly. They&#39;re simple to learn.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 19 Feb 2011 07:56:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is this possible with A4? If so, I have put too much work in my first game... I ended up making an animation for each and putting all frames of those animations in one big bitmap... 20MB+ <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (J-Gamer)</author>
		<pubDate>Sat, 19 Feb 2011 14:14:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you are just starting on this, I would suggest beginning with A5. Only stick with A4 if its an existing project.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Nazerith)</author>
		<pubDate>Sat, 19 Feb 2011 14:18:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606451/904247#target">J-Gamer</a> said:</div><div class="quote"><p>Is this possible with A4? If so, I have put too much work in my first game... I ended up making an animation for each and putting all frames of those animations in one big bitmap... 20MB+</p></div></div><p>
It is possible with Allegro 4 via the AllegroGL addon (all a part of the 4.4 download).</p><p>If you are using OpenGL, you can easily convert your Allegro 4 project to Allegro 5 if you wish.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Archon)</author>
		<pubDate>Sat, 19 Feb 2011 14:43:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am not, that&#39;s why I had to make a 20MB+ bitmap... but that&#39;s almost half a year ago. I quit that project, and it&#39;s finished(look at my site for Projects-&gt;Memory).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (J-Gamer)</author>
		<pubDate>Sat, 19 Feb 2011 14:47:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve been able to mix 3D and 2D with A5 easily. I even made a mockup to test it:<br /><span class="remote-thumbnail"><span class="json">{"name":"603432","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e974ba1f88995769114b52b3034cdb5a.png","w":822,"h":526,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e974ba1f88995769114b52b3034cdb5a"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/e/9/e974ba1f88995769114b52b3034cdb5a-240.jpg" alt="603432" width="240" height="153" /></span></p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606451/904187#target">jmasterx</a> said:</div><div class="quote"><p>a depth buffer</p></div></div><p>
Since you claim that your game is simply going to be a 2D card game, you can just use the Depth buffer that Allegro creates for you.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>creating OpenGL textures from pngs</p></div></div><p>
No need to, you can use <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_opengl_texture"><span class="a">al_get_opengl_texture</span></a></span> to retrieve the OpenGL texture id, ready to use with any OpenGL code you want.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>VBOs</p></div></div><p>
Since we&#39;re talking about just card planes, just rendering two quads(one for the back and one for the front) should do the trick right? It&#39;s not about reinventing so much in that case. Be sure to set up the proper projection before, and then just switch back to the Orthographic one.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Games Like World Of Goo also implement something similar with a goo mesh when you fill the bottle with goo.</p></div></div><p>
If you&#39;re looking for that effect, I think you should just refer to <span class="source-code"><a href="http://www.allegro.cc/manual/al_draw_prim"><span class="a">al_draw_prim</span></a></span>. Be aware that you might have some artifacts such as the one described in <a href="http://www.allegro.cc/forums/thread/604303/869413#target">this thread</a>, which is not Allegro related but just the way a quad is rendered on 2D projection.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dario ff)</author>
		<pubDate>Sat, 19 Feb 2011 18:49:03 +0000</pubDate>
	</item>
</rss>
