Scrolling Game Development Kit Coding Reference Namespace |
Projects are generated and compiled by the IDE in C# using a combination of code from the project's Source Code folder and code that is generated based on the content of the project. In order to facilitate writing code for the Source Code folder, and to better understand the rules provided by the Sprite Rule and Plan Rule systems, this reference provides detailed documentation of the structure of the generated project.
Class | Description | |
---|---|---|
ActiveSpriteEnumerator |
Enumerates only the currently active sprites on a layer
| |
AnimTile |
Represents the definition for an animated tile in a tileset
| |
ByteLayer |
Represents a layer where each tile is represented as a single byte.
| |
CollisionMask |
Defines the shape of a sprite for the purpose of collision detection with other sprites
| |
ControllerPlayer |
Represents interactions between the game and a player via a joystick/gamepad
| |
Counter | Represents a numeric counter defined in the project | |
CounterRef |
This class provides a kind of indirect reference to a counter for the purposes
of saving and loading counter values in a SaveUnit.
| |
Display |
Manages the display device on which real-time game graphics are drawn
| |
DisplayTextureRef |
Object used to refer to a texture (graphic sheet) managed by a particular Display.
| |
DisplayRef |
Provides serialization "services" for the Display object, preventing
attempts to save or load data for the display object when the game is saved/loaded.
| |
DownCeilingTileShape |
Represents a "downward ceiling" shape with a slope leading from the upper left corner
to the lower right corner with the upper right half of the tile being solid.
| |
DownhillLeftTileShape |
Represents the left half of a gradual "downhill" tile with a slope leading from the
upper left corner to the middle right with the lower portion of the tile being solid.
| |
DownhillRightTileShape |
Represents the right half of a gradual "downhill" tile with a slope leading from the
middle left to the lower right corner with the lower portion of the tile being solid.
| |
DownhillTileShape |
Represents a "downhill" shape with a slope leading from the upper left corner
to the lower right corner with the lower left half of the tile being solid.
| |
EmptyTile |
Represents a tile that doesn't draw anything onto the layer
| |
EmptyTileShape |
Represents an empty tile (nothing solid)
| |
Frameset | Provides objects that encapsulate the functionality of the framesets defined at design time. | |
FramesetRef | Provides serialization services for Frameset to allow objects that reference framesets to be saved without saving everything that is referenced by the frameset. | |
frmAbout |
About dialog displayed from game's help menu.
| |
frmControls |
UI to support the player's customization of input device.
| |
GameForm |
UI that contains and manages the main display for the game.
| |
GeneralRules |
Implements rules common to sprites and plans
| |
GeneralRulesMessageLayer |
Represents a message created and displayed by ShowMessage(String).
| |
IntLayer |
Represents a layer where each tile is represented as a 32-bit integer.
| |
Joystick | ||
KeyboardPlayer |
Represents interactions between the game and a player via the keyboard
| |
KeyboardState | ||
LayerBase |
Defines the basic operation of a layer of tiles and sprites within a map.
| |
LayerSpriteCategoriesBase | Provides categorized access to sprite within a layer for all categories defined in the project | |
LightSpriteBase |
Provides functionality and extra properties for sprites that represent dynamic light sources.
| |
MapBase |
Base class for all maps.
| |
New_Map_1_Map | ||
PlanBase |
Base class for "plans", which consist of map coordinates and rules
| |
Project |
This class provides global, static data. No instances are created.
| |
SaveUnit |
Retains information about what has been included for a saved game.
| |
Shader |
Encapsulates a single OpenGL shader, for example, a fragment shader or vertex shader.
| |
ShaderException |
Encapsulates an error occurring while compiling or linking an OpenGL shader.
| |
ShaderProgram |
Encapsulates an OpenGL shader program including, for example, both vertex and fragment shaders
| |
ShortLayer |
Represents a layer where each tile is represented as a 16-bit integer.
| |
SimpleTile |
Represents a non-animated composite or single-cell tile
| |
Solidity | Represents solidity definitions in the project | |
SolidTileShape |
Represents a solid tile (flat solid on all 4 sides)
| |
SpriteBase |
Base class for all sprite definitions.
| |
SpriteBaseTouchedTile |
Tracks information about a tile for the purposes of processing interactions
between a sprite and a tile that it is touching.
| |
SpriteCollection |
Categorizes / collects sprite instances
| |
SpriteFrame |
This specialization of TileFrame is used specifically for sprite frames
with collision masks (when mask alpha level is non-zero).
| |
SpriteState |
Represents one state within a sprite definition, primarily defining how a it can animate.
| |
TileBase |
Maps a tile index to frameset frames based on counter values etc
| |
TileCategoryFrameMembership |
Represents membership information for a tile whose membership changes based on
which frame is active.
| |
TileCategoryMembershipBase |
Stores information about which categories a tile is in.
| |
TileCategorySimpleMembership |
Represents membership information in which the membership of a tile does not
change based on its state.
| |
TileFrame |
Represents the appearance of a tile during one iteration of the game loop.
| |
Tileset | Represents tilesets defined in the project | |
TilesetRef | Provides serialization services for Tileset to allow classes that reference a tileset to be saved to a file without writing all the data internal to the tileset | |
TileShape |
Defines a particular shape that a tile can have at any/all sizes
| |
TopSolidTileShape |
Represents a tile that is only solid from above. A sprite can move freely through this tile
in any direction unless the sprite is fully above the tile in which case it cannot penetrate
the top.
| |
UpCeilingTileShape |
Represents an "upward ceiling" shape with a slope leading from the lower left corner
to the upper right corner with the upper left half of the tile being solid.
| |
UphillLeftTileShape |
Represents the left half of a gradual "uphill" tile with a slope leading from the
lower left corner to the middle right with the lower portion of the tile being solid.
| |
UphillRightTileShape |
Represents the right half of a gradual "uphill" tile with a slope leading from the
middle left to the upper right corner with the lower portion of the tile being solid.
| |
UphillTileShape |
Represents an "uphill" shape with a slope leading from the lower left corner
to the upper right corner with the lower right half of the tile being solid.
| |
WinKeyboard |
Represents the current state of all keys on the keyboard.
|
Structure | Description | |
---|---|---|
Frame |
An instance of the Frame class represents one image from a frameset.
| |
PlanBaseCoordinate |
Stores information about a coordinate within a PlanBase.
| |
SolidityMapping |
Associates a category of tiles with a solidity shape to which sprites can react.
| |
TileFrameMembership |
Defines an object that can be used to provide information to the construction of a
TileCategoryFrameMembership.
|
Interface | Description | |
---|---|---|
IKeyboard | ||
IPlayer |
Defines a common interface by which a sprite can receive input from a player
or some object simulating a player.
|
Delegate | Description | |
---|---|---|
GameFormSimpleNotification |
Defines a mechanism by which simple notifications without any data can be triggered.
|
Enumeration | Description | |
---|---|---|
CounterOperation |
Specifies an operation to perform on a counter.
| |
GameDisplayMode |
Specifies a size, color depth and scaling factor for a display.
| |
GeneralRulesButtonSpecifier |
Specifies a button or buttons on a player's input controller.
| |
GeneralRulesMessageView |
Determines in which view(s) a message will appear.
| |
Key |
Identifies a key on the keyboard.
| |
LightingMode |
Determines whether lighting is enabled or disabled.
| |
PlanBaseColorChannel |
Specifies one of the 4 color channels: alpha, red, green or blue.
| |
PlanBaseDrawStyle |
Specifies a drawing style for inventory/status-type bars drawn with DrawCounterAsTile(Int32, Counter, PlanBaseDrawStyle).
| |
RelativePosition |
Refers to the position of a predefined point relative to a rectangle
| |
SaveUnitInclusion |
This is used to specify general categories of objects to be included
in a saved game (save unit).
| |
ShaderShaderCode |
Enumerates all the pre-implemented shaders provided by SGDK2
| |
SpriteBaseDirection |
Used to refer to 4 primary directions.
| |
SpriteBaseInputBits | ||
SpriteBaseSpriteAnimationType |
Defines the basis for a sprite's animation
| |
TileCategoryName | Provides an enumerated list of every tile category defined in the project. | |
ViewLayout |
Specifies an arrangement for multiple scrolling views on a single display
|
Some useful places to start:
Page | Description |
---|---|
SpriteBase | Lists all properties and methods that are immediately available on the Sprite Definition Rules tab. From here you can see a summary of all the functions available and easily link to detailed descriptions of how each sprite rule function can be used. |
PlanBase | Lists all properties and methods that are immediately available when defining plan rules in the plan editor. From here you can see a summary of all the functions available and easily link to detailed descriptions of how each plan rule function can be used. |
Of course there is much more to the API reference, but these are the most frequently used starting points even for those who aren't doing any formal coding, just to understand how to define rules.
When using the coding reference primarily to understand how to use the various sprite and plan rule functions, it's important to understand how the UI for entering rules corresponds to the code. The following examples should clarify this.
Generated in Sprites\Player.cs (for sprite named "Player") in function "ExecuteRules":
// Show player 1 grape points TempNum = this.TileActivateSprite(0, ParentLayer.m_SpriteCategories.Points, true);
Generated in Level_1_Map.cs (for a plan in a map named "Level 1") in class "Main_Lyr" (for a layer named "Main") in a nested class named "ManagePlayers" (for a plan named "ManagePlayers") in function "ExecuteRules":
// If 2 players if ((Counter.Players.CurrentValue >= 2)) {