Instructions - Visual Basic 6
From SwinGame
This article shows you how to get started creating a SwinGame using the VB6 version of the SwinGame SDK.
Contents |
Requirements
You will need to following to use the VB6 version of SwinGame.
- Visual Studio 6.0
- .NET Version 2 (which can be installed from Windows Update)
- The SwinGame VB6 SDK - download SGSDK-1-1-3-VB6.zip
- You will also need to be logged on as "'administrator"' to install and run the VB6 games
Instructional Video
Watch the video of process for installing, compiling, and starting your game.
Installing
The SGSDK-1-1-3-VB6.zip file contains all the files you need to start making the game. To install this you only need to run SGSDKVB6.reg, then it will be installed. You can then put the folder were ever you want.
The following files are included in the SDK.
- GameLogic.bas - The main game source file. You will be writing your game to this file.
- GameLauncher.bas - Launches a game (You will never need to modify this file)
- GameResources.bas - Resource manager (Explained in here)
- Colour.bas - The colours that you can your game.
- SwinGame.bas - Allows you to access the SDK (You MUST not modify this file)
- VB6 Starter Pack.vbp - The project which will group all the file together.
- Icon.frm - Set the Icon for the game.
- copyresourcesVB6.cmd - A script to copy the game and its resources to the bin folder.
- bin folder - A compiled game will go in here.
- lib folder - Contains the SwinGame libraries.
- Resources folder - Contains the resources used in a game.
- SGSDKVB6.reg - You must run this to be able to use the SDK.
Starting a Game
Open Visual Studio 6.0, and click File > Open Project. Navigate your way to the folder containing your project and open VB6 Starter Pack.vbp. Now click Project > "References..." then click Browse. Navigate you way to the folder containing your project and open the lib folder. Select the file "com.SGSDKVB6.tlb" and click OK. Now the word MISSING should be not be next to SGSDKVB6. Click OK to close the Reference screen.
Building and Running the Game
To Build the game, Click File> Make Game.exe. Then click OK. Open up My Computer and navigate your project's folder and run copyresourcesVB6.cmd. To Run the game, open the bin folder and run the file Game.exe.
That's all. You have now setup SwinGame and are ready to create your own games.
Upgrading
The following instructions indicate how to upgrade an existing project to a new version of the SDK.
- To 1.1.4 - from 1.1.3
- Delete the lib folder in your project
- Copy lib folder from v1.1.4 into your project
- To 1.1.3 - from 1.1.2
- Delete the lib folder in your project
- Copy lib folder from v1.1.3 into your project
- To 1.1.2 - from 1.1.1
- Delete the lib folder in your project
- Copy lib folder from v1.1.2 into your project
- To 1.1.1 - from 1.1.0
- Delete the lib folder in your project
- Copy lib folder from v1.1.1 into your project
- Rename GameResources in your project
- Copy GameResources into your project from v1.1.1
- Merge in changes to the LoadImage, etc. routines from your old GameResources
- Copy new images from v1.1.1 Resources folder
Distributing your Game
When your game is complete you can distribute it by packaging up all of the files in the bin folder. These can then be distributed to anyone running Windows. They run the game by double clicking the executable. They do need to install the SGSDKVB6.reg file to run the game.
Enjoy programming with SwinGame!

