HW 5: Sky/Terrain/Water/Animation/Game
Introduction
In this homework you will work in teams of 2 to complete the assignment. In doing this assingment and HW 6, you'll end up with a game. In fact, you should start thinking about the design of the game right now. You will use the textbook's Ogro Invasion example as the starting point for your application, so the game will take place outside and will have many of the same game elements as that application. To start, decide what the name of your game will be. You may want to do a little storyboarding and actually make an informal Game Design Document with your teammate, but it is not required for submission. Once you have a name for your game, make a new Visual Studio Solution and Project for your game using the name of your game as the name of both the Solution and Project. I recommend you setup your project using the same arrangement as with my solutions, but you are not required to do so. The key will be that you can easily zip up the solution for submission as a single entity, that it be named properly, and that the executable and associated file may easily be zipped up exclusively for deployment.
What are the game requirements? As far as the end-product for HW 6 is concerned, you have a lot of leeway here. You may make any sort of game you like as long as it meets all technical requirements (i.e. terrain/skybox/etc.) and it is fun to play. Note that the game will be required to have 3 viewing modes: FPS game mode, 3rd Person game mode, and free look terrain-editing mode (part of the HW 5 requirements). Remember the principles of game design that we discussed in CSE 380. Note that sound and music are not required for this assignment. Also note that I strongly encourage all teams to consider submitting their projects for the Spring 2012 SBU Game Programming Competition. You're welcome to add whatever features you like once the semester is over (i.e. sound, music, art, whatever).
Note that one of the important things to consider is that you'll be working on this more than a month, so carefully organize your classes. Use sound software engineering principles as well as necessary efficiencies in designing and then coding your system. A haphazard design will quickly grown unruly.
Goals
In the course of completing this assignment, students should gain the following knowledge:
- How to render the sky
- How to manage and manipulate terrain
- How to render water
- How to manage and manipulate animated models
Requirements
In this assignment, take the your Ogro Invasion application and add the following:
- Add a Sky - In lecture, we talked about different techniques for adding a sky to a game. Use one of those techniques to add a sky to the game. Note, the sky must add value, it should be beautiful, or interesting in some way and the texturing should look good.
- Subdivided Terrain - The terrain in Ogro Invasion is currently one big mass of geometry. It has 4225 vertices (65 x 65) and over 8192 triangles, and every time the terrain is rendered, all of this stuff is processed by the shaders, whether its in the frustum or not. Divide up this terrain into clumps (a minimum of 16). By the way, you might find it easier to change the terrain dimensions to 64 x 64 vertices in order to manage the clumps.
- Add a Pond = Currently the application takes place on an island, which is fine. In addition to this, add a small pond to the island. The point of this is that I'm making you add an additional water entity to the landscape. You may position it wherever you like, but texture it such that it looks greener than the blue ocean water.
- Make your own model for the Main Character - currently the game is in FPS mode only. Add a second mode for 3rd Person Viewing where the camera follows above and behind the main character. You may use one of your team members' robot from HW 1 as the main character if you like, or make a new one. Recall that Blender can export models into the MD2 format, which is what Ogro Invasion uses. Note that your robot should now have animations for walking about the level and also for shooting (robots don't need weapons). When idle, you may have the robot stand still (no animation). The user should be able to toggle between 1st and 3rd person viewing by pressing the V key.
- Make your own model for the enemy - remove the ogros from the game and instead put in another of your models. Again, it can be the other model from HW 1 (not the same as the main character) or you can make another. The model simply needs a running animation and an idle animation since it will not be attacking.
- Freelook Terrain Editing - In HW 4 you added a freelook feature to your game, now we're going to use that mode for manipulating the terrain. When the user presses the T key, it should toggle between game mode and freelook terrain editing mode. When in freelook mode, the user should be able to move around the game world freely (do not roll the camera) and click on terrain, which should select pieces of the terrain, which the user should then be able to raise or lower by moving the mouse. You will want to limit the pitch angle, as ogro invasion already does, to prevent the user from being upside down. Note that once the user clicks on terrain, and thus the mouse button is pressed, the camera should not pan at all until the mouse is released. Note that this is not as hard as it sounds. You'll need to work out ray casting a vector from the look at vector into the terrain to see which is the nearest vertex it runs through, and then raising/lowering the terrain is just changing y values. Note that terrain that gets changed should be saved to a heightmap and used the next time the game app is loaded. Also note that if terrain is lowered or raised, the entitles above that terrain should move with it. Nothing should be below the terrain or floating above it (unless you deliberately want that as part of the game deisgn).
Note that you may use any C++ or GLSL code provided from our textbooks to help you, and there is quite a bit that should, but remember, students must code independently.
What's Next?
That's it for the individual programming assignments. Students will work in teams of 2 in HWs 5 & 6. These assignments will break down as follows:
- HW 6 - A game, including proper Scene Management
Handin Instructions
- Zip up your root source code directory (not the full solution) and submit it through Blackboard.
Web page created and maintained
by Richard McKenna