Castagne Engine

Documentation (Dev Branch)

Castagne Engine

Getting Started

Editor

Gametypes

Intermediate

Making a Game

Pushing Castagne

Advanced

Modules

Functions Reference

Additional helper functions for the engine that don't fit in a dedicated module.

Mathematics (Advanced)

More complex mathematical functions.

Functions

Cos[2, 3][Init, Action, Manual]
Returns the cosine of an angle (in milliradians) multiplied by a variable.
  • Arg 1: Variable
  • Arg 2: Angle
  • Arg 3: (Optional) Destination Variable
Sin[2, 3][Init, Action, Manual]
Returns the sine of an angle (in milliradians) multiplied by a variable.
  • Arg 1: Variable
  • Arg 2: Angle
  • Arg 3: (Optional) Destination Variable
CosD[2, 3][Init, Action, Manual]
Returns the cosine of an angle (in tenths of degrees) multiplied by a variable.
  • Arg 1: Variable
  • Arg 2: Angle
  • Arg 3: (Optional) Destination Variable
SinD[2, 3][Init, Action, Manual]
Returns the sine of an angle (in tenths of degrees) multiplied by a variable.
  • Arg 1: Variable
  • Arg 2: Angle
  • Arg 3: (Optional) Destination Variable

Animations

Functions relating to the animation system. This will be moved later to graphics.

Functions

Anim[1, 2][Init, Action, Manual]
Plays an animation frame by frame. The animation updates only when this function is called, and starts at the first frame the function is called.
  • Arg 1: Animation Name
  • Arg 2: (Optional) Offset
AnimFrame[1, 2][Init, Action, Manual]
Plays an animation frame by frame. The animation updates only when this function is called, and if not specified will use the amount of frames you were in that state..
  • Arg 1: Animation Name
  • Arg 2: (Optional) The frame to display
AnimProgress[0, 1][Init, Action, Manual]
Progresses an already playing animation. Can also be used to scroll.
  • Arg 1: (Optional) Amount of frames to progress
AnimLoop[1, 2][Init, Action, Manual]
Loops an animation around by setting it to the start point when reaching the specified frame.
  • Arg 1: Loop point (exclusive)
  • Arg 2: (Optional) Start point of the loop.
AnimReset[0][Init, Action, Manual]
Resets the animation variables.

Variables

_AnimNull[]
Currently playing animation.
_AnimFrame0[]
Current frame of the animation to show.
_AnimStartFrame0[]
Remembers when the animation started, for the Anim function
_AnimOffsetNull[]
Remembers an offset for the Anim function