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
leofox
INF student


Super Elite (Last Title)


Joined: 11 Apr 2004
Posts: 3562

Posted: 05 Jun 2004 01:42:38 pm    Post subject:

I'm trying to make a simple walking program using CODEX sprites, but it does al weird. The last place of the figure isn't erased, so if you walk a bit the whole screen is full with those annoying figures i use. If i walk over an existing figure, it draws something weird, or erases something. Can someone post a good sprite walking code?
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 05 Jun 2004 02:31:17 pm    Post subject:

too lazy to optimize:


Code:
initial row -> R
initial column -> C
(display sprite at R,C
Repeat condition
R +or- step((getKey=34)-(getKey=25
Ans+64((Ans<minimum row)-(Ans>maximum row -> U
C +or- step((getKey=26)-(getKey=24
Ans+96((Ans<minimum column)-(Ans>maximum column -> V
If U+V-R-C:Then
(display sprite at U,V
(erase sprite at R,C
U->R
V->C
End
End


Last edited by Guest on 06 Jun 2004 02:00:33 pm; edited 1 time in total
Back to top
leofox
INF student


Super Elite (Last Title)


Joined: 11 Apr 2004
Posts: 3562

Posted: 05 Jun 2004 03:11:05 pm    Post subject:

it works good, except for some little mistakes:

using getkey->K and then K works a lot faster

they keys are reverse

except for that it works perfect. Thanks a lot!
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 06 Jun 2004 01:59:39 pm    Post subject:

Sorry, I was thinking pixels at the moment.
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 UTC - 5 Hours

 

Advertisement