©2000-2007 by Benjamin Marty
Scrolling Game Development Kit 2 Release
December 27, 2007
The time has come to finally release SGDK2. After many pre-alpha, alpha, and beta releases to try to ensure that SGDK2 is ready for prime time and addresses the needs of a range of different users, we have arrived at a point where few problems are being found and the severity of the problems is low. It's time to release what we have and announce that it's ready for widespread use. Version 2 is a huge advancement in the development of Scrolling Game Development Kit. It was rewritten from the ground up with very little if anything taken from version 1. Even the solidity testing between sprites and tiles in SGDK2 is quite different than version 1 and the games that preceeded it from which version 1 derived its physics. While such a drastic rewrite does introduce the potential for many new problems, the 2 years of external and internal testing that was occurring simultaneously with development should serve to minimize unexpected problems, and ensure usability. Below are some of the points of interest users will find in SGDK2.
SGDK2 is a single integrated executable. Yes, the templates with sample data are split off into their own files, but the graphics editor, map editor, and coding environments are all embedded into a single environment in a single executable (SGDK2IDE.exe). The .NET framework and DirectX 9 are required to run this environment, and if you want to create a project with sound, the environment will rely on the (included) fmodex.dll file, but compared to the previous iteration (which was also reasonably integrated), users should find this to be very nicely integrated, seamlessly switching between editing of graphics, tiles, sprites, maps, code and more. Furthermore, editing data in multiple windows can be done simultaneously and they will remain in sync with each other (for the most part) without requiring manual refreshes or re-opening windows.
Assisting with the aforementioned integration is the fact that all editing can be done in windows now. For users who were familiar with the previous version that would switch to a full screen editor to edit graphics and maps, this annoyance will be gone, and you can even edit multiple maps and graphics at once in the multi-window environment.
Single Data File per Project
All data for a project is embedded within a single SGDK2 file, so users don't need to keep track of files spread out throughout their file system. Furthermore the file is plain text (XML), so it's relatively versatile and portable, making it easy for external editors to access or edit the data.
The graphics editor for SGDK2 provides a powerful selection of features for an embedded editor, many of which are rare even in stand-alone editors. Graphics may include alpha translucency information allowing partially transparent pixels. Most tools may be anti-aliased to provide professional-looking smooth edges, taking advantage of this alpha channel for images that are to be drawn on various backgrounds. Multiple images can be loaded into the editor as a single large image to ensure smooth seams between the cells. Among the more advanced tools are tools to re-map color ranges, draw color gradients (optionally confined to a selected area and/or following the contours of the shape being drawn) and add noise.
Framesets allow the user to define real-time 2D transformations that can be applied to graphics (rotation, scaling, offsets). This means the same graphic can be used in different orientations, and the graphic can be edited without re-applying the transformation(s) after editing. Framesets also allow the inclusion of graphics from different graphic sheets into a single numbered series of frames. That means that the images used for a single sprite or tile can contain graphics of different sizes from different graphic sheets.
This extra layer of abstraction, which defines how numeric values in a layer map to the frames of a frameset, allows many interesting features:
The user has fine control over the behavior and appearance of sprites. Each sprite can have any number of states. The rules defining how the sprite moves, how and when it changes its appearance/state, and how it animates are completely under the control of the sprite's rules, which are entirely defined by the user. A pre-defined set of rules such as "ReactToSolid" are provided for basic sprite movement and animation features, but advanced users may also add their own rules to their project by writing C# code in the embedded editor. The rules are saved with their project and do not require re-compiling the IDE.
SGDK2 maps can contain any number of layers, each of which can scroll at any rate, or be positioned manually within the map. This makes parallax scrolling easy and automatic while leaving open the ability to position layers manually for other purposes. The map editor shows all these layers while allowing the user to edit one. Each layer has its own tiles, plans and sprites which can be added, edited or deleted in the map editor with ease. Adding a new sprite is as easy as pointing and clicking (just like adding a tile). Once a sprite is added, it can be selected and its parameters easily edited right within the map editor. The user can even add their own parameters that apply for each type of sprite, which are exposed here so the user can set each sprite's initial custom parameter values.
The map editor scrolls just as quickly as it does at runtime, following the parallax scrolling rules defined in the layers so it's easy to see how a layer will appear at runtime.
Online Help and Plentiful Support
Every window has its own context-sensitive help page, so pressing the F1 key from any window will bring the user directly to the help page for the screen currently being used. The help is detailed with formatted tables and examples in many cases, and further support is available in the forums. Users have already commented on the high quality of the support for this program. For more advanced users, complete documentation is provided on the details of every externally exposed class and function to help users to define their own custom rules within their project, or to manipulate the other source code used in their projects. Code documentation appears very similar to Microsoft's MSDN documentation, documenting every parameter of every function.
A predefined set of tile shapes is provided, but users are also free to add their own tile shapes. There is no more restriction to the predefined set of shapes provided in version 1. SGDK2 also adds some new pre-defined shapes such as TopSolid, which represents a tile shape through which a sprite can "jump" upward, but will then land down on as a solid from above.
The vast majority of the source code of which an SGDK2 project consists is easily viewable and editable in the project's Source Code folder in the IDE (embedded in the SGDK2 file). It's possible to significantly adjust and customize the code for one project without recompiling the IDE or affecting any other projects used in the same environment. All source code is written in C#. The integrated code editor supports syntax highlighting. It also allows binary data to be embedded and associated with a source code object. This feature is often used to embed sounds and music for a project, but could be used for any kind of data.
Each SGDK2 project is compiled into a genuine executable file. There is no runtime engine because all the code is compiled by the .NET compiler. All the maps and sounds are compiled into the same executable file so the entire project ends up being a single EXE.
For detecting interactions between sprites and tiles, tile shapes are used and provide a high-performance means of making sprites react very consistently to the solidity of the tiles (sprites can easily slide along solid walls, climb hills and consistently remain outside the solid area of the tiles). For detecting collisions between sprites, an "alpha level" setting is provided in the sprite definition editor, which allows the user to define how opaque a pixel must be in order to collide with another solid pixel. Based on this setting, a mask is generated for the sprite in order to perform quick pixel-perfect collision tests at runtime. It's also easy to perform rectangular collision detections for even better performance.
The frameset editor allows the color of an image to be filtered (reducing the level of red, green, blue or opacity drawn by the frame) in real time. It's also possible to set this value on a sprite in the map editor to affect the overall appearance of a sprite in real time.
SGDK2 maps can be as simple as a single non-scrolling screen with a few tiles, or can be enormous maps with millions of tiles and containing billions of pixels that can offer the player a seemingly endless scrolling world.
On the Default Download page you will find the main SGDK2 package and some template libraries and sample projects. Among the sample projects you will find a tetris game, demonstrating the versatility of SGDK2 (not just for scrolling games), and an isometric sample game.
The forums provide a place to discuss projects and ideas, as well as get specific support for your problems. It's also a good place to report errors/bugs and suggest improvements.
Users can submit their templates and finished projects here to share them with the rest of the community. Newer users may find this site particularly useful as a source of sprite templates they can use in their own projects. If you properly include your name in the credits of your template, it will automatically be merged into another project when that project imports your template.