Blank Game Template

Blank Game Template

 

The blank game template will give you a starting point for making your own game. Confirm the template project is working correctly by comparing it to the image below. Notice a single star in the center.

blankGame

Download the Template

 

Where To Go Next?
Unfortunately, the team back at the lab is still working on the big red “make a game button”, so in the meantime, there are some things you will need to learn. At a minimum, you will want to complete the first three Arcs our Computers Science in Game Design (C#) course.

In addition to these lessons, you will also want to learn how to add content (e.g. an image) to a game.

Getting Your Bearing
All of our exercises follow this format, but you didn’t learn much about the structure of a game loop. To make even a basic game, there are a few methods in GameLoop.cs you will need to be familiar with.

Methods In The Template
void Create() – Where we add sprites to the sprite manager.
void LoadContent() – Where the game loads the content from the hard drive.
void Render() – Where we render the sprite manager. When render is called, the display is drawn and then presented to the game window.

Methods You Can Add
Game loop is a subclass of Module, which gives you other methods you will need to build a game.

You can add these functions to GameLoop by using the following format:

public override returnType MethodName(parameters).

void PreRender() – This function is called immediately before Render()
void PostRender() – The function is called immediately after Render().
void Update(GameTime time) – Called once per rendered frame. A great place to update things that happen over time such as animations.
void UpdateInput(KeyboardState keyboardState, MouseState mouseState) – Look for changes in the mouse or keyboard.