The HTML Canvas element is great for mathematical games especially where you draw your own graphics based on interaction from the user.
Today’s game‘s geometrical theme tests whether the user can mimic the drawing of a diameter line across a circle … doesn’t sound hard, does it? But are things as easy as that?
Where you have the scenario in mathematics of a line touching a circle just the once, this is called a tangent. Today we draw you a tangent point, and that represents the middle of the top of the “Perfect T” we want you to draw, where the two user defined points draw the “T” that has two lines of equal length, meeting at right angles and not overshooting or falling short of the mark.
Here is the HTML programming source code for today’s tutorial you could call perfectt.html
There is functionality in this game to email a snapshot of the game and the PHP programming source code that helps facilitate this functionality for today’s tutorial you could call perfectt.php
See for yourself if it is as easy as it sounds … you start with 3000 points and see how many goes you can have surviving with a positive score here.
If this was interesting you may be interested in this too.
14 Responses to HTML Canvas Perfect T Game Primer Tutorial