Re: TIB: Speed-Up


[Prev][Next][Index][Thread]

Re: TIB: Speed-Up



At 10:08 PM 10/9/97 -0400, you wrote:
>I am working on  a scorched earth clone (haven't we all?) for the ti-92.
This will be the difinitive, I hope... anyways.. my trajectory program is
slower than a similar program on my ti-83, even though the one on the 83 is
longer and more complex!! would anyone have any ideas on how to speed up
calculations?

Check out Scorched Earth for the 82.  It is a pretty awesome game that
moves at a fair rate.  You can download it from
<http://shinelight.home.ml.org/> and look in the archives section for it.
My dad calculated most of the algorithms from calculus equations (I was
only in Algebra II then) for trajectory paths.  I did the rest of the
programming on my own.  It could use an optimization here or there that
I've picked up since then, but otherwise its pretty good for that type of
game.

Optimization 1: Pre-calculate the Sine and Cosine values based on the angle.
Optimization 2: Simplify your equations to the minimum possible and use as few
  bytes and parenthesis as possible.
Optimization 3: Don't use circles for the explosions, diamonds or Quick
  Circles (my own creation of eight point circles) work the fastest.

There are probably others, but you will have to learn about them over time.

Hope that helped,

                 Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
         http://www.geocities.com/SiliconValley/Heights/8504
                    http://shinelight.home.ml.org


References: