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


 
 

 
 

Finding the number of hex tiles inside of a hex shaped grid…

EDIT: There is a mathematical formula that is much better than the method I illustrate below. It is: 3n^2 – 3n + 1 A huge thanks to Sam Hughes for very patiently helping me out with this formula. He’s the best mathe...
by Christopher McCulloh
0

 
 
 

JavaScript Haxagon Game Board with Hexagon tiles

I’m working on a JavaScript version of The Settlers of Catan. The first problem I decided to tackle was constructing (visually and array-structure wise) the game board using nothing but loops (didn’t want to hard co...
by Christopher McCulloh
2

 
 
 

Making the Ball Rotate

You asked for it, you got it. The ball now rotates. See it rotate I realized that I already am capturing how fast the ball is going along the “x” axis (left and right), and that I could rotate it simply by telling i...
by Christopher McCulloh
2

 

 
 

The Ball Will Bounce…

Turns out, the whole problem was that I forgot to actually “rotate” the line. Apparently there is a slope, and then there is a slope. If you draw the line as a sloped line, flash doesn’t consider it sloped. If...
by Christopher McCulloh
2

 
 
 

The Parts of a Triangle

Anyone remember Trigonometry? No? Me neither… Oh, wait, that’s right, I never really took it. Well, I took Algebra and Geometry, but never a class specifically called Trigonometry. Is there such a thing? I’m s...
by Christopher McCulloh
2

 
 
 

Lookup Tables for Math Equations

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 e...
by Christopher McCulloh
0