[Solved] CS2261 Homework2-Pong

$25

File Name: CS2261_Homework2-Pong.zip
File Size: 197.82 KB

SKU: [Solved] CS2261 Homework2-Pong Category: Tag:
5/5 - (1 vote)

Purpose: To build a simple game in Mode 3 to further your understanding of: inputs to the GBA, collision detection and reaction, C basics, and drawing in Mode 3.

Instructions:

For this homework, you will recreate the game Pong in Mode 3. Review the Requirements section on the succeeding page for an explicit list of what we expect as the base requirements. The basic idea is as follows:

There are two different paddles on opposite sides of the screen that can be controlled through user input. A ball moves around the screen and bounces off of the paddles. If a player misses the ball, the opposing player gets a point. The game ends when a player reaches 3 points, and that player wins!

To get an idea of what the gameplay should look like, watch this video: https://www.youtube.com/watch?v=fiShX2pTz9A&ab_channel=andys-arcad

e. Of course your game is not expected to look exactly like the original pong (it can if youd like), but the basic gameplay should still be recreated.

Requirements:

Your game must have the following:

  • Two paddles that can collide with the ball and move meaningfully through intuitive user input controls (e.g. up/down & A/B)
    • If the ball collides with a paddle OR the top or bottom of the screen, it must bounce off and change direction. Note: If you decide to change the orientation of the paddles to be at the top and bottom of the screen, then the ball should bounce off of the left and right sides of the screen
  • If the ball is missed by a paddle and hits the edge of the screen, the opposing player gets a point
  • An end state
    • The game should end once any of the two players reaches 3 points

You do not have to have anything happen once you reach the end state, as long as it can be understood that you have reached an end to the game

  • A txt file
    • An instruction manual (of sorts) that tells a player how to play your game

Include which buttons are used for controlling the paddles

  • Only a minimal amount of flicker

Your code must have the following:

  • Multiple .c files
  • At least one .h file
  • Good organization (see tips below)
  • Meaningful comments

Flair (optional):

  • Add flair to your game in order to receive up to an additional 5 points Some ideas:

Add a tally to the screen to indicate how many points each player currently has

Draw the ball as something other than a rectangle/square

Change the end state so that it indicates which player won

Tips:

  • Start early. Never underestimate how long it takes to make a game.
  • For collision code, draw pictures. Graph paper is your friend!
  • When splitting code between multiple files, put code that will be useful in multiple games in myLib.c, and code specific to this game in main.c or other files.

Those other files should be specific to a concept (collision, etc.).

  • Organize your code into functions specific to what that code does. Your main method should not be very long. Use helper functions!
  • Having update() and draw() functions that you call in main() is helpful.
  • Make sure the order in which you call your functions takes into account waiting for vBlank at the correct This will help you to minimize flicker.
  • Build upon the myLib.c and myLib.h files weve provided in labs.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS2261 Homework2-Pong
$25