Types

Animation

Animations are created from an Animation Script. Each animation tracks
the current frame for one animation sequence. You update this animation
and draw with it. This allows you to have the one script being used to
create lots of individual animations, where each animation is potentially
at a different frame.

Animation Script

Animations in SplashKit are controlled by an animation script. This
script tells SplashKit how long to play each frame, which cell in the
bitmap the frame relates to, and which is the next frame. You load these
scripts from file and can then use them to create animations that are
used with the drawing options when you draw a bitmap.

Bitmap

Bitmaps represent image resources in SplashKit. You can load these from
file, download them from the internet, or create and draw them yourself.
Once created or loaded, you can draw the bitmap and you can draw onto
the bitmap.

Circle

Circles have a center point and a radius. This means that, unlike shapes
like the Rectangle, the circle extends out both left and right, and up
and down from the point you position it at.

Which cell of a bitmap to draw, or -1 for all. Overrides
parts and animation settings.

Font

Fonts are used to draw text in SplashKit. These can be loaded from file
or downloaded from the internet. Once you have a font you can use the
draw text procedures to use that font when drawing.

Font Style

Use font styles to set the style of a font. Setting the style is time
consuming, so create alternative font variables for each different
style you want to work with. Note that these values can be logical
ORed together to combine styles, e.g. BoldFont or ItalicFont = both
bold and italic.

Constants

Name

Description

Normal Font

Normal font.

Bold Font

Bold font.

Italic Font

Italic font.

Underline Font

Underlined font.

HTTP Status Code

Defines the HTTP status codes supported by SplashKit.
Refer to this article
for a detailed description of each code.

Constants

Name

Description

HTTP Status Ok

The server accepted the request.

HTTP Status Created

The request has been fulfilled, resulting in the creation of a new resource.

HTTP Status No Content

The server successfully processed the request and is not returning any content.

HTTP Status Bad Request

The server cannot or will not process the request due to an apparent client error.

HTTP Status Unauthorized

The server requires authentication or has failed to process provided authentication.

HTTP Status Forbidden

The request was a valid request, but the server is refusing to respond to it.

HTTP Status Not Found

The requested resource could not be found but may be available in the future.

HTTP Status Method Not Allowed

The request method is not support for the requested resource.

HTTP Status Request Timeout

The server timed out waiting for the request.

HTTP Status Internal Server Error

The server encountered an unexpected condition.

HTTP Status Not Implemented

The server does not recognize or implement the request method.

HTTP Status Service Unavailable

The server is currently unavailable.

Line

Point 2D

A Point2D represents an location in Cartesian coordinates (x,y).
The x value represents the distance from the left edge of the window or bitmap, increasing
in value as you travel right. The y value represents the distance from the top
edge of the window or bitmap, and increases as you travel down toward the bottom.

Point2D is a great way to keep track of the location of something in a 2D space like
a Window or Bitmap.

Fields

Name

Type

Description

X

Double

The distance from the left side of the bitmap or window (
increasing as you go to the right)

Y

Double

The distance from the top of a bitmap or window (increasing
as you go down).

Quad

Quads (quadrilaterals) are shapes with 4 sides, but unlike Rectangle,
these shapes can have axis that do not line up with screen/bitmap axis.

Points should be constructed with the top left as the first point, top
right as the second, bottom left as the third, and bottom right as the
last point. Other orders may give unexpected outcomes.

Rectangle

Rectangles are simple rectangle shapes that exist at a point and have a
set width and height. This means that the rectangle always has edges that
follow the sides of the Window or Bitmap (so they are aligned with
the x and y axes). The rectangle's position is its top left corner - it
then extends to the right and down from this position.

Fields

Name

Type

Description

X

Double

The distance to the left edge of the rectangle

Y

Double

The distance to the top edge of the rectangle

Width

Double

The width of the rectangle

Height

Double

The height of the rectangle

Triangle

A triangle consists of three points, being the three points of the
triangle.

Vector 2D

Vectors represent a direction and distance, and can be visualised as an
arrow from one point to another in 2 dimensional space. Internally, the
Vector 2D is stored as its x and y components.

Vector is a great way to represent movement or forces. You could use a
Vector 2D to track how much a character moves each update (as the
vector stores the direction and distance). Similarly, you could use a
Vector 2D to represent gravity or other forces. You can then
add a number of force vectors together to get a final force to be applied
to a character.