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
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 11 Sep 2003 07:29:09 pm    Post subject:

For my game, it's necessary that I have sprites that may move indepent of the user, so, I made a routine:

ClrDraw
randInt(0,60->B
32->A
Lbl 1
Line(28,58,38,58
Line(28,50,38,50
Line(28,42,38,42
Line(28,34,38,34
Line(28,26,38,26
Line(28,18,38,18
B-1->B
Line(A,B+4,A+2,B+4,0
Line(A-1,B+3,A-1,B+3,0
Line(A+4,B+3,A+4,B+3,0
Line(A+1,B+1,A+2,B+1,0
Line(A,B,A+3,B
Line(A,B+3,A+3,B+3
Line(A,B,A,B+3
Line(A+3,B,A+3,B+3
Line(A-1,B+1,A-1,B+2
Line(A+4,B+1,A+4,B+2
For(X,1,15
Line(A+3,B+4,A+3,B+4
Line(A+2,B+4,A+2,B+4
End
For(X,1,15
Line(A+3,B+4,A+3,B+4,0
Line(A+2,B+4,A+2,B+4,0
End
For(Y,1,15
Line(A,B-1,A,B-1
Line(A+1,B-1,A+1,B-1
End
For(Y,1,15
Line(A,B-1,A,B-1,0
Line(A+1,B-1,A+1,B-1,0
End:Goto 1

The sprite looks something like this (but you can imagine the space between the colons to be filled):

*an overhead view of a person*
:::::::::
:::: ::::
:::: ::::
:::::::::

With alternating steps every time he SLOWLY inches forward. The problem's just that, it's too slow. Everything's always to slow for me. If I increase what number is subtracted from B (being Y) then it jumps in a glitchy kind of fashion, I'd just like it to be steady, quick, and smooth. any suggestions?
Back to top
Ben Trettel


Member


Joined: 17 Jul 2003
Posts: 153

Posted: 11 Sep 2003 07:59:40 pm    Post subject:

Use a asm sprite program. It's much easier and faster.
Back to top
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 12 Sep 2003 08:05:15 pm    Post subject:

that's the problem, I want to try to keep this all in BASIC
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