Formulas and values

Any number can be a formula. The ƒx helper, game values, functions, values and switches.

  1. What a formula isScore + 10, Random(5), X("Ball"). Where you can type one.
  2. The ƒx helperClick instead of typing: objects, game values and functions with examples.
  3. Game valuesScore, Lives, Timer, MouseX and friends.
  4. Object valuesX("Ball"), Speed("Hero"), Value("Slime","A") and the rest.
  5. FunctionsRandom, Abs, Min, Max, Floor, Round, Str, Len, Distance, Angle and more.
  6. RandomRandom(10) gives 0 to 9. Making things unpredictable.
  7. Distance and AngleHow far apart two sprites are, and which way one is from the other.
  8. Global values A to ZNumbers every level shares. Keys collected across a whole game.
  9. Values and switches on objectsTen numbers and eight switches per copy, and when to use them.
  10. Text formulasStr, Val, Len, Left, Right, Mid, and the text in a text box.
  11. Ten useful formulasCopy these into your games.

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.