.

CategorySGDK2 FunctionHTML5 supportHTML5 NameNotes

.

General CommentsUser-defined functionsYesYou may add .cs and .js files to the source code folder as demonstrated by the HTML5 sample project's SpriteCustom files. Each C# function must have a JavaScript implementation to work in HTML5.

.

AudioNoAlthough you may manually add functions to support sound in your projects, SGDK2 does not yet output any embedded data from custom objects in the HTML5 output, so extra manual steps are required to include sound.

.

GeneralN/AUsing the HTML5 sample project you can more easily work within the bounds of what SGDK2 supports for HTML5 because the unsupported functions are removed from this template and won't be displayed.

.

GeneralRules (Inherited by both Sprites and Plans)lastCreatedSpriteManualGeneralRules.lastCreatedSpriteOnly set by add sprite functions

.

ParentLayerManuallayerImplemented in Sprite and Plan

.

LimitFrameRateYeslimitFrameRateActually sets frame rate instead of limits

.

LogDebugLabelNo

.

LogDebugValueNo

.

SwitchToMapYesswitchToMap

.

ReturnToPreviousMapYesreturnToPreviousMap

.

CanReturnToPreviousMapYescanReturnToPreviousMap

.

UnloadMapUntested

.

IncludeInSaveUnitPartialincludeInSaveUnitPlayerOptions is not implemented

.

IncludeCounterInSaveUnitUntested

.

ExcludeCounterFromSaveUnitYesexcludeCounterFromSaveUnit

.

IncludeMapInSaveUnitYesincludeMapInSaveUnit

.

ExcludeMapFromSaveUnitUntested

.

SaveGameYessaveGame

.

LoadGameYesloadGame

.

SaveExistsYessaveExists

.

DeleteSaveUntested

.

CurrentViewNo

.

SetViewLayoutNo

.

SetCategorySpriteStateYessetCategorySpriteState

.

ClearOverlayYesclearOverlay

.

SetOverlayYessetOverlay

.

SetMapFlagYessetMapFlag

.

SetTargetMapFlagUntested

.

IsMapFlagOnYesisMapFlagOn

.

UnloadBackgroundMapsYesunloadBackgroundMaps

.

QuitGameYesquitGameMay be limited by browser security

.

IsKeyPressedYesisKeyPressed

.

GetRandomNumberUntested

.

ChangeCounterYeschangeCounter

.

IsMouseButtonPressedNoMouse and touch functionality need combined review

.

GetSelectedTargetForNo

.

SelectTargetSpriteNo

.

SelectTargetSpriteForNo

.

SelectLastCreatedSpriteNo

.

SelectLastCreatedSpriteForNo

.

IsTargetSpriteSelectedForNo

.

SetTargetParameterNo

.

SetTargetParameterForNo

.

GetTargetParameterForNo

.

DeactivateTargetSpriteForNo

.

IsSpriteForTargetOfTypeNo

.

SetMessageBackgroundYessetMessageBackground

.

SetMessagePositionNo

.

SetMessageDismissalYessetMessageDismissal

.

ShowMessageYesshowMessage

.

ClearAllMessagesYesclearAllMessages

.

SetMessageFontYessetMessageFont

.

Plan Rule FunctionsSharedTemp1No

.

TargetDistanceYestargetDistance

.

PlanRectangleManualleft, top, width, height

.

ActivateSpriteYesactivateSprite

.

DeactivateSpriteUntested

.

MatchSpritePositionUntested

.

IsSpriteTouchingYesisSpriteTouching

.

IsSpriteWithinYesisSpriteWithin

.

GetSpriteWithinUntested

.

IsSpriteWithinPolygonNo

.

WasSpriteTouchingUntested

.

ScrollSpriteIntoViewYes

.

PushSpriteIntoViewNo

.

PushSpriteTowardCoordinateYespushSpriteTowardCoordinate

.

PushSpriteTowardPointYespushSpriteTowardPointProbably can't be called directly

.

CheckNextCoordinateYescheckNextCoordinate

.

FollowPathYesfollowPath

.

StopSpriteYesstopSprite

.

TestCollisionMaskNo

.

TestCollisionRectYes

.

DeactivateCategorySpriteNo

.

IsSpriteActiveYesisSpriteActive

.

TransportToPointNo

.

TransportToPlanYestransportToPlan

.

MapPlayerToInputsYesmapPlayerToInputs

.

Coordinate[]Manualm_Coords[] and this[]

.

CountManualm_Coords.length

.

ModulateColorNoHTML5 doesn't support this

.

DrawCounterAsTileYesDrawCounterAsTile

.

DrawCounterWithLabelYesdrawCounterWithLabelColor parameter irrelevant

.

CopyTilesYescopyTiles

.

CopyToYescopyTo

.

CopyFromYescopyFrom

.

IsInputPressedYesisInputPressed

.

CopyInputsToOldYescopyInputsToOld

.

AddSpriteAtPlanUntested

.

PushSpriteTowardSpriteNo

.

MapMouseToSpriteNoMouse and touch functionality need combined review

.

DoorYesdoor

.

Sprite Rule FunctionsxYesx

.

yYesy

.

dxYesdx

.

dyYesdy

.

oldXYesoldX

.

oldYYesoldY

.

stateYesstate

.

frameYesframe

.

inputsYesinputs

.

oldinputsManualoldInputs

.

isActiveYesisActive

.

colorNoHTML5 doesn't support this

.

layerYeslayer

.

m_solidityManualsolidity

.

LocalDXManuallocalDX

.

LocalDYNo

.

PixelXManualMath.floor(this.dx)

.

PixelYManualMath.floor(this.dy)

.

ProposedPixelXManualMath.floor(this.x + this.dx)

.

ProposedPixelYManualMath.floor(this.y + this.dy)

.

OldPixelXManualMath.floor(this.oldX)

.

OldPixelYManualMath.floor(this.oldY)

.

CurrentStateManualthis.states[this.state]

.

SolidWidthManualthis.getSolidWidth()

.

SolidHeightManualthis.getSolidHeight()

.

SpriteStateManualthis.states[]

.

ReactToPlatformYesreactToPlatform

.

IsRidingPlatformYesisRidingPlatform

.

StopRidingYesstopRiding

.

LandDownOnPlatformYeslandDownOnPlatform

.

TestCollisionMaskNo

.

TestCollisionRectYes

.

AlterXVelocityYesalterXVelocity

.

AlterYVelocityYesalterYVelocity

.

MoveByVelocityYesmoveByVelocity

.

LimitVelocityYeslimitVelocity

.

ReactToInertiaYesreactToInertia

.

IsMovingYesisMoving

.

PolarAccelerateNo

.

RotateVelocityNo

.

ScrollSpriteIntoViewYesscrollSpriteIntoView

.

PushSpriteIntoViewNo

.

GetNearestSpriteIndexYes

.

PushTowardCategoryYes

.

PushTowardSpriteYes

.

AnimateYesanimate

.

GetPolarStateByVectorNo

.

CalculateRotatedStateNo

.

SwitchToStateYesswitchToState

.

IsInStateYesisInState

.

ModulateAlphaNoHTML5 doesn't support this

.

ModulateRedNoHTML5 doesn't support this

.

ModulateGreenNoHTML5 doesn't support this

.

ModulateBlueNoHTML5 doesn't support this

.

IsInputPressedYesisInputPressed

.

SetInputStateUntested

.

ClearInputsUntested

.

MapKeyToInputNo

.

MapPlayerToInputsYes

.

AccelerateByInputsYesaccelerateByInputs

.

SetInputsTowardCategoryNo

.

SetInputsTowardSpriteNo

.

MapMouseToSpriteNoMouse and touch functionality need combined review

.

SetSolidityYessetSolidity

.

ReactToSolidYesreactToSolid

.

SnapToGroundYessnapToGround

.

BlockedYesblocked

.

IsPointBlockedNo

.

TouchTilesYestouchTiles

.

TileTakeYestileTake

.

TileUseUpUntested

.

TileCategoryTouchedNo

.

TileTouchingIndexNo

.

TileActivateSpriteYestileActivateSprite

.

TileAddSpriteYestileAddSprite

.

AddSpriteHereYes

.

TileChangeYes

.

TileChangeTouchedUntested

.

IsOnTileYesisOnTile

.

DeactivateYesdeactivate

.

PushSpriteNo

.

ReactToPushNo

.

ReactToPushbackNo