Step One - Game Maker 8 Math Functions
This section of the tutorial will serve as a reference to the math functions built into Game Maker 8's GML Language. It will also include a description of the functionality of each command. Where you see the '#' symbol you should replace it with your desired numerical value as a parameter.
Game Maker 8 Math Functions:
Random(#) - This command will generate a random number smaller than the given parameter.
Random_Range(#, #) - Another random generation function. This one will return a number greater than the first parameter and smaller than the second.
Abs(#) - Give the absolute number of the given parameter.
Round(#) - Retrieves the rounded form of a number closest to the given parameter.
Sqrt(#) - As can be easily deduced, this function returns the square root of the number given.
Sin(#) - Retrieves the sine value of the parameter.
Cos(#) - Gets the cosine of the given parameter.
Tan(#) - Finds the tangent of the numerical parameter.
ArcSin(#) - Gets the arc( or inverse) sine of the supplied parameter.
ArcCos(#) - Retrieves the arc( or inverse) cosine of the parameter.
ArcTan(#) - Finds the arc( or inverse) tangent of #.
DegToRad(#) - Changes the value of the given number from degrees to radians.
RadToDeg(#) - Changes the value of the given number from radians to degrees.
Mean(#, #, #, etc.) - Finds the mean( or average) of the given numbers.
Median(#, #, #, etc.) - Finds the middle value of the given parameter values.
If you receive an error with the listed function make sure to enter them in lower case and supply the correct parameter.
Conclusion
Above are highlighted some of Game Maker's most used mathematical abilities. For a more comprehensive list, with more information and usage examples, please check out the Game Maker 8 manual, included with your copy of Game Maker.
NOTE:
It is typical in the Game Maker community to ask for credit, however these scripts are provided absolutely free and require no credit what so ever.
Published by James Cloud
I like to program and do basically anything that has to do with technology and computers. View profile
Free Game Maker SoftwareYou don't need any special knowledge to create computer games. With Game Maker, you can be creating computer games of your own within a matter of hours.- Game Maker Mplay ExampleLearn to code GML to make a mplay game to play over the internet.
- Invert Then Multiply: Everyday Math Examples for KidsAs students, we had to take algebra and calculus but we survived; unfortunately, our leftover negativity toward math adversely affects how our young learners respond to math.
Websites for Free Math HelpSeveral websites that offer free math tutoring, lessons, worksheets, tools and games for basic math, fractions,decimals, algebra,geometry, trigonometry, calculus and more. Good...- Review: Monopoly City Streets - the Largest Game of Monopoly in the WorldMonopoly City Streets is the newest creation from Google and Hasbro that allows people to play the classic Monopoly game with Google Maps.
- Game Maker: Every Programmer's Dream
- Game Maker 8 Tutorial: Draw HUD Elements in 3D
- Game Maker 8 Tutorial: Generate a Hexagonal Grid
- Game Maker 8 Tutorial: Keyboard, Mouse and Joystick Input
- Want to Make Your Own Computer Games? a Game Maker 7 Review
- Software Review: Game Maker
- A Review of Game Maker




