<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Scirra Forum : Creating a math platformer, need help with arrays</title>
  <link>http://www.scirra.com/forum/</link>
  <description>This is an XML content feed of; Scirra Forum : How do I....? : Creating a math platformer, need help with arrays</description>
  <copyright>Copyright (c) 2006-2011 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 25 May 2013 10:14:53 +0000</pubDate>
  <lastBuildDate>Tue, 22 May 2012 14:44:28 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 10.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.scirra.com/forum/RSS_post_feed.asp?TID=52351</WebWizForums:feedURL>
  <image>
   <title>Scirra Forum</title>
   <url>http://www.scirra.com/forum/forum_images/web_wiz_forums.png</url>
   <link>http://www.scirra.com/forum/</link>
  </image>
  <item>
   <title>Creating a math platformer, need help with arrays : Yeah you can use &amp;#039;or&amp;#039;...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329500.html#329500</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ramones">ramones</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 22 May 2012 at 2:44pm<br /><br />Yeah you can use 'or' with the keyboard triggers. BTW an easier way to reset the array, instead of the loop I used, is:<br />input-&gt;Set size to (0,1,1)<br />]]>
   </description>
   <pubDate>Tue, 22 May 2012 14:44:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays : So here&amp;#039;s the capx with ramone&amp;#039;s...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329401.html#329401</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/nihakue">nihakue</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 22 May 2012 at 12:37am<br /><br />So here's the capx with ramone's code implemented. (use wasd to control the green block, but the camera follows the little dude, so use arrow keys to move him around)<br /><br />The orange block is the "challenge"<br /><br />http://dl.dropbox.com/u/11790413/Final_Project.capx<br /><br />Do 'or' blocks not work with key presses? so I could do :<br /><br />-'on 1 or num 1 pressed'<br /><br />Or should I just create a separate event?]]>
   </description>
   <pubDate>Tue, 22 May 2012 00:37:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays :   ramones wrote:Here&amp;#039;s an...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329397.html#329397</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/nihakue">nihakue</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 11:47pm<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by ramones" alt="Originally posted by ramones" style="vertical-align: text-bottom;" /> <strong>ramones wrote:</strong><br /><br />Here's an idea using an array to store numbers entered on the num-pad:<br /><a href="http://dl.dropbox.com/u/8367729/c&#111;nstruct/example/mathPlat&#102;ormer.capx" target="_blank" rel="nofollow">mathPlatformer.capx</a> (r91)</td></tr></table> <br /><br />That's just about perfect. Thank you so much. What is the difference between push back and push front? I am imagining the array as a line of blocks, and push back means adding elements (blocks) from the right side, and push front is adding elements (blocks) from the left side. Is that correct?<br /><br />Edit: Man, this just makes sense. I freaking love C2. <span style="font-size:10px"><br /><br />Edited by nihakue - 22 May 2012 at 12:01am</span>]]>
   </description>
   <pubDate>Mon, 21 May 2012 23:47:54 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays : Here&amp;#039;s an idea using an array...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329387.html#329387</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ramones">ramones</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 10:44pm<br /><br />Here's an idea using an array to store numbers entered on the num-pad:<br /><a href="http://dl.dropbox.com/u/8367729/c&#111;nstruct/example/mathPlat&#102;ormer.capx" target="_blank" rel="nofollow">mathPlatformer.capx</a> (r91)]]>
   </description>
   <pubDate>Mon, 21 May 2012 22:44:18 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays :   aridale wrote:well since its...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329386.html#329386</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/nihakue">nihakue</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 9:57pm<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by aridale" alt="Originally posted by aridale" style="vertical-align: text-bottom;" /> <strong>aridale wrote:</strong><br /><br />well since its a platformer game why not make the player input the answer by jumpin on the platform with the right answer? or jump on a 10 platform twice and a 1 platform 4 times to get 24?<br /><br />Or you could always just take the simple approach and make a text input box appear and they type it</td></tr></table> <br /><br />The problem with using the text input box is: The game is locally multiplayer, and only one player will have to enter in numbers... The other player needs to be able to input controls while the numbers are being entered.]]>
   </description>
   <pubDate>Mon, 21 May 2012 21:57:42 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays : well since its a platformer game...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329368.html#329368</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/aridale">aridale</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 6:57pm<br /><br />well since its a platformer game why not make the player input the answer by jumpin on the platform with the right answer? or jump on a 10 platform twice and a 1 platform 4 times to get 24?<br /><br />Or you could always just take the simple approach and make a text input box appear and they type it]]>
   </description>
   <pubDate>Mon, 21 May 2012 18:57:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays :   Ugotsta wrote:You can store...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329352.html#329352</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/nihakue">nihakue</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 4:59pm<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by Ugotsta" alt="Originally posted by Ugotsta" style="vertical-align: text-bottom;" /> <strong>Ugotsta wrote:</strong><br /><br /><br /><br />You can store a series of such strings within your array, then when you choose a random element out of the array, solve it using a special event sheet.<br /></td></tr></table> <br /><br />Yes, it's math for children in 4th grade, so this sounds good. Could you explain how you would go about creating a solution event sheet? So if the prompt ends up being <br /><br />12 * 2 = ?<br /><br />How does the user input the answer? Sorry if this is all very basic stuff. ]]>
   </description>
   <pubDate>Mon, 21 May 2012 16:59:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays : I think the solution really depends...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329240.html#329240</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ugotsta">Ugotsta</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 7:54am<br /><br />I think the solution really depends on the complexity of the math problems you have in mind. Will they be very simple addition or subtraction problems, perhaps for children?<br /><br />If they're advanced math problems, you may need to get into some lightweight math parsing or perhaps rely on JavaScript's eval function via the <a href="http://www.scirra.com/forum/plugin-call-java&#115;cript_topic45866.html" target="_blank" title="Game maker">CallJS plugin</a> (it's probably safer to use an external JavaScript parser like the <a href="http://silentmatt.com/java&#115;cript-expressi&#111;n-evaluator/" target="_blank" rel="nofollow">this one</a>).<br /><br />For simpler math problems, you can probably just create 2 random numbers and randomize an operator with something like the following:<br /><br />x = int(random(1)) + 10<br />y = int(random(1)) + 10<br />operate = choose("+", "-", "/", "*")<br /><br />MathString = str(x) & operate & str(y)<br /><br />You can store a series of such strings within your array, then when you choose a random element out of the array, solve it using a special event sheet.<br /><br />That'd be my own idea for a solution. Perhaps others may have better ideas.]]>
   </description>
   <pubDate>Mon, 21 May 2012 07:54:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
  <item>
   <title>Creating a math platformer, need help with arrays : Hi all! I had one thread previously,...</title>
   <link>http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351_post329217.html#329217</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/nihakue">nihakue</a><br /><strong>Subject:</strong> 52351<br /><strong>Posted:</strong> 21 May 2012 at 3:57am<br /><br />Hi all! I had one thread previously, and you were all incredibly helpful with that one, so I've returned for more excellent advice. <br /><br />I searched through the tutorials in the sticky and on the main website and although there is an Arrays tutorial, I'm not exactly sure that arrays are what I need. (they seem a little bit verbose for what I need...?) <br /><br />What I need:<br /><br />I'm creating a math platformer, and there will be an event where a player has to solve a math problem to proceed, and I am wondering what the best way to generate problems would be? Is there some way to procedurally/randomly create them? Should I create a list and then pull one from the list? How will C2 know if the player has entered the correct answer (with the numbers on the keyboard)?<br /><br />I know this probably sounds pretty basic to some of you, but I am new to algorithmic reasoning and these problems kind of stump me.]]>
   </description>
   <pubDate>Mon, 21 May 2012 03:57:51 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/creating-a-math-platformer-need-help-with-arrays_topic52351.html</guid>
  </item> 
 </channel>
</rss>