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

	<channel>
		<title>small game optimization</title>
		<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization</link>
		<description>Posts in the discussion thread &quot;small game optimization&quot; - need guidance on optimizing my quaint little game</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 22 Jul 2026 02:30:12 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-929923</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-929923</link>
				<description></description>
				<pubDate>Sat, 20 Nov 2010 04:08:35 +0000</pubDate>
				<wikidot:authorName>rhombus p</wikidot:authorName>				<wikidot:authorUserId>240559</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>change it to just <tt>rand</tt> then</p> <p>change</p> <div class="code"> <pre><code>:randInt(0,94)→X :randInt(8,61)→Y :Pxl-On(Y,X</code></pre></div> <p>to</p> <div class="code"> <pre><code>:Pxl-On(randInt(0,94),randInt(8,61)</code></pre></div> <p>slight speed improvment change</p> <div class="code"> <pre><code>:Pxl-On(B,A :Pxl-On(B-1,A :Pxl-On(B-2,A</code></pre></div> <p>to</p> <div class="code"> <pre><code>:B :Pxl-On(Ans,A :Pxl-On(Ans-1,A :Pxl-On(Ans-2,A</code></pre></div> <p>same with the pxl-off's</p> <div class="code"> <pre><code>:B :Pxl-Off(Ans,A :Pxl-Off(Ans-1,A :Pxl-Off(Ans-2,A</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-928340</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-928340</link>
				<description></description>
				<pubDate>Thu, 18 Nov 2010 05:08:12 +0000</pubDate>
				<wikidot:authorName>Kufii</wikidot:authorName>				<wikidot:authorUserId>622223</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I can't believe i missed the :Stop&#8230; It's so obvious</p> <p>As for the rand(5, that severely slows down movement</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-927986</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-927986</link>
				<description></description>
				<pubDate>Wed, 17 Nov 2010 22:12:44 +0000</pubDate>
				<wikidot:authorName>BlakPilar</wikidot:authorName>				<wikidot:authorUserId>538289</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Aha! I feel special! I found another optimization! Change</p> <div class="code"> <pre><code>:Text(57,1,S :Text(50,1,&quot;Score:</code></pre></div> <br /> to <div class="code"> <pre><code>:Text(50,1,&quot;Score: &quot;,S</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-927641</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-927641</link>
				<description></description>
				<pubDate>Wed, 17 Nov 2010 15:37:56 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I noticed a couple more optimizations you can make:</p> <div class="code"> <pre><code>:For(G,0,50 :randInt(0,94)→X :randInt(8,61)→Y :Pxl-On(Y,X :End can be :For(G,0,50 :Pxl-On(randInt(8,61),randInt(0,94 :End</code></pre></div> <div class="code"> <pre><code>:For(G,0,5 :End can be :rand(5</code></pre></div> <p>You can also get rid of the Stop command since it is at the end of the program.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-926257</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-926257</link>
				<description></description>
				<pubDate>Tue, 16 Nov 2010 03:40:23 +0000</pubDate>
				<wikidot:authorName>Kufii</wikidot:authorName>				<wikidot:authorUserId>622223</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Will do! Thanks</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-926248</guid>
				<title>Re: small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-926248</link>
				<description></description>
				<pubDate>Tue, 16 Nov 2010 03:32:51 +0000</pubDate>
				<wikidot:authorName>Xeda Elnara</wikidot:authorName>				<wikidot:authorUserId>595803</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>These are just simple optimizations&#8230;</p> <p>Instead of</p> <div class="code"> <pre><code>0→D</code></pre></div> <br /> do <div class="code"> <pre><code>Delvar D</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>While D=0</code></pre></div> <br /> do <div class="code"> <pre><code>While not(D</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>:randInt(0,94)→X :randInt(8,61)→Y</code></pre></div> <br /> do <div class="code"> <pre><code>:randInt(0,94→X :randInt(8,61→Y</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>:Repeat B=62 or D≠0</code></pre></div> <br /> do <div class="code"> <pre><code>:Repeat B=62 or D</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>A+sum(ΔList(K={24,26}))</code></pre></div> <br /> do <div class="code"> <pre><code>A+sum(ΔList(K={24,26</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>:Ans-1(A=94)+1(A=0)→A</code></pre></div> <br /> do <div class="code"> <pre><code>:Ans-(A=94)+not(A→A</code></pre></div> <p>Instead of</p> <div class="code"> <pre><code>:1(pxl-Test(B,A))+1(pxl-Test(B-1,A))+1(pxl-Test(B-2,A))→D</code></pre></div> <br /> do <div class="code"> <pre><code>:pxl-Test(B,A)+pxl-Test(B-1,A)+pxl-Test(B-2,A→D</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-284735#post-926240</guid>
				<title>small game optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-284735/small-game-optimization#post-926240</link>
				<description></description>
				<pubDate>Tue, 16 Nov 2010 03:17:18 +0000</pubDate>
				<wikidot:authorName>Kufii</wikidot:authorName>				<wikidot:authorUserId>622223</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So I just made my first &quot;real&quot; TI-Basic game. You play as a small line who falls. At the beginning of each round 50 dots are drawn on screen. Your goal is to reach the bottom without hitting any dots. I've been optimizing whatever I could for about 20 minutes. Anything I missed?</p> <div class="code"> <pre><code>:AxesOff :FnOff :0→Xmin:94→Xmax :0→Ymin:62→Ymax :0→D :-125→S :47→A:4→B :ClrDraw :Pt-On(49,61,2 :Pt-On(45,61,2 :While D=0 :Pxl-Off(B,A :Pxl-Off(B-1,A :Pxl-Off(B-2,A :47→A:4→B :S+125→S :For(G,0,50 :randInt(0,94)→X :randInt(8,61)→Y :Pxl-On(Y,X :End :Repeat B=62 or D≠0 :For(G,0,5 :End :Pxl-Off(B,A :Pxl-Off(B-1,A :Pxl-Off(B-2,A :B+1→B :A+sum(ΔList(K={24,26})) :Ans-1(A=94)+1(A=0)→A :1(pxl-Test(B,A))+1(pxl-Test(B-1,A))+1(pxl-Test(B-2,A))→D :Pxl-On(B,A :Pxl-On(B-1,A :Pxl-On(B-2,A :getKey→K :End :End :Text(1,1,&quot;DEATH! :Text(57,1,S :Text(50,1,&quot;Score: :Pause :ClrDraw :Stop</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>