<?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>Comments for page &quot;Pong CE&quot;</title>
		<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce</link>
		<description>Posts in the discussion thread &quot;Pong CE&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 14 Jun 2026 22:38:00 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-7023582</guid>
				<title>Color Optimization</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-7023582</link>
				<description></description>
				<pubDate>Fri, 06 Jun 2025 21:02:36 +0000</pubDate>
				<wikidot:authorName>OK Calculator</wikidot:authorName>				<wikidot:authorUserId>9664703</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi there.</p> <p>I'm fairly new to this website, so I'm not sure if I am allowed to post on old threads. I thought it is okay for this since it is on archives, though.<br /> I was looking through this code, and it looks like you used Lbls and Gotos to change the color of the paddle with a menu command. To make this much simpler and more efficient, something I have done in the past is to save colors to a string and call a character from the string. Here is an example of it's use in making fireworks:</p> <div class="code"> <pre><code>If A≠10101:Disp &quot;PRGM IS LOCKED:Wait 4:Stop:End ClrHome ClrTable Lbl 5 DispGraph Output(3,8,&quot;HIGH SCORE:&quot; Line(80,60,­105,60,1,YELLOW) Line(­105,110,80,110,5,YELLOW) Line(80,60,80,110,2,YELLOW) Line(­105,60,­105,110,2,YELLOW) length(toString(⌊HIGH) Output(6,8,⌊HIGH(1 Output(6,7+Ans,&quot;SECONDS!&quot;) randInt(1,5) If Ans=1:TextColor(BLUE If Ans=2:TextColor(RED If Ans=3:TextColor(MAGENTA If Ans=4:TextColor(GREEN If Ans=5:TextColor(ORANGE Text(145,15,&quot;PRESS ENTER TO RETURN TO THE MENU&quot; Text(randInt(1,150),randInt(1,250),&quot;* Text(randInt(1,150),randInt(1,250),&quot;* TextColor(BLUE Text(randInt(1,150),randInt(1,250),&quot;* TextColor(RED Text(randInt(1,150),randInt(1,250),&quot;* TextColor(MAGENTA Text(randInt(1,150),randInt(1,250),&quot;* TextColor(GREEN Text(randInt(1,150),randInt(1,250),&quot;* TextColor(ORANGE Text(randInt(1,150),randInt(1,250),&quot;* ClrTable getKey→K If K≠105:Goto 5 10101→A prgmCHASE</code></pre></div> <br /> For your use, you could have rows of text and a &quot;&gt;&quot; that moves with a up and down, stores to a variable, and takes that color from the string.<br /> Once again, I am fairly new, so I'm not sure if this would work on all calculators. I would be glad if this could help you.<br /> Also Myles, thank you for contributing so much to the wikidot community; I love your programs.<br /> Thanks!
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-3573041</guid>
				<title>Re: Written Code</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-3573041</link>
				<description></description>
				<pubDate>Thu, 17 Aug 2017 22:33:35 +0000</pubDate>
				<wikidot:authorName>Myles_Zadok</wikidot:authorName>				<wikidot:authorUserId>2935702</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ok. That's what I did, where either 5 or -5 was stored to the velocity variables. I was originally going to use trig, but I quickly decided that wouldn't be a practical method.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-3573007</guid>
				<title>Re: Written Code</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-3573007</link>
				<description></description>
				<pubDate>Thu, 17 Aug 2017 20:58:09 +0000</pubDate>
				<wikidot:authorName>kg583</wikidot:authorName>				<wikidot:authorUserId>2203149</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>My movement math is fairly simple: The ball has an X and Y velocity, stored as P and Q. The ball's coords change by P and Q each frame. When the ball hits a surface (either the floor/ceiling or paddles), the velocity for that direction is negated. The other velocity component is unaffected.</p> <p>So, if the ball hits the floor, its downward Y velocity is negated (-Q→Q) to become upward velocity. If it hits your paddle, its rightward X velocity is negated (-P→P) to become leftward velocity.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-3572857</guid>
				<title>Re: Written Code</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-3572857</link>
				<description></description>
				<pubDate>Thu, 17 Aug 2017 16:39:30 +0000</pubDate>
				<wikidot:authorName>Myles_Zadok</wikidot:authorName>				<wikidot:authorUserId>2935702</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I had issues with speed at first, when the program had a whole bunch of glitches. I got the program to run faster after I fixed the glitches. I stored important values to variables and had conditionals check the value of the variables to determine which direction the ball should move, and which direction the AI should move. (Competent AI is hard to make, by the way). I had to keep the conditionals simple to make the program fast, but that was something I could work with.</p> <p>As far as I can see, the Wait commands are the only thing preventing the program from running on a CSE. I did that intentionally, because I felt that using the Wait command would be more efficient than a different method. Someone could easily change those lines of code and have a working Pong game on a CSE. I'm pretty sure there are other CE exclusive commands, but I believe Wait is the only one I used.</p> <p>EDIT: How did you choose to make the ball to move? I'm curious about the methodology of your movement math, since I didn't do what I originally planned on doing with the ball's movement.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-3572369</guid>
				<title>Re: Written Code</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-3572369</link>
				<description></description>
				<pubDate>Thu, 17 Aug 2017 03:20:05 +0000</pubDate>
				<wikidot:authorName>kg583</wikidot:authorName>				<wikidot:authorUserId>2203149</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Might I ask how fast the game is able to run? I tried throwing a simple version together on my CE in my study hall today and it was functional but <em>really</em> slow.<br /> Here's the code, with just the game loop and a basic AI for the second player.</p> <div class="code"> <pre><code>:ClrDraw :AxesOff :BackgroundOff :0→Ymax :-164→Ymin :0→Xmin :1→ΔX :12→C :Horizontal Ymin+1,Ans :Horizontal 0,Ans :Vertical 0,Ans :Vertical Xmax-1,Ans :2randInt(-26,-66→B :132→A :-82→X :Ans→U :Delvar D2→P :2→Q :240→G :14→H :Repeat K=45 or E&gt;G or E&lt;H :C:Pt-On(A,B,2,Ans :Line(G,X+Ans,G,X-Ans,Ans :Line(H,U+Ans,H,U-Ans,Ans :getKey→K :X+3((Ans=25)(X≠-16)-(Ans=34)(X≠-148→Z :If X≠Ans :Then :(X&lt;Ans)-(Ans&lt;X :Pt-Off(G,X-CAns :Z→X :End :U+3((U+C&lt;B)-(U-C&gt;B→V :If U≠Ans :Then :(U&lt;Ans)-(Ans&lt;U :Pt-Off(H,U-CAns :V→U :End :A+P→E :B+Q→F :If F=-158 or F=-6 :-Q→Q :If E=236 and abs(F-X)≤C or E=18 and abs(F-U)≤C :-P→P :Pt-Off(A,B,2 :E→A :F→B :End</code></pre></div> <p>Also, are the <a href="http://tibasicdev.wikidot.com/wait">Wait</a> commands the only thing stopping a port to CSE? Cause there are other ways to cause delays that work on older OS's.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-3320031#post-3572295</guid>
				<title>Written Code</title>
				<link>http://tibasicdev.wikidot.com/forum/t-3320031/pong-ce#post-3572295</link>
				<description></description>
				<pubDate>Thu, 17 Aug 2017 00:31:26 +0000</pubDate>
				<wikidot:authorName>Myles_Zadok</wikidot:authorName>				<wikidot:authorUserId>2935702</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here is a working Pong for CE calculators (Note that this will NOT work on CSE calculators).</p> <div class="code"> <pre><code>164→Ymax 0→Ymin 0→Xmin 264→Xmax ClrDraw CoordOff GridOff AxesOff LabelOff ExprOff BorderColor 1 BackgroundOn WHITE DetectAsymOff Thick 10→P 12→Q Lbl A ClrDraw Menu(&quot; Select Game Mode &quot;,&quot;Versus&quot;,V,&quot;Score&quot;,S,&quot;Color&quot;,C,&quot;Quit&quot;,Q Lbl C Menu(&quot; Choose Color &quot;,&quot;BLUE&quot;,1,&quot;RED&quot;,2,&quot;YELLOW&quot;,3,&quot;MAGENTA&quot;,4,&quot;GREEN&quot;,5,&quot;ORANGE&quot;,6,&quot;BROWN&quot;,7,&quot;NAVY&quot;,8,&quot;LTBLUE&quot;,9 Lbl 1 10→P Goto A Lbl 2 11→P Goto A Lbl 3 19→P Goto A Lbl 4 13→P Goto A Lbl 5 14→P Goto A Lbl 6 15→P Goto A Lbl 7 16→P Goto A Lbl 8 17→P Goto A Lbl 9 18→P Goto A Lbl V If P=19:Then BackgroundOn MEDGRAY 20→Q End Horizontal 145,Q Horizontal 15,Q 0→X 0→Y TextColor(P Text(3,10,&quot;You:&quot; Text(3,60,X TextColor(Q Text(3,180,&quot;CPU:&quot; Text(3,230,Y 30→A 40→B Line(25,A,25,B,P) 80→I 95→J Line(240,I,240,J,Q) 130→C 80→D 130→E 80→F 5→N 5→O N→G O→H Pt-On(C,D,2,Q DispGraph Repeat X=8 or Y=8 getKey→K If K=25 and B≠140 Then Line(25,A,25,B,0) A+10→A B+10→B Line(25,A,25,B,P) DispGraph Else Line(25,A,25,B,P) End If K=34 and A≠20 Then Line(25,A,25,B,0) A-10→A B-10→B Line(25,A,25,B,P) DispGraph Else Line(25,A,25,B,P) End If K=21 Then Pause End Pt-Off(C,D,2 C→E C+G→C D→F D+H→D Pt-On(C,D,2,Q If D=140 and E&gt;C Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q End If D=140 and E&lt;C Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q End If D=20 and E&gt;C Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q End If D=20 and E&lt;C Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q End If C=30 and F&gt;D Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q Else Y+1→Y TextColor(Q Text(3,230,Y Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=30 and F&lt;D Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q Else Y+1→Y TextColor(Q Text(3,230,Y Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=235 and F&gt;D Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q Else X+1→X TextColor(P Text(3,60,X Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=235 and F&lt;D Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q Else X+1→X TextColor(P Text(3,60,X Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=30 and D=140 Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q Else Y+1→Y TextColor(Q Text(3,230,Y Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=30 and D=20 Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q Else Y+1→Y TextColor(Q Text(3,230,Y Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=235 and D=20 Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q Else X+1→X TextColor(P Text(3,60,X Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If C=235 and D=140 Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q Else X+1→X TextColor(P Text(3,60,X Wait 3 Pt-Off(C,D,2 130→C 80→D 130→E 80→F Pt-On(C,D,2,Q Wait 3 End End If rand≤.55 Then If H=5 Then If (D+5)&gt;J and J≠140 Then Line(240,I,240,J,0 I+3H→I J+3H→J Line(240,I,240,J,Q Else Line(240,I,240,J,Q End End If H=­5 Then If (D-5)&lt;I and I≠20 Then Line(240,I,240,J,0) I+3H→I J+3H→J Line(240,I,240,J,Q) Else Line(240,I,240,J,Q) End End End End ClrDraw If X=8 Then TextColor(P Text(40,80,&quot;You Won!&quot; Pause Else TextColor(Q Text(40,80,&quot;CPU Won!&quot; Pause End Goto A Lbl S If P=19:Then BackgroundOn MEDGRAY 20→Q End Horizontal 145,Q Horizontal 15,Q 0→X 0→Y TextColor(P Text(3,10,&quot;Score:&quot; Text(3,60,X 70→A 80→B Line(25,A,25,B,P 15→I 145→J Line(240,I,240,J,Q) 130→C 80→D 130→E 80→F ­5→G ­5→H 5→N 5→O Pt-On(C,D,2,Q DispGraph Repeat X=1000000 getKey→K If K=25 and B≠140 Then Line(25,A,25,B,0) A+10→A B+10→B Line(25,A,25,B,P) DispGraph Else Line(25,A,25,B,P) End If K=34 and A≠20 Then Line(25,A,25,B,0) A-10→A B-10→B Line(25,A,25,B,P) DispGraph Else Line(25,A,25,B,P) End If K=21 Then Pause End Pt-Off(C,D,2 C→E C+G→C D→F D+H→D Pt-On(C,D,2,Q If D=140 and E&gt;C Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q End If D=140 and E&lt;C Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q End If D=20 and E&gt;C Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q End If D=20 and E&lt;C Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q End If C=30 and F&gt;D Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q Else Goto AA End End If C=30 and F&lt;D Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q Else Goto AA End End If C=235 and F&gt;D Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q X+1→X TextColor(P Text(3,60,X End End If C=235 and F&lt;D Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q X+1→X TextColor(P Text(3,60,X End End If C=30 and D=140 Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F ­O→H C→E N→G Pt-On(C,D,2,Q Else Goto AA End End If C=30 and D=20 Then If A≤D and D≤B Then Pt-Off(C,D,2 D→F O→H C→E N→G Pt-On(C,D,2,Q Else Goto AA End End If C=235 and D=20 Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F O→H C→E ­N→G Pt-On(C,D,2,Q X+1→X TextColor(P Text(3,60,X End End If C=235 and D=140 Then If I≤D and D≤J Then Pt-Off(C,D,2 D→F ­O→H C→E ­N→G Pt-On(C,D,2,Q X+1→X TextColor(P Text(3,60,X End End End Lbl AA ClrDraw TextColor(P Text(40,80,&quot;Game Over&quot; TextColor(P Text(60,80,&quot;Your Score:&quot; Text(60,180,X Pause End Goto A Lbl Q Stop</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>