Game Development Reference
In-Depth Information
Creating a framework
To make things easier, we will make a framework project that will contain code that we
will use in numerous demo projects. It will be a class library that will hold our engine
code . It is code that is not specific to a particular game, but rather is designed to be
able to be re-used in multiple game development projects. If this sounds complicated,
don't worry. It is really very easy to do. We will use the term game code to refer to
code that is specific to a certain game.
Tip
You should always keep your engine code separated from your game code as
much as possible. This increases the reusability of your engine code so that you
can use it in multiple game development projects much more easily. This can also
potentially save you a lot of time on future projects since you won't have to start
completely from scratch every time.
We are now ready to create a Visual Studio project that will store our framework code
and resources:
1. Open Visual Studio Express, if you haven't already.
2. Click on the New Project... link on the left-hand side of the Start Page , or
from the FILE menu, choose New Project... ; either way you will end up in the
New Project window.
3. We need to choose the type of project we wish to create. In this case, we
first need to click on the Visual C# category in the left-hand side column. The
screen changes to show C# project types in the center portion of the window.
4. Now select Class Library shown in the middle of the window. A class library
is just that, a library of classes. It cannot be executed by itself though.
5. Enter a name for the project in the Name textbox at the bottom of the window.
We'll call this project SlimFramework .
6. If you don't have one ready, you will need to create a folder somewhere on
your computer to store your work. Then specify that folder in the Location
textbox at the bottom of the window shown in the following screenshot:
Search WWH ::




Custom Search