<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Fix By Proximity</title>
	<atom:link href="http://fixbyproximity.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://fixbyproximity.com</link>
	<description>A Game Development Site</description>
	<lastBuildDate>Sat, 19 May 2012 11:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 14.4 &#8211; Deploying our Allegro 5 Game in Visual Studio 2010 by JoaoFaria</title>
		<link>http://fixbyproximity.com/2012/01/2d-game-dev-deploying-allegro-5-game-visual-studio-2010/#comment-1405</link>
		<dc:creator>JoaoFaria</dc:creator>
		<pubDate>Sat, 19 May 2012 11:21:20 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.com/2012/01/2d-game-dev-deploying-allegro-5-game-visual-studio-2010/#comment-1405</guid>
		<description>//the following code show how to do a basic player name input (THIS IS NOT A FULL CODE)

ALLEGRO_EVENT_QUEUE *event_queue = al_create_event_queue();

al_register_event_source(event_queue, al_get_keyboard_event_source());

string player_name=&quot;&quot;;

//draw function


bool done=false;
bool maius=false;//this tells you wen your pressing Shift
while(!done)
{
	ALLEGRO_EVENT ev;
	al_wait_for_event(event_queue, &amp;ev);
	if(ev.type == ALLEGRO_EVENT_KEY_DOWN)
	{
		switch (ev.keyboard.keycode)
		{
		case 215:
			maius=true;
			break;
			case ALLEGRO_KEY_ENTER:
			if (player_name.length() &gt; 0)
			{
				//the code you want then you press enter
				//done=true;//uncomment if u want the input to end here
				break;
			}
			else break;
			case ALLEGRO_KEY_SPACE:
			if (palyer_name.length() &gt; 0 &amp;&amp; palyer_name.length() &lt; name_limit)//in this case the name can&#039;t have more than 15 charecters
			{
				string algo;
				ostringstream convert;
				convert &lt; 0)
			{
				palyer_name.erase(player_name.end()-1);
				//draw function
				break;
			}
			else break;
							
		default:
			if (player_name.length() &lt; name_limit &amp;&amp; ev.keyboard.keycode = 1)
			{
				string algo;
				ostringstream convert;
				if (maius == true)
				{
					convert &lt;&lt; (char (ev.keyboard.keycode+64));
				}
				else 
				{
				convert &lt;&lt; (char (ev.keyboard.keycode+96));
				}
				algo = convert.str();
				const char *outro = algo.c_str();
				plyer_name.append (outro);
				//draw function
				break;
			}
			else break;
	}
	else if(ev.type == ALLEGRO_EVENT_KEY_UP)
	{
		if(ev.keyboard.keycode == 215)
		{
			maius= false;
		}
	}
}

al_destroy_event_queue(envent_queue);

From this code you will probably want to add a mouse input that do something like.. when you press the text box (you must make one inside your draw function) you will change a variable done_with_name to false and all the above code should be inside a while(!done_with_name), that way only when u press the textbox, you can type the player&#039;s name.

warning: Your draw function will need to recive the player_name string.

If you need other charecters than leters, just type after the if(ev.type == ALLEGRO_EVENT_KEY_DOWN), &quot;cout &lt;&lt; ev.keyboard.keycode&lt;&lt;endl;&quot;, then go to a ASCII code table and look for the key you pressed. after that its all about (char (ev.keyboard.keycode + correction)) where correction is the increment/decrement that you need to make, so that part correspond to the ASCII code you want :)</description>
		<content:encoded><![CDATA[<p>//the following code show how to do a basic player name input (THIS IS NOT A FULL CODE)</p>
<p>ALLEGRO_EVENT_QUEUE *event_queue = al_create_event_queue();</p>
<p>al_register_event_source(event_queue, al_get_keyboard_event_source());</p>
<p>string player_name=&#8221;";</p>
<p>//draw function</p>
<p>bool done=false;<br />
bool maius=false;//this tells you wen your pressing Shift<br />
while(!done)<br />
{<br />
	ALLEGRO_EVENT ev;<br />
	al_wait_for_event(event_queue, &amp;ev);<br />
	if(ev.type == ALLEGRO_EVENT_KEY_DOWN)<br />
	{<br />
		switch (ev.keyboard.keycode)<br />
		{<br />
		case 215:<br />
			maius=true;<br />
			break;<br />
			case ALLEGRO_KEY_ENTER:<br />
			if (player_name.length() &gt; 0)<br />
			{<br />
				//the code you want then you press enter<br />
				//done=true;//uncomment if u want the input to end here<br />
				break;<br />
			}<br />
			else break;<br />
			case ALLEGRO_KEY_SPACE:<br />
			if (palyer_name.length() &gt; 0 &amp;&amp; palyer_name.length() &lt; name_limit)//in this case the name can&#039;t have more than 15 charecters<br />
			{<br />
				string algo;<br />
				ostringstream convert;<br />
				convert &lt; 0)<br />
			{<br />
				palyer_name.erase(player_name.end()-1);<br />
				//draw function<br />
				break;<br />
			}<br />
			else break;</p>
<p>		default:<br />
			if (player_name.length() &lt; name_limit &amp;&amp; ev.keyboard.keycode = 1)<br />
			{<br />
				string algo;<br />
				ostringstream convert;<br />
				if (maius == true)<br />
				{<br />
					convert &lt;&lt; (char (ev.keyboard.keycode+64));<br />
				}<br />
				else<br />
				{<br />
				convert &lt;&lt; (char (ev.keyboard.keycode+96));<br />
				}<br />
				algo = convert.str();<br />
				const char *outro = algo.c_str();<br />
				plyer_name.append (outro);<br />
				//draw function<br />
				break;<br />
			}<br />
			else break;<br />
	}<br />
	else if(ev.type == ALLEGRO_EVENT_KEY_UP)<br />
	{<br />
		if(ev.keyboard.keycode == 215)<br />
		{<br />
			maius= false;<br />
		}<br />
	}<br />
}</p>
<p>al_destroy_event_queue(envent_queue);</p>
<p>From this code you will probably want to add a mouse input that do something like.. when you press the text box (you must make one inside your draw function) you will change a variable done_with_name to false and all the above code should be inside a while(!done_with_name), that way only when u press the textbox, you can type the player&#039;s name.</p>
<p>warning: Your draw function will need to recive the player_name string.</p>
<p>If you need other charecters than leters, just type after the if(ev.type == ALLEGRO_EVENT_KEY_DOWN), &quot;cout &lt;&lt; ev.keyboard.keycode&lt;&lt;endl;&quot;, then go to a ASCII code table and look for the key you pressed. after that its all about (char (ev.keyboard.keycode + correction)) where correction is the increment/decrement that you need to make, so that part correspond to the ASCII code you want <img src='http://fixbyproximity.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 1.1: Installing Allegro 5 with Visual Studio 2010 by Cody</title>
		<link>http://fixbyproximity.com/2011/07/2d-game-dev-installing-allegro-5-with-visual-studio-2010/#comment-1404</link>
		<dc:creator>Cody</dc:creator>
		<pubDate>Sat, 19 May 2012 01:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?p=174#comment-1404</guid>
		<description>now if i can only figure out how to load it into Dev-CPP on Windows lol.</description>
		<content:encoded><![CDATA[<p>now if i can only figure out how to load it into Dev-CPP on Windows lol.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 1.1: Installing Allegro 5 with Visual Studio 2010 by Cody</title>
		<link>http://fixbyproximity.com/2011/07/2d-game-dev-installing-allegro-5-with-visual-studio-2010/#comment-1403</link>
		<dc:creator>Cody</dc:creator>
		<pubDate>Sat, 19 May 2012 01:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?p=174#comment-1403</guid>
		<description>I made a typo from copy/pasting so much.
These instructions---
unpack it inside of codeblocks\mingw
rename it to allegro
--- Are for the allegro5 download.
Not the CMake install.
My mistake.</description>
		<content:encoded><![CDATA[<p>I made a typo from copy/pasting so much.<br />
These instructions&#8212;<br />
unpack it inside of codeblocks\mingw<br />
rename it to allegro<br />
&#8212; Are for the allegro5 download.<br />
Not the CMake install.<br />
My mistake.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 1.1: Installing Allegro 5 with Visual Studio 2010 by Cody</title>
		<link>http://fixbyproximity.com/2011/07/2d-game-dev-installing-allegro-5-with-visual-studio-2010/#comment-1401</link>
		<dc:creator>Cody</dc:creator>
		<pubDate>Sat, 19 May 2012 01:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?p=174#comment-1401</guid>
		<description>Oh, but before ALL OF THAT, make sure to install codeblocks LOL.  That shouldn&#039;t be hard to do.</description>
		<content:encoded><![CDATA[<p>Oh, but before ALL OF THAT, make sure to install codeblocks LOL.  That shouldn&#8217;t be hard to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Object Oriented Game Development &#8211; Part 4 by Mario</title>
		<link>http://fixbyproximity.com/2012/01/object-oriented-game-development-part-4/#comment-1398</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Fri, 18 May 2012 01:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.com/2012/01/object-oriented-game-development-part-4/#comment-1398</guid>
		<description>I have a problem here, I´m using Ubuntu 11.10, and if you use the  or , you have to compile with g++, not gcc!</description>
		<content:encoded><![CDATA[<p>I have a problem here, I´m using Ubuntu 11.10, and if you use the  or , you have to compile with g++, not gcc!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 7.1: Bitmap Transparency in Allegro 5 by Raul</title>
		<link>http://fixbyproximity.com/2011/09/2d-game-dev-part-7-1-bitmap-transparency-in-allegro-5/#comment-1397</link>
		<dc:creator>Raul</dc:creator>
		<pubDate>Thu, 17 May 2012 18:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?p=381#comment-1397</guid>
		<description>He means that you have mixed the next part code with this one. On the Transparency2.cpp source code you have the code that makes the animation move. 

I took the liberty of combining the two methods described on this video in order to achieve transparency here&#039;s a link: http://goo.gl/RvUSz just in case Frefro or other user finds itself lost with the resources associated with this video.</description>
		<content:encoded><![CDATA[<p>He means that you have mixed the next part code with this one. On the Transparency2.cpp source code you have the code that makes the animation move. </p>
<p>I took the liberty of combining the two methods described on this video in order to achieve transparency here&#8217;s a link: <a href="http://goo.gl/RvUSz" rel="nofollow">http://goo.gl/RvUSz</a> just in case Frefro or other user finds itself lost with the resources associated with this video.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Conclusion by Mario</title>
		<link>http://fixbyproximity.com/2012/01/2d-game-dev-conclusion/#comment-1393</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 15 May 2012 20:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.com/2012/01/2d-game-dev-conclusion/#comment-1393</guid>
		<description>Great tutorial :D greetings from México :D</description>
		<content:encoded><![CDATA[<p>Great tutorial <img src='http://fixbyproximity.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  greetings from México <img src='http://fixbyproximity.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Dev &#8211; Part 6.3: Rotating, Scaling, and Tinting Bitmaps by Marek Buday</title>
		<link>http://fixbyproximity.com/2011/09/2d-game-dev-part-6-3-rotating-scaling-and-tinting-bitmaps/#comment-1392</link>
		<dc:creator>Marek Buday</dc:creator>
		<pubDate>Tue, 15 May 2012 16:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?p=369#comment-1392</guid>
		<description>Mike, please could you help me?
I would like to start making applications for my iPhone. In C + + I have more experience and I would like to use them. Please write me an e-mail @ marek.buday@pobox.sk. Thank you.</description>
		<content:encoded><![CDATA[<p>Mike, please could you help me?<br />
I would like to start making applications for my iPhone. In C + + I have more experience and I would like to use them. Please write me an e-mail @ <a href="mailto:marek.buday@pobox.sk">marek.buday@pobox.sk</a>. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Object Oriented Game Development &#8211; Part 8 by Jack</title>
		<link>http://fixbyproximity.com/2012/01/object-oriented-game-development-part-8/#comment-1391</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Tue, 15 May 2012 14:57:52 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.com/2012/01/object-oriented-game-development-part-8/#comment-1391</guid>
		<description>Thank you so much for these tutorials, I have learnt more here about allegro game programming than all the other tutorials combined!


Saying at the end, that some things arn&#039;t done perfectly or maybe &#039;the best way to do everything&#039;. What do you feel wasn&#039;t done perfectly? Or what would you do differently given the time?</description>
		<content:encoded><![CDATA[<p>Thank you so much for these tutorials, I have learnt more here about allegro game programming than all the other tutorials combined!</p>
<p>Saying at the end, that some things arn&#8217;t done perfectly or maybe &#8216;the best way to do everything&#8217;. What do you feel wasn&#8217;t done perfectly? Or what would you do differently given the time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2D Game Development Course by Luke</title>
		<link>http://fixbyproximity.com/2d-game-development-course/#comment-1388</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Sun, 13 May 2012 21:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://fixbyproximity.wordpress.com/?page_id=274#comment-1388</guid>
		<description>Totally amazing. Not many people spend that much time and effort making these videos.
Thanks to your videos, I now love programming!!!

I wonder if you know how to use an icon for the actual program? On default, it is just a black box, but can I change the application icon so it is something better, like maybe a picture of the Spaceship?</description>
		<content:encoded><![CDATA[<p>Totally amazing. Not many people spend that much time and effort making these videos.<br />
Thanks to your videos, I now love programming!!!</p>
<p>I wonder if you know how to use an icon for the actual program? On default, it is just a black box, but can I change the application icon so it is something better, like maybe a picture of the Spaceship?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.170 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 11:26:27 -->

