Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
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.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 15 Feb 2004 10:43:43 pm    Post subject:

I got a While loop in my program that's the exact same for the 4 directions, but it doesn't seem to go up correctly. So far I have a basic snake that's 1 "." long and whenever it goes left down or right, you can see it, but whenever it goes up, it's barely seen. The only way I've seen to fix it is to put a For(I,1,25 End right after that. Is there anything else I could do? If you want I'll post the code.
Back to top
Bluefire


Member


Joined: 18 Jan 2004
Posts: 186

Posted: 16 Feb 2004 12:20:20 am    Post subject:

u dont have to but u could look at other snake codes or even rip one off (not reccomended but u can Razz )
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 16 Feb 2004 12:37:10 am    Post subject:

Lol, I was thinking about it. My thoughts on mine is that going up the screen is somehow faster than going in any other direction? Because my code for each direction is exactly the same except for their respective actions I.e. which coordinate which direction.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 16 Feb 2004 02:34:56 am    Post subject:

it may have to do with the way the calculator draws the pixels. please post your code.
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 16 Feb 2004 04:28:05 pm    Post subject:

This is only the basic code for going up (I'm planning on adding the main parts like making the snake longer and stuff later). I just wanted to see how the "." would run.
This is also the only arrow with a for loop in it so that you can actually see the dot going up. If you want it to be invisible take it off. Btw, this runs on a Silver edition so it could run slower on a regular 83+.

Code:
Lbl 4
While 1
getkey->A
Y-1->Y
Text(Y,X,Str2
For(I,1,10
End
Text(Y+F,X,"
If Y=0 or Y=62 or X=0 or X=94
Goto 3
If A=24 or A=26
Goto 2
End

A little explanation...
Str2 is the "." which gives the snake the look. The variable F is the length of the snake which tells the other text when to erase the snake. Label 3 is the screen that tells you you're dead. Label 2 is the directional part which establishes your direction.


Last edited by Guest on 16 Feb 2004 04:29:19 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 17 Feb 2004 07:37:34 am    Post subject:

Try Pxl-On(Y,X instead of that Text(Y,X,Str2

Also, don't use Y on the graphscreen, it'll get messed up.
Back to top
Display posts from previous:   
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.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement