This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

TI-Basic => TI-BASIC
Author Message
kinkoa

Member

Joined: 28 Jul 2009
Posts: 103

 Posted: 30 Oct 2009 11:36:03 am    Post subject: I have made a pong game about a year ago and i posted it a few months ago on here but my calc batteries died and i didnt have a backup. i had the code alot more advanced than the one posted but no longer have it and i would like help to improve it. its on my calc again but in its primative form
dxfan101010

Member

Joined: 31 Mar 2008
Posts: 194

 Posted: 30 Oct 2009 12:45:53 pm    Post subject: shadowking wrote:Im working on an update for this that will be much faster this is the main code though Code: ``` PROGRAM:PONG :ClrHome :Output(4,1,"::::::PONG::::::BY: ADAM WHEELER :Pause :Lbl 1 :-1→I:0→k :7→A:8→B :1→X:-1→Y :6→Z :While (K=0 :ClrHome :Output(A,B,"O :Output(8,Z,"---" :If A=1 :-X→X :If A=7 and B≥Z and B≤Z+3 :-X→X :If A=7:I+1→I :Output(1,1,I :Output(1,14,U :If B=1 xor B=16 :-Y→Y :V-1(A=8→V :End :A+X→A :B+Y→B :Getkey :Z+(ans=26)-(ans=24 :Ans-14(Ans=15)+14not(Ans->Z :End :Output(4,5,"YOU LOSE :Pause :If I>U:Then :I→U :Output(4,2,"NEW HIGH SCORE :Output(5,8,U :Goto 2 :Else :Goto 2 :Lbl 2 :Menu("PLAY AGAIN","YES",1,"NO",3 :Lbl 3 :ClrHome ``` are we talking about this game 0→k becomes Delvar K the While shoulnt have a ( i think but thats all i see at the momentLast edited by Guest on 30 Oct 2009 12:53:27 pm; edited 1 time in total
kinkoa

Member

Joined: 28 Jul 2009
Posts: 103

 Posted: 30 Oct 2009 01:44:21 pm    Post subject: yes that one but i have made 4 difficulty settings easy medium hard and expert i have a high score board and advanced menus to work on as well as the main game code, it also uses sub-routines (they cause faulty framework if not used correctly) and i have to redo all of it because the batteries died before i got the chance to back it up on my computer
dxfan101010

Member

Joined: 31 Mar 2008
Posts: 194

 Posted: 30 Oct 2009 01:49:13 pm    Post subject: Why wasnt it archived? Im sorry you lost it ? ill help as much as i can with code.
ztrumpet

Active Member

Joined: 06 May 2009
Posts: 555

 Posted: 30 Oct 2009 02:26:34 pm    Post subject: Sorry you lost it... :( Good luck. I'll help.
kinkoa

Member

Joined: 28 Jul 2009
Posts: 103

 Posted: 30 Oct 2009 10:23:53 pm    Post subject: it wasnt archived because i played it requently and thanks for the offers to help th code currently in my calc is a subroutine program that i rebuilt from memory but its not as efficient The main game Code: ```program:pongx lbl 1 clrhome menu("pong.x game menu","play",2,"settings",3,"instructions",4,"about",5,"quit",6 lbl 2 if r<1:1→r if r>4:4→r if r=1:prgmZD1     \\starts gameplay in coherence with the difficulty setting if r=2:prgmZD2 if r=3:prgmZD3 if r=4:prgmZD4 lbl 3 clrhome menu("settings","difficulty",7,"high scores",8,"back",1 lbl 7 menu("difficulty","easy",9,"medium",10,"hard",11,"expert",12 lbl 9                   -- 1→r:goto 3 lbl 10 2→r:goto 3 lbl 11                sets difficulty level 3→r:goto 3 lbl 12 4→r:goto 3        -- lbl 8 prgmZHS lbl 4 prgmZIN lbl 5 prgmZAB lbl 6 clrhome``` the easy difficulty prgm Code: ```Lbl 1 :-1→I:0→k :7→A:8→B :1→X:-1→Y :6→Z :While (K=0 :ClrHome :Output(A,B,"O :Output(8,Z,"(---)" :If A=1 :-X→X :If A=7 and B≥Z and B≤Z+5 :-X→X :If A=7 :I+1→I :Output(1,1,I :Output(1,14,U :If B=1 or B=16 :-Y→Y :V-1(A=8→V :End :A+X→A :B+Y→B :Getkey :Z+(ans=26)-(ans=24 :Ans-12(Ans=13)+12not(Ans->Z :End:Output(4,5,"YOU LOSE :Pause :If I>U:Then :I→U :Output(4,2,"NEW HIGH SCORE :Output(5,8,U :Goto 2 :Else :Goto 2 :Lbl 2 :Menu("PLAY AGAIN","YES",1,"NO",3 :Lbl 3 :prgmPONGX```Last edited by Guest on 30 Oct 2009 10:49:46 pm; edited 1 time in total
DrDnar

Member

Joined: 28 Aug 2009
Posts: 116

 Posted: 30 Oct 2009 10:48:06 pm    Post subject: Have you ever archived it? If so, you may still be able to recover a copy of, provided it was archived at least once since the last garbage collect. You can find my undeleter on ticalc.org. Hope it works.
kinkoa

Member

Joined: 28 Jul 2009
Posts: 103

 Posted: 30 Oct 2009 10:51:21 pm    Post subject: [quote name='Dr. D'nar' post='138092' date='Oct 31 2009, 04:48 AM']Have you ever archived it? If so, you may still be able to recover a copy of, provided it was archived at least once since the last garbage collect. You can find my undeleter on ticalc.org. Hope it works.[/quote] yes i have archived it before but i ran a garbage collect on it so it wont work
Bhaliar

Member

Joined: 16 Nov 2009
Posts: 221

 Posted: 16 Nov 2009 07:01:51 pm    Post subject: :If I>U:Then :I→U :Output(4,2,"NEW HIGH SCORE :Output(5,8,U :Goto 2 :Else :Goto 2 :Lbl 2 :Menu("PLAY AGAIN","YES",1,"NO",3 :Lbl 3 :prgmPONGX I might be to late but at the bottom I noticed this part of the code. Its a bit of an overkill. You could just cut it with an end. If i missed a part of the code that needs that label sorry. That and the last code you posted used the label 2 In two different spots. Hope it helps if not sorry.
kinkoa

Member

Joined: 28 Jul 2009
Posts: 103

 Posted: 18 Nov 2009 09:38:00 am    Post subject: yeah i didnt think about it when i wrote the code but thanks for the correction
 Display posts from previous: All Posts Oldest FirstNewest First
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
 Page 1 of 1 » All times are UTC - 5 Hours