<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>One object - one bitmap?</title>
		<link>http://www.allegro.cc/forums/view/616546</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 25 Oct 2016 01:08:18 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m sorry if this is a stupid question, but are Bitmaps supposed to represent one (game) object, and I should modify them as rarely as possible, working with their coordinates, sizes, ect?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FenzaFenz)</author>
		<pubDate>Tue, 25 Oct 2016 00:13:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>First, try to narrow down what it is you&#39;re asking for. What kind of game are you making? What do you need to represent an object in that game? Do you need a sprite (bitmap image), do you need position, dimensions, other attributes, etc...</p><p>A bitmap is just an image. You can do whatever you want with it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 25 Oct 2016 00:36:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, my exact question would sound like: &quot;Is modifying bitmap (for example, when I use <i>al_set_target_bitmap(bitmap)</i> and add some primitives to it) expensive?&quot;</p><p>And is it good practise to nest bitmaps?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FenzaFenz)</author>
		<pubDate>Tue, 25 Oct 2016 00:50:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Modifying a bitmap is not terribly expensive. You&#39;re prematurely optimizing a problem that doesn&#39;t exist yet.</p><p>What do you want to do with your bitmaps? Just draw on them? Don&#39;t worry about it until it becomes a problem. In all likelihood it will never be a problem.</p><p>What do you mean &#39;nest&#39; bitmaps? Use a sub-bitmap? Using a bitmap atlas is a good idea because it allows you to avoid texture switches when drawing a batch of bitmaps using <span class="source-code"><a href="http://www.allegro.cc/manual/al_hold_bitmap_drawing"><span class="a">al_hold_bitmap_drawing</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 25 Oct 2016 00:54:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank you, that fully answers my question <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (FenzaFenz)</author>
		<pubDate>Tue, 25 Oct 2016 00:58:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That said, <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_target_bitmap"><span class="a">al_set_target_bitmap</span></a></span> does take a small amount of time to switch the active texture, but you don&#39;t need to worry about it until it becomes a problem. It&#39;s still a good idea to pre-draw your sprites though, and keep them cached.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 25 Oct 2016 01:08:18 +0000</pubDate>
	</item>
</rss>
