Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Simple 2D Based Animation Video Gaming Project

Simple 2D Based Animation Video Gaming Project

Question Description

Instructions

For this project, you are expected to build a 2D based animation, which is often used in video gaming. Below is a captured frame showing what you need to achieve. The basic goal is to let you load different images, and synthesize a new image by putting different images together, and display the final image sequentially to screen.

capture

Project Description:

This animation is about a dinosaur chasing a girl in the forest. To achieve this effect, there are three basic objects involved: a girl, a dinosaur, and a moving background. The relative positions of the dinosaur and the girl can be flexible, as long as the dinosaur is to the left of the girl, which makes sense. You can place the girl in the middle of the image. In practice, you do not need to change the positions of the girl and the dinosaur once the program starts. What you need to do is to load different images (about different poses of the girl and dinosaur) and copy them into the final image sequentially, meanwhile copy different parts of the background image using slide window mechanism to generate the animation effects. All the images involved for this animation have been provided in the attachment.

Project Goal:

  • Get familiar with OpenCV by practicing different functions, including imread( ), imshow( ), create( ), waitKey( ), copyTo( ), Range( ).
  • Understand the process of 2D based animation.
  • Learn the role of using “mask” in image processing.
  • Practice implementing user interactivity by programming on mouse/keyboard event.

Suggested Steps:

(1) To get started, you first create a function, say “loadImages()” to load all the images into the memory by using “imread()”. (hint: if you feel it is tedious to type each individual image name, you can use the “sprintf()” function from c++ and load those images by a loop)

(2) You can use the “create( )” function (that is the member function of cv::Mat) to create a screen image, which is used to hold and display the background, the dinosaur, and the girl together. You can make this screen image the same height as the background image (bg_scene.jpg), but a little narrower than the width of the bg_scene.jpg. Initially, this screen image is in black color.

(3) Then you can copy one of the girl image into the screen image. There is no exact location requirement for the girl in the screen. You can put it in the middle of the image as the screenshot shows.

(4) If you succeed, then you can try to copy one dinosaur image to the screen in the same way.

(5) To animate the girl and dinosaur to run, you need to put step (3) and (4) into a loop. For each iteration, different girl or dinosaur image is copied to the screen based on the loop index.

(6) Finally, you need to manage to do the rolling background. The basic idea is to copy different part of the “bg_scene.jpg” into the screen image to generate a moving effect. This part is talked in the class.

Rubrics:

(1) Successfully load all the images into memory. (20%)

(2) Successfully create the screen image. (10%)

(3) Successfully generate animation for the girl and the dinosaur (40% with the three sub-parts below)

  • use copyTo( ) and Range( ) to copy a girl (or dinosaur) image to the screen (15%)
  • correctly use mask image (10%)
  • use a loop to copy different posed figure into the screen (15%)

(4) Successfully generate rolling background (30%)

Bonus Points:

(5) Your program allows the user to use mouse or keyboard to change the location of the girl and dinosaur. For example, the key ‘d’ to let the two objects move towards right; ‘a’ – moves towards left; ‘w’-moves up; ’s’-moves down (20%)

Submission:

Please submit your code through Isidore. If there are more than one files. You need to zip them and submit the “.zip” file.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: School Assignment only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by School Assignment are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. School Assignment is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At School Assignment, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.