This topic contains the following sections.
This page documents updates between various updates to SGDK 2.0.
If you're interested in the differences between the 1.x versions and
version 2.0, see the What's New section of the Introduction.
This section describes the updates between versions 2.2.10 and 2.3.0.
The version number has changed more significantly with this release to
reflect the significance of new features added for 2.3.0.
- Add support for real-time lighting effects including:
- Allow light sources to be defined by creating sprite definitions
whose Base Class is set to LightSpriteBase instead of SpriteBase.
- Light source falloff settings allow fine control over how
quickly the brightness of a light source falls off over distance.
- Light source aperture settings allow a light source sprite to
direct its light instead of shedding light in all directions, and allow
the width of the light cone to be adjusted and have crisp edges or soft
- Light source aim allows a light to be pointed in a particular
- Light Z position allows positioning the light a specified
distance away from the screen to spread its light over a greater range
- Allow the tiles that a light sprite sees as solid to cast
2D shadows, preventing the light from illuminating anything on the far
side of solid tiles. (Of course an ambient light, for example, can still
cast light over a whole layer by having no solidity.)
- Allow normal maps (aka bump maps) to be defined for all graphics
so that their appearance can change with the direction of the lighting.
- Allow light sources to be rotated at run-time with a rule
- Add a Lighting property to each layer that allows lighting to be
enabled or disabled per layer at design time or run-time.
- Apply normal map effects to graphics in all views at design time
as well as run time (to allow graphics that differ only by normal map to
be distinguished at design time).
- Allow lighting's effect to be determined by the alpha channel of
the normal map so that transparent pixels in the normal map can represent
self-illuminated pixels on the graphic.
- Add Real-time Lighting Effects Tutorial
to walk new users through creating a project with all lighting effects
- Re-introduce an installation program to make installing and
un-installing SGDK2 a more typical experience.
- Update the graphics framework to use shaders instead of deprecated
OpenGL drawing functions. This allows real-time lighting and theoretically
many other special effects. See the shaders.cs file in the SourceCode tree.
- Implement new display modes that scale up the graphics by a factor
of 2 (horizontally and vertically) at runtime for retro pixelated look.
- Add new display mode for 1920x1080.
- Implement zoom feature in graphics editor's tiling preview.
- Add new 16x zoom level to graphics editor.
- Implement lighting and scaling in map editor.
- Add an option to allow the map editor to automatically size to the
defined game window size so that you can be sure that the map editor shows
the same size view as the run-time game window, and scrolls the same way.
- Allow the Solidity setting of a sprite to be cleared to nothing in
the map editor.
- Improve handling of fatal errors to increase the likelihood that
users get an option to save their project if a fatal error occurs, before the
program shuts down.
- Fix some bugs that appeared in certain circumstances when using the
- Correct the size of the find dialog in the code editor.
- Upgrade to OpenTK 22.214.171.124
- Upgrade to .NET 4.5, dropping support for Windows XP and one-click
install, which wasn't working out.
- Add sprite template LeftRightFlatHtml that implements the same
behavior as LeftRightFlat, but works in HTML5 projects.
- Correct bug in HTML5 project's handling of TargetDistance during
- Correct bug in HTML5 project's implementation of drawCounterAsTile
related to calculating the correct offset based on the layer position.
This section describes updates between versions 2.2.9 and 2.2.10.
- Revert to .NET 4.0 for compatibility with Windows XP. (The
ClickOnce installer in .NET 4.5 is still too unreliable anyway. Will no
longer provide ClickOnce install.)
- Correct mouse coordinates reported by HTML5 code when game view is
not at the top left corner of the web page.
- Correct the way inactive sprites are removed from a category when
deactivated in HTML5 projects.
- Implement HTML5 (js) version of getSpriteWithin function to
retrieve sprite within a plan rectangle.
- Correct HTML5 addSpriteAtPlan function to mark the created sprite
as dynamic, and initialize its parameters to default values.
- Correct HTML5 (js) code to properly determine tile category
membership of animated tile frames.
- Update template projects to conform to modified SGDK2 file XML
schema that was changed in a recent release to include Folder info etc.
This section describes updates between versions 2.2.7 and 2.2.9.
- Implement the ability to nest Graphic Sheets, Framesets, Sprite
Definitions, Counters, Source Code and Maps in folders in the tree view.
- Correct the position of the "Export HTML5 and Run" command when
another window with File menu items is active.
- Avoid fatal error when right-clicking in project tree where
there is no node.
- Add Ctrl-S shortcut to Save menu item in file menu.
- If splash form transparency fails for any reason (running under
Mono), ignore the error.
This section describes updates between versions 2.2.6 and 2.2.7.
- Upgrade IDE to .NET 4.5 / Visual Studio Express 2012.
- Publish IDE with ClickOnce deployment.
- Store counter Min value as an XML attribute instead of an element.
- Correct the ZIndex of the layers in the sample project.
This section describes updates between versions 2.2.3 and 2.2.6.
- Corrections to loadGame and createMessage functions
- Corrections to map setState and layer getState functions
- Corrections to sprite touchTiles, clearParameters, getNearestSpriteIndex
and tileChangeTouched functions
- Correction to layer wizard.
- ClickOnce installer updates. (Still not published because .NET 4.5 isn't out yet.)
decimal separator (always use period) and other local settings.
- For projects based on the latest code template with Frameset.cs, generate framesets
in binary format to avoid huge code file and stack overflow at runtime when project has many
(on the order of 10000) frames.
- Correct error when the map editor is minimized and restored.
- Implement new command to export and run the project in HTML 5 form with a single click or keypress.
This section describes updates between versions 2.2.2 and 2.2.3.
- Ensure HTML5 code doesn't fail when attempting to test whether a
sprite has collided with an empty sprite category.
- Fix a typo in the scrollSpriteIntoView HTML5 function.
- Fix code generator to not have errors when a disabled rule
function has no function assigned (if/end if nesting error).
This section describes updates between versions 2.2.1 and 2.2.2.
- Implement Mobile device (touch interface) template project in
- Allow the generated HTML file to be customized via an .html
template file in the project's source code folder.
object (for each sprite definition and each map) when exporting HTML5
- Remember settings in the HTML5 export window and re-use them
- Corrections to improve/implement support for HTML5-based
projects targeting mobile devices.
- Prevent default handling of HTML5 touch events to improve
behavior of project on mobile devices.
- Generate the HTML5 page title from the project title instead of
from the project filename.
- Implement some rules to provide basic support for mouse/touch
- Implement GeneralRules.Clicked rule function to determine if
the mouse was just clicked or touch interface was just touched.
- Implement MapMouseToSprite for HTML5 projects.
- Enhance MapMouseToSprite rule function to allow specifying the
sprite's hotspot relative to the mouse position.
- Eliminate automatic hard-wired map dragging in HTML5 output and
replace it with a DragMap function that allows the project to control
- Implement tileTouchingIndex in HTML5.
- Halt the HTML5 export process if a compile error occurs in the
.NET code because the export process relies on some .NET reflection to
generate proper output.
- Improve the way dynamic sprites are added to sprite categories
in HTML5 generated code so that initially empty categories will work.
- Don't try to execute rules on sprites that have no rules in the
generated HTML5 code.
- Improve code generation for suspended rules (especially when
suspended rules affect indentation).
- Correct bugs in the HTML5 implementation of the Sprite.blocked
- Improve error handling when extraneous End rules exist for
sprite or plan rule sequences.
- Exclude sprite and plan rules from the temporary compile that
is performed while exporting HTML5 code.
- Correct ClearInputs rule function implementation for HTML5.
- Implement SetInputsTowardSprite and SetInputsTowardCategory
functions for HTML5.
- Improve .NET code's tracking of old mouse position.
- Correct HTML5 save function when saving all maps without
explicitly including any maps in the save unit.
This section describes updates between versions 2.2.0 and 2.2.1.
- Implement most of the remainder of SGDK2 features for HTML5. (Make SGDK2 export completely functional games to HTML5 format instead of just map data.) A few rules remain un-supported in HTML5 format and are documented online
- Provide a new HTML 5 sample project with the unsupported rule functions removed. (Only supported rules will appear in drowdown lists with projects based on this template.)
This section describes updates between versions 2.1.9 and 2.2.0.
- Implement the ability to output project data to HTML5 files (details below).
- Output all graphic sheets as hidden img elements.
- Output all Framesets as instances of a Frameset object, which may generate additional hidden canvases to host color-modulated frames.
- Output all counters as instances of a Counter object.
- Output all sprite definitions and sprites such that each frame of each state can be accurately represented.
- Output all tile categories and tile solidity information such that the Sprite object's ReactToSolid function will work,
and honor solidity that changes per frame of an animated tile.
- Allow HTML5 project to be output to a view that is confined to the size defined by the project, or resizes to fill the browser.
- Allow HTML5 project to include buttons that automatically switch to the selected map.
- Allow mouse or touch events to scroll around the displayed map in HTML5 output.
This section describes updates between versions 2.1.6 and 2.1.9.
- Restore compatibility with Windows XP (avoid error when opening map editor on non-Windows 7 system).
- Improve LimitFrameRate function to be more accurate while still yielding some CPU time.
- Implement minimum value for counters.
- Sort all objects by name in the UI where appropriate.
- Don't try to delete frame when textbox has focus and pressing delete key on frameset editor.
- Display a better error when attempting to preview an animated sprite or tile without any frames.
- Add SelectTargetSpriteFor
function and other functions ending with "For"
to enhance existing selected target sprite functions so that any number of target
sprites may be simultaneously selected for different global target/operation names.
- Add GetSelectedTargetFor
function to retrieve the currently selected target sprite.
- Add GetTargetParameterFor
function to allow other sprites' parameter values to be retrieved.
- Add DeactivateTargetSpriteFor
to allow a target sprite to be deactivated.
- Add IsSpriteForTargetOfType
to determine if the selected target sprite is of a specific type.
- When loading a saved game, initialize sprite types that are active
that aren't active in a new game
- Show compile errors in a list that allows the user to jump to the source
of the error if it is caused by a sprite rule, plan rule or source code item.
- Update graphics framework to support video drivers that don't support
This section describes updates between versions 2.1.5 and 2.1.6.
- Upgrade to Visual C# 2010 Express.
- Upgrade IDE to .NET 4.0 (projects should still work on
- Updates for Windows 7 compatibility
- Compile temp assembly is UserAppDataPath instead of
- Register file association to current user instead of
- Turn off Windows 7 Aero when entering map editor to eliminate
flickering when scrolling map editor.
- Eliminate unused System.Design.dll reference from generated
- Implement support for ClickOnce deployment.
- Upgrade to latest SandCastle Help File Builder. Use
MAML content to define help files instead of HTML.
- Limit Frame Rate to 30 FPS in sample project.
- Change ReturnToPreviousMap
function to re-load map if unload = true and no previous map exists
instead of ignoring the request.
- Change GetNearestSpriteIndex
to ignore the current sprite.
- Correct distance calculation in
to turn off all directional inputs if no sprite in target category
This section describes updates between versions 2.1.4 and 2.1.5.
- Fix sprite selector in map editor so other controls don't overlap it making some
- Correct tile drawing in map editor so it doesn't exhibit glitch after drawing plan paths.
- Prevent error when closing map editor when plan selection list is active.
This section describes updates between versions 2.1.3 and 2.1.4.
- Fix an error that prevented multiple displays from being open simultaneously.
- Implement the ability to sort sprites in the map editor.
- Improve error handling when attempting to run the project if it is already running.
- Allow a layer to be created with a null tileset to represent the designer background layer (allow user-created layer to refer to no tileset).
- Stop riding on a platform if it is deactivated while riding it.
- Prevent debug-mode errors when a platform is deactivated and a sprite is riding on it.
- Change CheckNextCoordinate to proceed to the next target if the distance from the current target exactly matches the target distance.
- Prevent the user from creating a layer with zero tiles.
- Implement ExecuteRulesInternal so that ExecuteRules can be overridden in an intermediate class.
- Implement BaseClass property for plans and sprites to allow inheriting from customized code instead of only PlanBase and SpriteBase.
- Make ProcessSprites overridable.
- Implement IsSpriteWithinPolygon function for plans.
- When resetting source code to a template that imports decapsulated source code files, be sure to import the referenced code because the project into which the code is being imported will not know how to find the template's decapsulated files.
- Add OpenTK.dll.config to source control.
- If a plan contains a SpriteBase-derived member, show a drop-down list of the appropriate sprites in the map editor when this plan is selected.
- Prevent invalid sprite and plan names from being specified in the map editor.
- Change most SpriteBase and PlanBase members to be protected instead of private.
- Change most SpriteBase and PlanBase members to be virtual so they can be overridden by an intermediate base class.
- Change SpriteBase.TouchTiles to return a strongly typed collection of results.
This section describes updates between versions 2.1.2 and 2.1.3.
- Upgrade to OpenTK 1.0.0 beta 2.
- Fix dropper tool to also function on row 0 and column 0 of graphic editor pane.
- Eliminate a couple compiler warnings on generated projects.
- Fix TestCollisionRect so that it can be used from the Plan and Sprite rule editors.
- Implement default designer-only background layer in map editor. When no opaque layer exists, the map editor will still draw nicely with this design-mode-only layer active.
- Automatically default new layers to next available Z-Index.
- Change Reflect.dll to build with .NET 2.0.
- Add SpriteRecorder code object to library for recording scripted sprite movements.
- Implement PlayMusic function that cross-fades background music.
- Implement FadeMusic function to fade out background music.
- Specify REUSE instead of FREE when playing FMOD sound to try to avoid sound scrambling occurring in some project(s).
- Improve FMOD code reuse - fmodbase.cs and fmod.cs are now delivered only in the Sound directory of the library, and all delivered templates refer to these files.
- Automatically sort main tree view.
- Correct bug that updated all children of a tile category in the tree view when the parent name was changed.
- Avoid error when pressing delete key on frameset editor when nothing has been selected.
This section describes updates between versions 2.1 and 2.1.2.
- Upgrade to OpenTK 0.9.8.
- Check if graphic sheet (texture) is larger than supported by the OpenGL
driver in order to provide a better error message if it's too big.
- Add TileCategoryTouched function to provide simpler ability to check
when a sprite touches a tile in a category.
- Use frame's color modulation when drawing the frame with
- Correct handling of TouchTiles for non-square sprites.
- Correct TileAddSprite to register old position as initial position.
- Create TileChangeTouched function to change one tile at a time.
- Deliver standard functions for pushing and repelling sprites.
- Improve error handling when converting rules to source code.
- Remove dllmap from configuration file because Microsoft .NET
cannot handle it. Plan to use a hard link or symbolic link to new filename
libfmodex.so instead (linked to versioned libfmodex-v.so).
- Improve some sprite rule function implementations.
- Implement limited support for generating Linux projects.
- Prevent errors when null rule parameters are encountered while
- Improve drawing of gradient rings (2-D torus) in graphics editor.
- Upgrade FMOD to stable version 4.20.06.
This section describes updates between versions 2.0 and 2.1.
- Upgrade to .NET 2.0: SGDK2 and the projects it generates now rely
on .NET Framework version 2.0 and take advantage of new features added
in this version. The SGDK2 Project itself requires Visual C# 2008 or .NET
3.0 to compile, but can run on any system that has .NET Framework 2.0.
It also knows how to compile game projects on any system with .NET 2.0.
- OpenGL Framework: Version 2.0 was based on Managed DirectX. SGDK 2.1 uses
the OpenTK library to access the OpenGL interface to video hardware,
allowing SGDK2 to and the projects created with it to potentially
be more easily ported to other platforms. This also provided an
apparent performance boost.
- Improved Message Functions: Displaying messages is now an integrated
function in SGDK2 instead of a custom object. Furthermore, it now uses
a tileset as the font instead of using the fonst support provided by the
system (because as of this writing, OpenTK does not properly support
fonts). This means, however, that you can use graphics and animated
tiles/characters in your messages. A new message preview window is
provided to assist in laying out the message at design time.
- Frame Rate Limit: If your game runs too fast on some systems,
you can now use the LimitFrameRate
function to control the speed.
- Cut Rules: It's now possible to cut a group of rules when using
a rule editor. This can also be used to delete hierarchies of rules.
- Upgrade Documentation: This help file is now being built with Sandcastle
and Sandcastle Help File Builder
instead of NDOC because NDOC did not support .NET 2.0. As a result the
build process is somewhat simplified and the content is better linked with
some other improvements wrapped in too.
Convert Rules: In the sprite rule editor and plan rule editor, you may
now select the "Convert to Function" command to convert rules into
source code that can be directly maintained in the code editor. If you have
huge trees of complex rules, this may help you significantly simplify your
sprite definitions, and make them more managable.
Call Sprite Functions from Plan Rules: Now you can select "<Select
sprite function...>" from the function list in the plan rule editor if
you want to directly call a function on a sprite from a plan. This can be
particularly handy if you've converted a set of rules on a sprite into
a function that you want a plan to be able to easily trigger directly.
If this list seems short, notice that the first two items are relatively
large, and also that the goal was to get the major update out to folks and
in use before proceeding with a multitude of smaller updates. That way
everyone doesn't have to wait for all the small updates to be complete before
being able to use the updated framework.