The purpose of this assignment is to have you demonstrate knowledge of object-oriented design including the principles of inheritance and polymorphism.
You’ll explore these ideas through the use of a game that you develop. This game will involve a “shooter” style game where the player is trying to move about the screen and destroy the enemies.
You should know the basics of object-oriented programming, including how to define a class and the attributes and methods within the class.
- The first thing you need to do is describe the game that you want to build. There are some constraints, but you have some freedom too. The constraints are:
- Your game must allow the user to move the character around the screen (so you must have a sprite that moves about the screen based upon the user’s control). See Lab 1 for hints on how to do this if you’ve forgotten.
- Your game must allow the user to pick from a set of weapons. So the user can choose which weapon to use at any given time.
- Your game must allow the user to use their weapon. You must have at least 3 weapon types in your game. These weapons will behave differently (so use polymorphism).
- Your game must contain at least three types of enemies. The enemies will behave differently as well.
- Next, you need to define the classes of your game. Think of all of the elements that must exist in the game, and define a class for each. You should do this using a UML class diagram and can do this on paper (and scan it into a picture file) or in electronic form via a document editor.
- Define the classes, each with a name, any attributes, and any methods needed
- Define the relationships between the classes (composition and generalization/inheritance)
- Third, code up the classes in C#
- Finally, make use of instances/objects of your classes in the main program. At the very least, your program should
- Display the player’s icon/sprite on the screen
- Allow the user to select which weapon is currently active
- Display at least one of each kind of enemy on the screen.
There are two deliverables for this assignment.
- The description and object-oriented design you created discussing the classes and elements of your game
- Your code files (from your program’s solution) that define your set of classes and make use of them.
Email your completed project and UML document to me. Place all files into one ZIP file as an attachment. Be sure to submit the ENTIRE project – so all the .CS files, .CSPROJ, .SLN, etc. To keep the attachment smaller, you can delete the BIN folder within the project folder (this will delete the compiled program and all content assets – I can rebuild your solution to regenerate these, so nothing is lost in deleting stuff in the BIN folder).
Please Login or Register
to Submit the Solution for the Request