INDIVIDUAL MID-SEMESTER PROJECT
BENCHMARK 2
Requirements: In this benchmark we will actually begin coding the GUI and setting up the game architecture. You should use the CSE380_Spring2012_Projects example solution as your starting point. In addition, you will create your own artwork for your main character.
NOTE: Before you start diving into your implementation, it is imperative that you understand the code base I have provided to you. Go to the DummyGame.cpp file and put a breakpoint on the first line of the WinMain method and step through every line of code in the program. You'll need to start to map out where everything is in order to update it to make your game. Note that it is also important that you understand the full file structure of the VS 2010 Solution, like where the .exe and .lib files are generated to and how the source code is arranged.
Part 1 - Setup your own Game: Note that the example VS 2010 Solution I have provided has two projects, the SimpleSideScrollerFramework project, which is essentially the engine, and a game called DummyGame. But you're not making Dummmy Game, so you should have a project named after your own game. Note that you will be submitting your work this semester in two ways for each assignment. First, you'll always zip up your entire solution and upload it via Blackboard. Please be sure to clean your full solution before doing so to reduce the heft of your ZIP. Second, you will zip up your application (.exe and needed files) and post it to your Web page. First you need to setup your solution properly.
- Your Game Project - Add a brand new project for your game to the CSE380_Spring2012_Projects solution that I have provided. Name the project after your game and setup the directory structure and options similar to that of the DummyGame project. Again, be careful to use the proper output directories. Note that you don't need to worry about Release mode this semester, we can do all of our work using just the Debug configuration.
- Your Game Icon (.ico) - The Dummy Game does not have an icon, so when it starts, it's not easily recognized. Draw a logo for your game and make it your application's icon. This is your official game icon, so I hope you like it. Visual Studio can help you in creating an icon resource, but you'll then have to use it to set the window's icon inside WindowsOS.cpp. Review Microsoft's Resource Files Web page for more on these. Note that the MAKEINTRESOURCE macro and Windows' LoadIcon can help with this. This Stack Overflow Thread will also help.
WARNING: Setting up resource files like your windows icon can be slightly maddening and a source of terrible frustration, not to mention become a time-sink. Do not spend forever on this part of the assignment. In fact, it may be best left to the end so that you complete the more important tasks first. - Your Game Setup File - Note how the Dummy Game application is being setup via a text file. Make sure you provide your own file for your game and properly link to it. Then, change the file as needed according to your own needs.
- Windowed Mode - For this project, we'll do everything in windowed mode, so simply leave it like that. Later when we get to the group project, we'll see what happens when we start using fullscreen mode.
Part 2 - Adding to the GUI: Dummy Game has three user interface screens. It has a splash screen, a main menu, and an in-game menu. Note that these guis are all setup via hard-coded methods. That's not so great. It would be better if the GUI stuff could be loaded from a file. We'll also need some more GUI screens. Make the following changes to your game from the Dummy Game example:
- GUI Setup File - Rather than hard-code the creation of your GUI, as I have done inside the DummyGameLoader.cpp file's loadGUI method, load all GUI settings from a text file. Note that you will have to come up with your own file format, so plan this out carefully. The easiest way to do this, is to simply go through the hardCodedLoadGUIExample method and see what needs to be loaded. In addition, examine the loadGame method to see how to do effient, buffered text file reading using the provided BufferedTextFileReader class. So what should be loaded from the file? Well, all gui screen data, including how many screens there will be, what the sizes and locations of components are, and all the image file names.
- Splash Screen - Make an image to use for your own splash screen. It should obviously represent your own game. Also, currently the user moves from the splash screen by clicking the mouse anywhere on the game screen. Leave that functionality, but also add code such that when we are in the splash screen, pressing the ENTER key will do the same thing.
- Main Menu - Create a simple main menu for your game, using your own artwork, that provides four functioning buttons:
- Start Game - when pressed, this should start the game. Note that this already works, though you'll have to use your own button artwork and size and position it according to your own desired layout.
- Controls - when pressed, this should take the user to the Controls Menu. More on that shortly.
- About - when pressed, this should take the user to the About Menu. Again, more on that shortly.
- Exit - when pressed, the application should terminate. Note that this already function properly.
- Start Game - when pressed, this should start the game. Note that this already works, though you'll have to use your own button artwork and size and position it according to your own desired layout.
- Controls Menu - the Controls menu should simply be an attractive, informative screen (like all your screens) that will provide the user with a summary of how to control your character and thus play your game. Note that your screen will require a button to navigate back to the main menu.
- About Menu - the About menu should provide a summary of the game developer, i.e. the game name, the student name (do NOT put your ID number), the course, the semester, the school, etc.
- In-Game Menu - the In-Game menu should provide a way to navitage back to the Main Menu and should provide any additional controls required. Note the in-game menu I have provided does not look so attractive, mainly because it has a toolbar where there is only one button, which looks strange. If your in-game gui requires more controls, arrange them neatly as you like. If not, improve the look/layout of the in-game gui such that it looks more like a typical game. For example, you may provide a banner alongside the button.
A NOTE ON BUTTONS: Many games use buttons that simply look like hypertext. By this I mean they have no outline (no rectangle or oval). Making such buttons is perfectly acceptable, as is using traditional looking buttons. You may be as creative as you like to create your own game look, just make sure the GUI is user friendly, easy to navigate, and bug-free.In addition to providing the options, in order to provide a menu that looks and feels professional, it should adhere to the following rules:- Options in the menu must be selectable by mouse clicks (like buttons).
- Your game should have its own unique mouse cursor. Draw it such that it fits in with the theme of your game, of course.
- Options in the menu should provide mouse-over feedback. Simply changing the color of the button text is an easy way to do this.
Part 3: Game Pause/Resume and the In-Game Menu - Once a game has started (but is not over), players should be able to pause the game by pressing the TAB key. When pressed, an in-game display should appear saying the game is paused and all game-logic should cease. Pressing TAB again should unpause the game. Note that while paused, you'll still have to draw the game world, but then you'll need an overlay on top to display the paused message. Alternatively you could render text for the paused message, just make sure it looks good.
Part 4: Your main character sprite - You are the main character of your game, for this you'll need a series of images of your character in order to animate it. Produce images that together may be used for the character's IDLE state, and change the game such that it uses your artwork for the player. Note, in the next HW, we will start loading game level data from text files. You do not have to do that in this assignment.
Part 5: SVN
You are now at the stage in your career as a software developer where you should start to use version control software for everything you develop. As such, you are required this semester to use a Subversion tool of your choice for keeping track of your work. With such a tool, every time you make significant changes to your project, you should commit your changes to your SVN repository, which will manage your work. We are developing on Windows (even if you own a Mac), so TortoiseSVN provides an elegant integration with Windows Explorer that makes version control easy. Note that with each HW submission, you must also submit a file entitled SVNLog.txt, which contains all of the contents of your SVN log file. This would document all the SVN updates you made in the course of doing your work. Our classroom and the rest of the department's Windows Lab comes equipped with TortoiseSVN. The following walks you through on how to use this tool:
Setup your SVN Repository: After installing TortoiseSVN, open Windows Explorer and make a directory called CSE380_Repository somewhere outside of any Visual Studio projects. This will be the place where all your code will be committed to this semester, so put it somewhere easy to find, and not inside any Visual Studio projects. Now, right click on this directory and select TortoiseSVN-->Create repository here.
SVN Checkout: For your Visual Studio project, we now want to connect the root source code directory to the SVN repository such that we can easily commit our changes. In Windows Explorer, right click on your project's root source code directory and select SVN Checkout. You must then type the full path (or copy and paste) of your repository's directory in the URL of repository field. Make sure to start that URL with file:/// followed by the full C:/... path. Specify your project's directory as the Checkout directory. Make sure Fully recursive is selected for the Checkout Depth field and click OK. Your project source code is now connected.
SVN Commit: Now, whenever you make significant changes to your project, commit your work to the repository through Windows Explorer by right clicking on the directory and selecting SVN Commit. Note that every time you commit, you should provide a brief note that explains the changes being committed.
Viewing the SVN Log: Again, for each programming HW, you must submit an SVN log file (SVNLog.txt) that notes all the changes you committed to your repository for the project. To view this log, in Windows Explorer, right-click on your project's directory and select Tortoise SVN-->Show log. From the view provided by this function, you may select all the log rows and copy them into a text file for you to submit.
A NOTE ON ACADEMIC DISHONESTY: Student projects should start from the CSE380_Spring2012_Projects project we talked about in lecture. I expect you to use object-oriented principles. Please be aware that students may not share code directly. 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 that 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:
- Hand-in your full Visual Studio project with all source code and other components necessary to build and run your game by zipping it up into a single ZIP file and posting it to the appropriate Assignment on Blackboard. Call your submission "X Y's Benchmark 2", where "X Y" is your name. You'll use a similar style for future Benchmarks
A LOOK AHEAD
For the next benchmark students will organize all game artwork and will create a game prototype with a fully tiled, partially complete game world. In addition students will add a fully animated main character.
GO AHEAD TO BENCHMARK 3
Web page created and maintained
by Richard McKenna