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 Your Projects 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. Project Releases => Your Projects
Author Message
lordofthegeeks


Advanced Member


Joined: 13 Jul 2007
Posts: 280

Posted: 10 Jul 2008 08:12:49 am    Post subject:

File Name :: Stacker
Author :: lordofthegeeks
Category :: Ti-83plus Basic Games
Screenshot ::
Description ::
A game I cloned from a Arcade game.

The goal is to stack the blocks as high as you can.
it gets harder as you go.

Requires xlib version .602b (included with the file)

View File
Back to top
lordofthegeeks


Advanced Member


Joined: 13 Jul 2007
Posts: 280

Posted: 10 Jul 2008 08:22:24 pm    Post subject:

can anybody make this run any faster?
Back to top
black-salamander


Newbie


Joined: 07 Apr 2008
Posts: 49

Posted: 10 Jul 2008 10:40:17 pm    Post subject:

Well, your program seems to run fast enough already, though I am pretty sure there are minuscule shavings that can be done to the program. Otherwise, well done lordofthegeeks!
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 10 Jul 2008 11:46:11 pm    Post subject:

I'm seeing a lot of things that you can do with this, but I'll only offer a few.

randInt(0,1
If not(Ans
Then
‾1→D
Else
1→D
End

Let that become 1-2int(2rand→D. Type it on the home screen to see that it works the same.

Instead of writing If C=3(S>1 and the like, try to use If C=3 and S>1. That's what the logical operators are for. Plus, they are faster.

Of course, try to remove any trailing parentheses where it is helpful*, and look for items such as (X+1)+10L, where they can be dropped while maintaining the same order of evaluation.

* If at any point you were taught that replacing an If condition:command with If condition:Then:command:End makes a program run a lot faster, then note that it's only true if the condition is false and the appropriate For( doesn't have an ending parenthesis on it. In fact, that single combination is what makes a program run slower than normal. So, in any For( loop where you can reduce an If-Then to just a single If, do that, but put a closing parenthesis at the end of the parent For( afterward. This will make your program run faster – not slower.

To make this absolutely clear (for all ears), the fix that you might have heard regarding an additional Then and End... That fix should have been putting a closing parenthesis on the end of a For( instruction. That's it. No buts about it. Wink


Last edited by Guest on 30 Jul 2010 05:31:29 am; edited 1 time in total
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 11 Jul 2008 12:01:55 am    Post subject:

its only a slow down when the If is right after the For( statement so if there is a line in between the For( and the If commands you don't even need the closing parenthesizes.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 11 Jul 2008 12:08:03 am    Post subject:

TheStorm wrote:
its only a slow down when the If is right after the For( statement so if there is a line in between the For( and the If commands you don't even need the closing parenthesizes.
Hmm, that does appear to be true. So, adding a colon instead of a closing parenthesis would do just fine.

Last edited by Guest on 11 Jul 2008 12:08:25 am; edited 1 time in total
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