Chomper Stomping
jQuery/JavaScript/CSS 3/HTML 5, Java/PHP/Python/ActionScript, Git, Chrome/Firefox Extensions, Wordpress/Game/iPhone App Development and other random techie tidbits I've collected



math & physics

September 22, 2007

Lookup Tables for Math Equations

More articles by »
Written by: Christopher McCulloh

Well, I’ve begun creating little tutorials for myself.

The problem is that it sometimes can be months between flash game projects, and I often forget some of the things I learned last time around (although they are much easier to re-learn, but I usually just re-member).

So I started taking notes, but then I started just making little flash examples for myself, and then thought about it some, and just went ahead and started making a little tutorial.

I’ve never actually seen this technique used or suggested anywhere online (although I’m sure it’s not original to me). So, I am posting it here (soon to be followed by many others).

What this does is allows you to take a complex equation, which will bring your flash game to it’s knees, and predict different inputs and pre-calculate outputs. Then during the game if you didn’t happen to predict an input, it will go ahead and calculate for that input, but then from that point forward consider that calculation as a “pre-calculated” calculation.

I’ve not actually used this technique in any game yet, and I know there will have to be some adjustments to it (you will probably have to round to whole numbers, because I don’t think it will work with decimal inputs, or you will have to multiply everything by 100 to allow for decimals to the second place). So basically, if anyone uses this technique, let me know how it turns out please!
Tutorial Page
Source Code



About the Author

Christopher McCulloh
E-Commerce developer at Finish Line Co-Author of HTML, XHTML and CSS All-in-one Desk Reference for Dummies Graduated from IU with a Bachelors of Media Arts and Science and a Certificate in Applied Computer Science. Tech Editor for Building Facebook Applications for Dummies and Building Websites All-in-one for Dummies 2nd Edition. Creator and maintainer of the Status-bar Calculator Firefox Extension Three years professional experience in Java E-Commerce Development and four years professional experience with PHP for a combined total of seven years professional JavaScript/HTML/CSS experience




 
 

 
Screen Shot 2012-05-02 at 10.23.54 AM

Douglas Crockford – JavaScript the Good Parts

Really good lecture on JavaScript, especially if you are new to the language from another language like Java.
by Christopher McCulloh
0

 
 
cloudwars

Let the Cloud Wars Begin!!!

This is all going the same direction. They are all going to end up with unlimited storage for the same price point per year, so, the sooner one of them calls it and just offers that, the better that one will do. They need to ju...
by Christopher McCulloh
0

 
 
logo

dynode Batch Get Item

Working a lot with node.js, dynode and dynamoDB recently. Still trying to wrap my head around it all. Had a horrible time getting dynode.batchGetItem to work. Here is the error I was getting: { name: 'AmazonError', type: 'Valid...
by Christopher McCulloh
0

 

 
mysqlerror

WP phpBB Bridge: Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in wp-content/plugins/wp-phpbb-bridge/inc/widgets/wpbb_topics_widget.php on line 149 This is an error caused by the fact that the WP phpBB Bridge pl...
by Christopher McCulloh
0

 
 
 

Events Calendar Pro Nav Formatting Messed up on Empty Calendar

The Events Calendar Pro (from http://tri.be/) has a few problems. If you are trying to figure out why a calendar with no events in that month has completely screwed up header navigation, just put this line of code inside of tab...
by Christopher McCulloh
5

 




0 Comments


Be the first to comment!


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>