Scrolling Game Development Kit

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Scrolling Game Development Kit
Screenshot showing map editor, graphics editor and sprite definition editor
Developer(s) Benjamin Marty
Stable release 2.2.2 / February 14, 2012
Operating system Windows XP
Type Integrated Development Environment
License GPL
Website http://sgdk2.sf.net/

The Scrolling Game Development Kit (aka. "SGDK" or "GameDev") is an integrated development environment for creating computer games. While not as popular as Game Maker, it offers a unique set of features particularly useful for creating platform games, and version 2 allows extensive customization features at many levels. Games created with this software can be completed entirely without coding, or can be customized by editing or writing code. Alternatively, the kit can be used in the more as programming tool to create or edit levels for an external game. The kit's extensibility features allow game data to be used externally.

Contents

[edit] Version 1

Version 1.x (more commonly referred to as "GameDev") had many releases, the last of which was numbered 1.4.6. It was written primarily in VB6, and utilized a C++ COM component (also part of the open source project) called BMDXCtls for access to the DirectX framework.

Customization of version 1.x projects is typically done by writing independent VBScript files, and linking them to the project in project settings window (.GDP file). Alternatively a project can be customized using the extensibility features described below.

Extensibility in version 1.x is achieved via the XML export feature and support for COM automation. XML Export will write the project data (*.GDP) and map data (*.MAP) to a single plain-text file with limited binary encoding (primarily for storing the tile values). COM automation allows the engine to be accessed from external programs to control behavior at either design time (for extensibility) or run time (for customization).

[edit] Version 2

[edit] Summary

Version 2 (more commonly referred to as "SGDK2") was initially released on December 27th, 2007. It was a rewrite from the ground up in C# using the .NET framework and Managed DirectX. Version 2.1, released on January 17, 2009 replaces the DirectX graphics layer with OpenGL (based on the OpenTK library), dropping intrinsic support for DirectX (although it's conceivable that a DirectX project may still be possible via customizations to the project). Version 2.2, released on November 16, 2011 adds support for generating HTML5 code, thus producing output that is cross-platform to an even greater degree. So once again, a major iteration of SGDK2 updates the underlying graphic framework, this time, relying on the canvas element and JavaScript instead of .NET and OpenTK. OpenTK and .NET are still required at design time, and by the desktop/compiled executable games, but the generated HTML5 games rely only on JavaScript and an HTML5-capable browser. The initial release of 2.2.0 primarily exported map and sprite data, but the subsequent release of 2.2.1 on January 15, 2012 provided significantly improved support for HTML5 projects, leaving only a few unsupported functions, which are detailed in a Google document.

Customization in version 2 is accomplished by editing the run-time source code, which is embedded in the project.

Because the SGDK2 file format is natively XML, extensibility is trivial. One unique difference between version 1 and version 2 is that all game data is embedded in a single file rather than separated into GDP, MAP, BMP files and so forth.

[edit] Version 2 Features

[edit] Graphics Editor

The graphics editor provides a convenient set of tools for editing tile graphics within the IDE. It is not as extensive as a high end graphics editing package such as GIMP, but provides reasonably powerful features with the convenience of an embedded editor, and, of course, allows importing graphics created by other programs. Among the graphics editor features are:

  • Anti-aliased drawing, rotation, and other transformations
  • Gradient fills
  • Bezier curve and shape drawing
  • Color range re-mapping
  • Blurring/blending
  • Shape list (to draw one of a number of pre-defined shapes at any orientation and size)
  • Multi-tile editing (Load multiple tiles into the editor as a single image)
  • Offset and wrap the tile by half the tile width in order to edit how the edges match when tiled
  • Alpha translucency - All graphics contain red, green, blue and alpha channels to allow varying degrees of translucency/transparency. The images are stored in PNG format.

[edit] Map Editor

The map editor allows one to directly place tiles and sprites on the layers of a map, and see how the layers will appear and scroll. It also allows one to add "plans" which can contain zero or more coordinate points on a particular layer. These plans can then be used to define where sprites move or perform other map-specific tasks.

[edit] Frame-set Editor

Frames are transformed in real time as they are drawn as part of a map layer or as part of a sprite. So to make a sprite able to face 4 directions, it's possible to draw it once, then define 4 frames to make it face in the 4 directions. Editing the original graphic cell will affect all frames based on the graphic. Frames can rotate, scale, shear, flip and perform other 2-D transformations on graphics.

[edit] Solidity

Solidity defines what shape the tiles are (how a sprite treats the tiles). It can be defined in terms of predefined shapes (solid, uphill, downhill, etc), or custom shapes defined by the source code added to the project. Each sprite can select its own solidity rules to determine which set of solidity rules it follows.

[edit] Tile Editor

Tiles are based on frames. The tile editor determines which tiles are available for a particular layer to use, and in what order they appear as available tiles (which numeric values are assigned to which images). It also allows animated tiles to be defined, or tiles that change appearance based on counters (which can be affected by any number of rules).

[edit] Sprite Editor

Sprites are also based on frames. A sprite can have any number of states and switch between them based on user-definable rules. Each sprite state can have any number of frames within it, which can be used to animate the sprite and/or compose an image based on multiple frames displayed at once.

[edit] Rule Editor

Sprite behaviors and special map events can be created and customized in the sprite rule editor or the plan rule editor. For users not quite up to the task of writing code, these editors provide you list of pre-defined functions. After selecting one, it displays the parameters required for applying that behavior/function with drop-down lists of suggested possible values.

[edit] Code Editor

For more advanced users, the code editor can be used to customize the behavior of existing pre-defined functions, or to create new functions that will automatically be added to the list of available functions in the sprite rule editor or plan rule editor.

[edit] Debugging

While SGDK2 does not currently have an integrated interactive debugger, it does generate project files that can be loaded into Visual C# Express (or full blown Visual Studio) on Windows, or MonoDevelop in Linux. These environments provide enhanced debugging features to assist the game developer when the debug logging features provided by the SGDK2 framework are insufficient for tracking down the source of an error.

[edit] Architecture

[edit] File Format

The file format of an SGDK2 project is XML-based. Embedded in it are all the resources and code required to compile the game, including:

  • PNG images of graphic sheets
  • Music and sound effects data (or any other user-embedded data)
  • Framework code (including customized framework files)
  • Additional custom code
  • Sprite and plan rules
  • Map definitions, including all layers and tiles

[edit] Libraries

SGDK2 uses FMOD (more precisely, FMODEx) as its preferred sound provider, but it is included only as a default sound framework. Sound support is treated as a custom object, and could be relatively easily swapped out for another sound framework.

OpenTK provides the graphic support. This is a .NET wrapper around OpenGL, allowing SGDK2 projects to run on platforms other than Microsoft Windows.

[edit] Game Structure

Every game project contains the framework provided by SGDK2, which can be modified extensively (although this is unadvised since it would then be difficult to upgrade to new versions of the framework). It also allows additional source code files to be added to the project. These files may contain partial classes or derived classes (the recommended means of extending and overriding framework elements). The SGDK2 IDE generates a minimal amount of code to represent the maps, layers and sprites defined in the IDE, but the majority of the code is editable as text. Although the code can be edited and extended in the code editor, much of the customization is done by editing rules in the more user friendly rule editors. This operates one level above the code itself, generating lists of actions that get converted into code by the IDE at compile time.

[edit] References

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages