This project is read-only.

GdiGaming API

Project Description

The GdiGaming API provides a simple framework from which any number of classic 2D-style video games can be created. Designed for use with Windows Forms applications, the API provides an easy to use GameEngine component and RenderCanvas user control. Games are created by dragging an instance of GameEngine and RenderCanvas to a Form, pointing the engine at the canvas, and then developing GameScene and GameObject derived classes.

Game logic is implemented by adding code to overriden methods of GameObject derived classes such as OnInput, OnUpdate, and OnDraw. The GameEngine handles all method calls to backgrounds, objects, and HUD elements. This simple pattern allows for a large variety of game engine design implementations, as GameObjects can represent logic controllers or state machines, as well as interactive elements (such as characters and enemies).

Minimal .Net coding experience is required as the framework assumes only that you have basic working knowledge of classes and object oriented design.

Written in VB.Net 2010 Client Framework 4.0

Current Version

CTP 2 (v

Project Overview

The GdiGaming API is a small and simplified, yet complete, game-engine framework for Windows Forms applications which uses GDI+ for rendering graphics, Windows Media for playing sound, and Control event handlers for mouse and keyboard input.

The API provides a GameEngine component and RenderCanvas control which can be placed on a Form at design-time to setup a game-engine environment. Individual projects then define classes for players, enemies, and other interactive game elements which each inherit from the API provided GdiGaming.GameObject base class.

Each custom class needs only to override appropriate methods of GameObject such as OnInput, OnUpdate, OnCollision, etc. in order to implement its game-logic. Each GameObject instance is assigned to a GameScene instance, and the GameEngine automatically runs its currently assigned GameScene.

Basic asset-managment is also provided to automatically handle loading and reusing image and sound assets. Assets such as images and sounds are added to a special "Assets" folder which you create in the solution explorer of the project. The AssetManager then allows your GameObjects to refer to these assets by their file names. The AssetManager takes care of locating the appropriate file based on the type of asset requested, and also caches assets to increase performance.

While the GameEngine's AssetManager instance is responsible for overall asset management, individual GameObjects should request their resources from the GameEngine's CurrentScene since the GameScene will locally cache assets from the AssetManager.


  • Simplistic Object-Oriented Design
  • Resource/Asset Management
  • Automatic Rendering of Sprites & Backgrounds
  • Full Collision
  • Animation
  • Mouse and Keyboard Input
  • Multiple Simultaneous Sounds
  • Support for an Event-Driven Model

GameObject Logic Methods

  • OnCollision(ByVal e As CollisionEventArgs)
  • OnDraw(ByVal e As DrawEventArgs)
  • OnLoad(ByVal e As GameEngineEventArgs)
  • OnInput(ByVal e As GameEngineEventArgs)
  • OnMouseDown(ByVal e As GameEngineEventArgs)
  • OnMouseUp(ByVal e As GameEngineEventArgs)
  • OnUpdate(ByVal e As GameEngineEventArgs)

More Information

Background Information

Original Project

This project originally began on a MSDN Forums thread. The original CTP1 thread is located at:

Last edited Mar 31, 2012 at 6:59 PM by ReedKimble, version 11