<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://wikidot.org/rss-namespace">

	<channel>
		<title>Challenges (new posts)</title>
		<link>http://gamedesign.wikicomplete.info/forum/c-200/challenges</link>
		<description>Posts in the forum category &quot;Challenges&quot; - Challenge yourself and become a game programming master.</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-1430#post-15728</guid>
				<title>Resize a Square Using the Mouse: Re: Resize a Square Using the Mouse</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-1430/resize-a-square-using-the-mouse#post-15728</link>
				<description></description>
				<pubDate>Sat, 12 Sep 2009 23:27:18 +0000</pubDate>
				<wikidot:authorName>kake_fisk</wikidot:authorName>				<wikidot:authorUserId>33</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>C++ with SDL version. :)</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">SDL_Event</span><span class="hl-code"> </span><span class="hl-identifier">event</span><span class="hl-code">; </span><span class="hl-identifier">SDL_Rect</span><span class="hl-code"> </span><span class="hl-identifier">square</span><span class="hl-code">; </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> = </span><span class="hl-number">1</span><span class="hl-code">; </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> = </span><span class="hl-number">1</span><span class="hl-code">; </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">w</span><span class="hl-code"> = </span><span class="hl-identifier">event</span><span class="hl-code">.</span><span class="hl-identifier">button</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> - </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code">;</span><span class="hl-identifier">c</span><span class="hl-code"> </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">h</span><span class="hl-code"> = </span><span class="hl-identifier">event</span><span class="hl-code">.</span><span class="hl-identifier">button</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code">; </span><span class="hl-reserved">while</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">isRunning</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">while</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">SDL_PollEvent</span><span class="hl-brackets">(</span><span class="hl-code">&amp;</span><span class="hl-identifier">event</span><span class="hl-brackets">))</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">event</span><span class="hl-code">.</span><span class="hl-identifier">type</span><span class="hl-code"> == </span><span class="hl-identifier">SDL_MOUSEMOTION</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">w</span><span class="hl-code"> = </span><span class="hl-identifier">event</span><span class="hl-code">.</span><span class="hl-identifier">button</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code"> - </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">x</span><span class="hl-code">; </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">h</span><span class="hl-code"> = </span><span class="hl-identifier">event</span><span class="hl-code">.</span><span class="hl-identifier">button</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code"> - </span><span class="hl-identifier">square</span><span class="hl-code">.</span><span class="hl-identifier">y</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-identifier">SDL_FillRect</span><span class="hl-brackets">(</span><span class="hl-identifier">screen</span><span class="hl-code">, &amp;</span><span class="hl-identifier">square</span><span class="hl-code">, </span><span class="hl-identifier">SDL_MapRGB</span><span class="hl-brackets">(</span><span class="hl-identifier">screen</span><span class="hl-code">-&gt;</span><span class="hl-identifier">format</span><span class="hl-code">, </span><span class="hl-number">0x0</span><span class="hl-code">, </span><span class="hl-number">0x0</span><span class="hl-code">, </span><span class="hl-number">0x0</span><span class="hl-brackets">))</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-1430#post-15124</guid>
				<title>Resize a Square Using the Mouse: Re: Resize a Square Using the Mouse</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-1430/resize-a-square-using-the-mouse#post-15124</link>
				<description></description>
				<pubDate>Fri, 21 Aug 2009 10:51:30 +0000</pubDate>
				<wikidot:authorName>Fuzzy</wikidot:authorName>				<wikidot:authorUserId>1358</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I didn't but mine hasn't passed yet. Don't think you need to as says resize box not sprite.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-1430#post-15114</guid>
				<title>Resize a Square Using the Mouse: Re: Resize a Square Using the Mouse</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-1430/resize-a-square-using-the-mouse#post-15114</link>
				<description></description>
				<pubDate>Thu, 20 Aug 2009 19:55:16 +0000</pubDate>
				<wikidot:authorName>commander of games</wikidot:authorName>				<wikidot:authorUserId>1289</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Do you use a sprite?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-1430#post-15112</guid>
				<title>Resize a Square Using the Mouse: Re: Resize a Square Using the Mouse</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-1430/resize-a-square-using-the-mouse#post-15112</link>
				<description></description>
				<pubDate>Thu, 20 Aug 2009 17:32:08 +0000</pubDate>
				<wikidot:authorName>Fuzzy</wikidot:authorName>				<wikidot:authorUserId>1358</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here is a bit more advanced one (although still basic!).</p> <div class="code"> <pre> <code>x# = getScreenWidth() / 2 y# = getScreenHeight() / 2 Box x#, y#, rnd(getScreenWidth()), rnd(getScreenHeight()), 1 Sync Do If enterKey() = True Cls 0 Box x#, y#, MouseX(), MouseY(), 1 Sync EndIf Loop</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-1430#post-15110</guid>
				<title>Resize a Square Using the Mouse: Re: Resize a Square Using the Mouse</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-1430/resize-a-square-using-the-mouse#post-15110</link>
				<description></description>
				<pubDate>Thu, 20 Aug 2009 17:16:09 +0000</pubDate>
				<wikidot:authorName>Fuzzy</wikidot:authorName>				<wikidot:authorUserId>1358</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Does this count?? (PlayBasic)</p> <div class="code"> <pre> <code>Do Cls 0 Box 0, 0, MouseX(), MouseY(), 1 Sync Loop</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14528</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14528</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 16:22:20 +0000</pubDate>
				<wikidot:authorName>NicAdi</wikidot:authorName>				<wikidot:authorUserId>287</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Two thumbs up over here for <span class="printuser avatarhover"><a href="http://www.wikicomplete.info/user:info/tman7997" ><img class="small" src="http://gamedesign.wikicomplete.info/common--images/avatars/1/1297/a16.png" alt="TMan7997" style="background-image:url(http://www.wikicomplete.info/userkarma.php?u=1297)" /></a><a href="http://www.wikicomplete.info/user:info/tman7997" >TMan7997</a></span> !! That's the spirit, that's the kind of stuff I like seeing !!</p> <p>Very good job ! (Erm… Psst, does it work? :P)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14515</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14515</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 11:08:57 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>1198</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey, neat idea. Code looks nice and clean. Sadly i am not able to try basic4gl (unless *nix version havent popped out) but i might port this to some multiplatform dialect.<br /> If you do this at age 12, then im waiting with high hopes, what you can do when youre in my age.</p> <p><em>E.K.Virtanen</em><br /> <a href="http://e-k-v.wikidot.com/">http://e-k-v.wikidot.com/</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14508</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14508</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 07:47:51 +0000</pubDate>
				<wikidot:authorName>TMan7997</wikidot:authorName>				<wikidot:authorUserId>1297</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Im very new and im very young (12) but againsed all odds I did it!!!!!!!!!</p> <p>You are faced with a near impossible challenge. You have to get through 100 sets of doors whithout making a single mistake. If you pick a wrong door, you will lose. The only twist is that every time you get a correct door the number of doors goes up by one. Good luck.</p> <div class="code"> <pre> <code>dim numberofdoors, correctdoor, correct, choice, restart = 1 while restart = 1 numberofdoors = 2 correct = 1 restart = 1 while correct = 1 if numberofdoors - 1 = 100 then cls color(0,0,225) printr "Congradulations!!!!! YOU WIN!!!!!! You are incredibly luckey!" Printr "Press esc to exit." gosub exit endif cls correctdoor = rnd() % numberofdoors + 1 print "Level: " printr numberofdoors - 1 print "Pick a door # between 1 and " print numberofdoors print ". 1 and " printr numberofdoors printr "are included." input "Your choice: "; choice if not choice = correctdoor then correct = 0 endif numberofdoors = numberofdoors + 1 wend cls color (225,0,0) print "Sorry, you picked the wrong door. Your score was " print numberofdoors - 2 printr"." input "Play again? (Yes = 1, No = 2): "; restart color(225,225,225) wend cls printr "Press esc." end exit:</code> </pre></div> <p>(Written in basic4gl)<br /> The game is origanal. You may notice it is very bloated coad.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14465</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14465</link>
				<description></description>
				<pubDate>Thu, 30 Jul 2009 11:25:55 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>1198</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here is online version written with RunBasic <a href="http://runbasicnet.com:8023/seaside/go/runbasicpersonal?app=opendoors">http://runbasicnet.com:8023/seaside/go/runbasicpersonal?app=opendoors</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14247</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14247</link>
				<description></description>
				<pubDate>Sat, 25 Jul 2009 13:17:18 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>31</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>tja… the thing about gamemaker is that there isn't much code. But if you have all the solution in one piece of code you should post that. If not, then just post the gamemaker project :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14239</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14239</link>
				<description></description>
				<pubDate>Sat, 25 Jul 2009 10:47:47 +0000</pubDate>
				<wikidot:authorName>mr glasses</wikidot:authorName>				<wikidot:authorUserId>841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>oh…do we need to ost the code? Or can we post a link to the .zip files?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14235</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14235</link>
				<description></description>
				<pubDate>Sat, 25 Jul 2009 03:01:20 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>31</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I haven't tried it but here is a c++ example that should work. It is a bit bloated but that is also because it has error control :)</p> <div class="code"> <pre> <code>#include &lt;iostream&gt; #include &lt;fstream&gt; // file stream #include &lt;string&gt; using namespace std; int main( int argCount, char** args ) { // Writing to file { ofstream file; file.open( "test.txt", ios::out ); if ( !file.is_open() ) { cout &lt;&lt; "failed to open file for writing" &lt;&lt; endl; return -1; } file &lt;&lt; "Hello world" &lt;&lt; endl; file.close(); } // Reading from file { ifstream file; file.open( "test.txt", ios::in ); if ( !file.is_open() ) { cout &lt;&lt; "failed to open file for reading" &lt;&lt; endl; return -2; } cout &lt;&lt; "The content of the file is:" &lt;&lt; endl; string line; while ( !file.eof() ) { getline( file, line ); cout &lt;&lt; line &lt;&lt; endl; } file.close(); } return 0; }</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14230</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14230</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 16:27:57 +0000</pubDate>
				<wikidot:authorName>mr glasses</wikidot:authorName>				<wikidot:authorUserId>841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><a href="http://gamemaker.wikicomplete.info/local--files/member:clankercrusher/map%20loading.zip">map loader</a> press f1 for help…</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14227</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14227</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 14:30:54 +0000</pubDate>
				<wikidot:authorName>mr glasses</wikidot:authorName>				<wikidot:authorUserId>841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'll use GML, can I have it save the arrangement of room tiles? or would that fall outside of the challange?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3404#post-14216</guid>
				<title>File Reading Challenge: Re: File Reading Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3404/file-reading-challenge#post-14216</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 05:57:02 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>1198</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre> <code>' FB code dim temp as string = "Hello World" print "Writing variable on file..." open "test.txt" for output as #1 print #1, temp close #1 print "Reading variable from file..." open "test.txt" for input as #1 line input #1, temp close #1 print "Game over..." end</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3980#post-14215</guid>
				<title>Challenge: Tower Defense mechanics: Re: Challenge: Tower Defense mechanics</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3980/challenge:tower-defense-mechanics#post-14215</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 05:51:51 +0000</pubDate>
				<wikidot:authorName>NicAdi</wikidot:authorName>				<wikidot:authorUserId>287</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p><span class="printuser avatarhover"><a href="http://www.wikicomplete.info/user:info/u9" ><img class="small" src="http://gamedesign.wikicomplete.info/common--images/avatars/0/31/a16.png" alt="u9" style="background-image:url(http://www.wikicomplete.info/userkarma.php?u=31)" /></a><a href="http://www.wikicomplete.info/user:info/u9" >u9</a></span>: I see the "play the attacker" concept mentioned by everyone.</p> </blockquote> <p>(Heh…) I did pitch it to the "Starquest Entertainment" too; they didn't like it :P — I haven't fully understood what the objections were (and didn't care much developing it any further). But, who else?! I'm curious, because, if you say there are many others, then we might see a rising popular demand, thus an opportunity… ;-)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-3980#post-14209</guid>
				<title>Challenge: Tower Defense mechanics: Re: Challenge: Tower Defense mechanics</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-3980/challenge:tower-defense-mechanics#post-14209</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 04:03:21 +0000</pubDate>
				<wikidot:authorName>u9</wikidot:authorName>				<wikidot:authorUserId>31</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I see the "play the attacker" concept mentioned by everyone. I too think it might be cool… not bump-your-head-on-the-toilet cool, for that i am going to need a detailed description or prototype :) Remember, ideas are a dime a dozen. I would love to see how it works.</p> <p>Go for it guys… myself, i have something completely different in mind (inspired by hartnell), but i have to make a prototype to see how it will work (if at all).</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14208</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14208</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 03:55:09 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>1198</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yeah, cmBasic does not require line numbers, and if no such a thing, it works just like modern dialects, moves on by modularity. Didnt thought that when i posted code.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14206</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14206</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 01:53:17 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>3</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I removed the <tt>REM</tt>s, it works fine now.</p> <p>This is a mindboggling brain-fuck of guess the number game.</p> <p>My brain hurts. Need coffee to continue.</p> <p>MUST BEAT IT</p> <p>— hartnell</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://gamedesign.wikicomplete.info/forum/t-2229#post-14204</guid>
				<title>50 Lines of Code Challenge: Re: 50 Lines of Code Challenge</title>
				<link>http://gamedesign.wikicomplete.info/forum/t-2229/50-lines-of-code-challenge#post-14204</link>
				<description></description>
				<pubDate>Fri, 24 Jul 2009 01:48:46 +0000</pubDate>
				<wikidot:authorName>hartnell</wikidot:authorName>				<wikidot:authorUserId>3</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I tried that already. I got the strangest error :</p> <p><em>Error:duplicate line 2 in file.</em></p> <p>Yup, I'm retarded. How do I get smarter? :)</p> <p>— hartnell</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>