MSIM 641 Visualization I MSIM 408/508 & ECE 407/507 Introduction to Game Development Programming Assignment Four Tank Game Assigned March 30th, Due 12:00 PM April 26th 1. Overview Realistic 3D objects...

Game development: Unity game engine, write a script to move a tank build using rigid body and moveposition. The wheels are to rotate and the front wheels turn based on the turn of the tank.


MSIM 641 Visualization I MSIM 408/508 & ECE 407/507 Introduction to Game Development Programming Assignment Four Tank Game Assigned March 30th, Due 12:00 PM April 26th 1. Overview Realistic 3D objects and interactions are perhaps the most appealing elements of contemporary video games. Modeling and representation of complex 3D objects and their interactions require in-depth understanding of many theoretical concepts, such as linear algebra (especially affine transformations), game physics, and particle systems. Affine transformations, such as scaling, rotation, and translation, are implemented as matrix operations in 3D graphics libraries. Quaternions are used in Unity extensively to represent rotations. Game physics including collision detection ensures game objects move realistically and maintain proper distance against each other. Particle systems are a computer graphics technique to simulate phenomena that are difficult to model using conventional techniques, such as fire, smoke, and explosions. In this programming assignment, you will create an engaging 3D battle game that involves a tank controlled by the player and other still or moving objects (e.g., vehicles, buildings, or soldiers) in a battlefield. The player controls the tank's steering, moving, turret rotation, cannon angle, and firing. The overall goal of the game is to avoid enemy fire and destroy enemies. You must create at least two cameras: one for the entire scene and one third person camera following the tank. For extra credits, you can create moving enemy tank(s) that are controlled by the computer. 2. Objectives Upon successful completion of this programming assignment, you shall possess the following new skills in addition to the ones you have learned so far in this course. · Understand 3D models and their structures, local and world (global) coordinate systems and conversions between them. · Understand 3D model formats and conversions. · Understand the overall architecture and operations of Unity game engine. · Use the physics engine in Unity. · Create multiple cameras. · Use customized collision detection. · Use quaternions to compute rotations and orientations. · Generate prefabs. · Generate particle systems. · Use sound effects. · Generate terrain in Unity. · Write scripts in C# using the following classes. · MonoBehaviour · GameObject · Vector3 · Rigidbody · Transform · Quaternion · Input · AudioSource · Collider · Camera · Application 3. Tasks The following tasks are required. 1. Design a battle scene that has at least the following objects. a. Terrain. Use the Terrain tool in Unity to generate the terrain with a minimum size of 200 m × 200 m. Attach texture(s) to the terrain. b. Tank. You must use the tank model provided by the instructor. You need to generate a collider for the tank. A box collider is recommended for the tank. c. Still objects such as buildings and trees and your enemies are hidden in these objects. You can generate the models in Unity or obtain the models from other sources as described in next task. Generate necessary colliders for most objects in your scene. 2. Obtain free or paid (at your own cost) 3D models from various sources. The following are some suggestions. a. Unity Asset Store b. www.turbosquid.com c. https://3dwarehouse.sketchup.com/ 3. You need to use standard exported 3D files. Unity supports FBX, dae (Collada), 3DS, dxf, and obj files, you need to convert your 3D models to one of these formats if necessary. You can use the following tools to convert your 3D models. a. Google SketchUp Pro (You can have 8 hours of trial use) b. Autodesk Maya (free for students) c. Microsoft Visual Studio 4. Generate an overhead camera that captures the entire scene and a third person camera for the tank controlled by the player. The two camera views can be switched by pressing the F(f) key. Game play 5. The overall goal is to shoot your hidden enemies, which can also shoot you from different locations. 6. The player controls her/his own tank using the following keys: W (move forward), S (move backward), A (turn left), D (turn right), Left (rotate turret left), Right (rotate turret right), Up (raise cannon), Down (lower down cannon), Space (fire). 7. Write a script to control the tank movement. Note that front and rear wheels have different sizes and thus they must rotate at different speeds. The front (steering) wheels must not deviate from their central positions for more than 45 degrees. Similarly, the cannon must move in the range from its reset position to 90 degrees vertically. The tank’s orientation is controlled by the front wheels and the tank’s movement is very similar to that of a car, e.g., the tank can only turn when the tank is moving, while the front wheels can turn when the car is still. The tank’s longitudinal movement must be in synchronization with the wheel rotation. In other words, the tank must not appear sliding without enough wheel rotation or stalling with too much wheel rotation. You need to attach a Rigidbody to the tank and move the tank using Rigidbody.MovePosition() and Rigidbody.MoveRotation() methods in the FixedUpdate() in the tank controller. Using Rigidbody instead of Transform to move the tank produces correct physics interactions between the tank and other objects. Also, do not move the tank by adding forces. Note that you cannot use the Wheel Collider provided by Unity in this assignment. Refer to the Unity Tanks! Tutorial for the overall movement of the tank. 8. The shells fired by your tank (by pressing spacebar) should follow a trajectory determined by a projectile motion. Enemy fires can follow projectile motions or straight-line motions depending on their ammunitions. Add sound effects for the shells and enemy ammunitions. 9. Write a script to control the enemy fires. Enemy fires occur only when your tank appears within a certain range from the enemy in terms of distance and direction (angle). Enemy fire speed and frequency should be adjustable as well. 10. When an enemy fires a bullet, the orientation of the bullet must be consistent with its traveling direction, i.e., its motion must be longitudinal. 11. Generate a Unity prefab for the tank shells and use that prefab in your game. Similarly generate prefabs for other necessary game objects. 12. Use particle system to simulate the fire and smoke in shell explosions. 13. Your tank has a life of 20, that is, it will die after being shot for 20 times. Your enemies only have a life of 3, that is, they will die after being shot three times. 14. Display the lives of the player (tank) remaining and press key R(r) to restart the game. 15. Generate different folders for different types of assets in your games. The following tasks are required for students registered in MSIM 508/ECE 507. 16. Design and implement at least two scenes with different levels of complexity and difficulty. The following tasks are optional for extra credits and the exact number of points is dependent on the complexity of your implementation. 17. Moving enemy objects (including at least one enemy tank) than move and fire and are controlled by the computer. 4. Code (65 points) Exercise good coding practices, such as naming variables meaningfully and properly, including comments of key classes, variables, functions, and code segments, and using proper indentations and spacing between tokens (e.g., variables, operators). Points will be deducted for lack of comments or bad formatting (e.g., no indentation or large blank spaces in the code). The following is the grade allocation for different tasks or functionalities of your program. · Tank movements: 25 points · Collision detection: 10 points · Camera views: 5 points · Shell projectile motion: 5 points · Enemy fire: 5 points · Particle systems: 5 points · Game scene: 10 points 5. Report (35 points) The report should contain at least the following sections and use the same formatting in this assignment description or other professional formats. Points will be deducted for improper formatting. · Introduction (2 points): overview of the assignment, such as background, objectives, and brief summary of what you have done for this assignment. Don’t repeat the assignment description verbatim. · Game Design and Implementation (10 points) · Briefly describe the key components in your game. · Scenes · Key 3D models, animations, and prefabs · Other key assets or elements in your game · Use doxygen to generate the documentation (help) file for your code, including all classes, class variables, class methods, and internal implementations of critical methods, for all types of access modifiers (public, protected, and private). Your documentation should include source code, class diagrams, call graphs, and caller graphs. Your documentation should be contained in a single .chm file. · Results (15 points): Describe what you have done for each task specified in Section 3: Tasks. Include results and necessary screen captures for each task. Answer the questions in the task if any. · Conclusion and Discussion (3 points): Discuss your accomplishments, learning outcomes, and difficulties and how you can do better for this assignment. Feel free to discuss other relevant topics (e.g., the numbers of hours you have spent on this assignment). · Recorded Videos (5 points). Produce a video that demonstrate a full play of your game. 6. Deliverables You need to compress your entire Unity project, report, and screen recording videos and compress them into one single file and name it following the requirement specified in the lecture "Course Introduction", Slide 42. Submit the compressed file to Blackboard. 4
Apr 30, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here