INDIVIDUAL MID-SEMESTER PROJECT

BENCHMARK 3

Requirements: THIS IS A BIG ONE!!! In this benchmark, you will create your game's prototype. This means you will make something that looks and behaves somewhat like your final game. Specifically, you will gather much of your game's necessary artwork, and use it to draw your game world and main character. You will then tie your character's movements to the viewport such that scrolling works properly. You do not yet have to implement collision detection, however.


Part 1: Gather your artwork - Draw and find (dare I say borrow?) all artwork necessary to draw your game world and your main character. You are strongly advised to pick up a digital camera and photograph various surfaces to use as background tiles. You are more than welcome to use completely original artwork to make a game that is truly your own, but Internet sources are fine for this assignment. You may use large or small (tiles) artwork, whichever fits in with your game design better.


Part 2: Load all level data from CSV files - In the WorldRenderingGame example that we examined in lecture, I created a simple level with a tiled background and an animated main character who simply stands still. I did this inside the GameDataLoader class' loadLevelExample method, which I called from the loadWorld method. Instead of hard coding a level, you should put all level data inside a series of CSV files, and then load them into your objects. The format you choose to use is up to you.

For example, you may choose to have an initial csv file that points to other files for data concerning a particular layer or sprite type. Or you may choose to put all your sprite data in a single file, etc.

As for actually reading text from a file, you may use an ifstream for ASCII, or wifstream for wide characters like so:

#include <iostream>
#include <fstream>
using namespace std;
...
wifstream inputFile("FileToRead.txt");
if(inputFile)
{
  wchar_t inputLine[255];
  while(inputFile)
  {
    inputFile.getline(inputLine, 255);
    // NOW DO SOMETHING WITH THE
    // inputLine, WHICH HAS BEEN
    // FILLED WITH A LINE OF TEXT
  }
  inputFile.close();
}

Part 3: Render your World - Add code to your program such that when someone starts a new game your game world is drawn according to the following:

Part 4 - Add your Main Character - Add code to your program such that your main character is drawn and animated properly as it moves about the level. A tricky part will be that you must tie key presses to character movement, and thus viewport scrolling


NOTE: You are permitted to use any source code from our textbook or examples we looked at in class. Please understand that students may not share code among each other. This is an issue that I take very seriously. This is an individual project, and so students must do their coding individually. I want to make sure that each student learns to code games in this course, and the only way to do this is to verify that everyone is doing their own work. Incidents of academic dishonesty will be taken very seriously, so please, don't be tempted this late in your academic career.


SUBMITTING YOUR HW: This should be done in two stages:


A LOOK AHEAD

For the next benchmark students will add animated sprites and collision detection.

GO BACK TO BENCHMARK 2

GO AHEAD TO PRESENTATIONS


SUNYSB CSWeb page created and maintained
by Richard McKenna