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
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 08 Dec 2009 01:10:36 am    Post subject:

I know this topic is over discussed, but I have tried several methods and none have worked. Again to late to post code, but is there any common tricks that work?
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 08 Dec 2009 06:42:32 am    Post subject:

I don't know what graphics are flickering.

It is Plot command, Text(, Ouput(, gray with xlib?
I need to know to give more specific tips.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 08 Dec 2009 11:05:42 am    Post subject:

Flickering is caused by an excessive time delay between the erasing of old pixels and the drawing of new ones.

Ideally, a sprite shouldn't update if nothing about it has changed. Wink
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 08 Dec 2009 12:38:59 pm    Post subject:

Hmm I see. And it tends to be when using Output and Pxl. I tend to not use point because the differences bewtween it and pxl-test.

And I usually have the code something like:

:4->A
:8->B
:Lbl1
:Output( A,B,"X"
:0->K
:While K=0
:getkey->K
:End
:Output(A,B," "// One space and a,b are my coordinates for character.
: A+(K=34)-(K=25)->A
:B+(K=26)-(K=24)->B
:Goto 1
Back to top
Ed H


Member


Joined: 30 Nov 2007
Posts: 138

Posted: 08 Dec 2009 05:57:08 pm    Post subject:

The solution is to only erase your graphic (by Outputting a blank space) when that graphic moves around, like Weregoose said.

Anyway, here is an unrelated point, but regarding the use of Pt- and Pxl- commands: http://tibasicdev.wikidot.com/friendly-window
Specifically, try running
:ZStandard
:84→Xmin
:-72→Ymin
:ZInteger

and compare the Pt- and Pxl- commands.


Last edited by Guest on 01 Jul 2010 10:01:09 am; edited 1 time in total
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 10 Dec 2009 10:39:37 pm    Post subject:

So a

If K<24 or K=/34 or K>26
goto 1
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 11 Dec 2009 05:49:32 pm    Post subject:

No, you are checking everything. Since K<24 or K>26 is always true, it will check everything.
Try this: K=/34 and 1<abs(K-25
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 17 Dec 2009 12:09:54 am    Post subject:

ztrumpet wrote:
No, you are checking everything. Since K<24 or K>26 is always true, it will check everything.
Try this: K=/34 and 1<abs(K-25

Hmmm. Thanks. I almost made a stupid post though. I was gonna say if k=24 then that wont work, before remembering the right key is 24.
Back to top
Eeems


Advanced Member


Joined: 25 Jan 2009
Posts: 277

Posted: 17 Dec 2009 01:31:54 am    Post subject:

Just pointing something I noticed earlier out
Code:
0->K
while K=0
getkey->K
End
is really slow compared to
Code:
repeat Ans
getkey
End
Ans->K
and to save a few bytes (although it's a wee bit slower)
Code:
repeat K
getkey->K
End
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 18 Dec 2009 11:56:47 pm    Post subject:

Eeems wrote:
Just pointing something I noticed earlier out
Code:
0->K
while K=0
getkey->K
End
is really slow compared to
Code:
repeat Ans
getkey
End
Ans->K
and to save a few bytes (although it's a wee bit slower)
Code:
repeat K
getkey->K
End



Hmm. I'll have to take a look. I've really ben using temporary things lately. KHaving a kind of programming block.
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