Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Assignment: Mech Bot Attack - 3D Star Wars planet Hoth style game

Task

In this program you will combine ideas/code from your Assignment 1 and Assignment 2 to create a 3D “Star Wars planet Hoth” style game of mech bots attacking a sliding defensive cannon. This final programming assignment will increase your knowledge of all concepts we have learned in the course. You must do this assignment individually or in a group of two. Do not attempt to find source code on the web for this assignment. It will not help you and you risk extremely serious consequences.

You may reuse code from your Assignment 1 & 2, but not someone else’s code. Begin designing and programming early! Start by reading this description carefully. If there is some part of the assignment you do not understand, please see me in class or email me as soon as possible and I will clarify the issue.

a. Use your mech bot from Assignment 1. Alternatively, you may use the posted solution to assignment 1 if you wish. Use your animation path ability from assignment 2. An enemy mech bot should move along an animation path from the back of the ground toward the front where the defensive cannon is. As it animates forward, the mech bot should fire a projectile toward the defensive cannon (either a regular firing pattern or random).

Note: if you did not get animation paths working properly in assignment 2, just move a bot along a straight-line path.


b. The mech bot should turn its cannon toward the defensive cannon (i.e. rotate it separately from its body). Give the projectiles a certain speed such that a skilled user has a chance to slide the defensive cannon left or right, out of the way.


c. Create one or more copies of you mech bot. You may want to texture map them differently to make the game more visually interesting, but you are not required to do so. The other bots move along their own paths across the ground plane. Have the mech bots attack together in a wave or at different times (your choice). If they are attacking together, the bots should fire their projectiles at different times – i.e. not all at the same time – so that the user has a chance to dodge incoming projectiles.


d. You must texture-map all parts of your mech bots to make them look interesting. If you are using glut shape primitives, you cannot texture map them. Either switch to glu shape primitives or use your own mesh parts to replace them. If you use glut shape primitives (i.e. not texture mapped) you will lose marks. Make sure you use Modulate mode when texture mapping (i.e. combine lighting + shading with texture mapping).

Program Functionality Requirements


e. If a mech bot is hit by a projectile coming from the defensive cannon, it should disappear. For full marks, animate this disappearance. For example, the bot could shrink and disappear. Or break apart then disappear. Use your imagination. If the mech bot reaches the end of the ground plane, it should also disappear.

a. As in assignment 2 (see the assignment 2 video), you have a cannon that you can interactively slide left to right at the bottom of the screen (i.e. slide left and right on the ground plane). The cannon can fire projectiles at the incoming mech bots (use the space-bar key). You must texture-map all parts of your defensive cannon to make them look interesting. If you are using glut shape primitives, you cannot texture map them. Either switch to glu shape primitives or use your own mesh parts to replace them. If you use glut shape primitives (i.e. not texture mapped) you will lose marks.


b. Add the ability to switch the camera view to a FPV (first person view) camera from the perspective of the defensive cannon as if you are inside the defensive cannon. This “defensive cannon” camera view could be displayed in a sub-window (see glutCreateSubWindow) or a separate window if you prefer. You could also use a key to switch between normal world view and FPV view.


c. If the defensive cannon is hit by a projectile, it should stop working. For full marks, the cannon should animate to a “broken state”. For example, the barrel of the cannon could animate down to indicate it no longer functions. Bonus marks will be given for more complex animations to a broken state or alternatively, using a special effect to explode the cannon in some way. To detect whether the defensive cannon has been hit by a projectile, see the Hints below.


d. Use a key to restart the game so the user can continue playing.

Implement the “help” key F1 that when pressed tells the user how to use your program.

To be eligible for full marks on this assignment you must use a GPU vertex shader and a GPU fragment shader to render your scene. I will post a link or example program that will help you write the shaders. If you choose not to implement this requirement then the most you can receive is 14/16.

•To check collisions between a projectile and a bot, or a projectile and the defensive cannon, there are several techniques you could use. A simple technique is to compute the distance between the projectile and the center of the bot (or cannon) – if this distance falls below a threshold (i.e. is “close”), then a collision has occurred. Alternatively, for a bot and/or the cannon, you could construct a rectangular bounding box (i.e. compute the minimum and maximum x, y, z values of a bot when centered in its own coordinate system – similarly for the defensive cannon). Check to see if the current (x, y, z) position of a projectile is inside this bounding box (i.e. simply check the projectile x component against the minimum x and maximum x range of the bounding box. Repeat for y and z.). You will need to calculate the current minimum x and maximum x (and y, z) based on the current center of the bot.


Note: you will need to continually check for collisions each time you render.

1. Have the defensive cannon fire a laser instead of a projectile [1 mark]

2. Add a special effect when a bot is hit and/or when the cannon is hit. For example, you could show pieces flying away, bot breaks into pieces, sparks, explosion, simulated flames/smoke, or other effects. [1 mark]

3. Add levels to your game (and a score which is displayed). Each level could have different parameters (e.g. increasingly curvy animation paths of the attacking bots – making them harder to hit, more attacking bots, faster bots, different weapons etc. etc.) Add comments to a README file to detail what you have done. [2 marks]

The TA will judge the difficulty of your added functionality when deciding on bonus marks. The maximum bonus marks are 2. I recommend not to work on bonus code until you have completed 100% of the base program functionality.

support
close