Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

(lab) Slide and Catch Game Part IIStart Assignment Points 100Submitting a text entry box, a website url, or a file uploadOverview This week’s project is an extension of the one from last week. You

(lab) Slide and Catch Game Part IIStart Assignment

  • Points 100
  • Submitting a text entry box, a website url, or a file upload

Overview

This week’s project is an extension of the one from last week. 

You should already have a project with the following features:

  • A subclassed Scene for game play
  • An avatar sprite controlled by the user
  • User sprite will move in X or Y axis
  • Use keyboard input to change sprite position
  • At least one target sprite
  • Target sprite is computer controlled
  • It can move from top to bottom of screen
  • Behavior should be somewhat randomized
  • All sprites should consider boundary checking
  • There should be a test for collision between player sprite and target sprites
  • You should have a sound effect in place for handling collisions.

If you did not turn in a game with these features last week, we will provide you with a starting place template you can work with so you won’t fall too far behind

Gameplay labels

The game needs to have some kind of goals and obstacles.  It’s important to explain this to the user so she knows what to do.  We’ll do that in two ways.  First, we’ll add feedback to the game screen. This will allow us to keep track of points, and will also allow us to place a countdown timer on the screen.  Here’s the steps

  • Create a label for showing the score.  Get this label to appear on the game play screen
  • Create an attribute for the game class called score.  Initialize this value to zero.
  • When a collision between the player and target happens, increment the score
  • Make sure the label is always showing the current score
  • When scorekeeping is working, add a second label for the timer
  • Make sure this label is appearing where you want on the screen
  • NOTE: because the timer label will need to update every frame, you may want this to be a subclass of the Label.
  • Add a timer to manage the time
  • Set the timer’s totalTime to the default length so you can easily make a countdown timer
  • Display the timer’s getTimeLeft() value in the label
  • When your specified time limit is over, end the game (scene.stop() could be useful here)
  • Note that you’ll drive yourself crazy testing a game that lasts for 5 minutes each time
  • There’s a reason my examples last for only ten seconds
  • You can always change the time limit later

Adding a state system

The next part of the process is to create a state system.  You’ll need to create a second scene to be the introduction scene. This will have the following features

  • A multilabel containing instructions for game play
  • A label containing the last score
  • A button to play the game
  • A second button to exit the game

Both buttons should stop the scene.  At this point we aren’t worried about how to get the previous score.

Test your new scene in main.  Instantiate and start the intro screen, then instantiate and start the game scene.  At this point you will see the instructions, then the gameplay, and then the entire game will end.

Add a status attribute to the Intro class.  Now modify the buttons so they still both exit the game, but report a different status (play or exit)

Modify your main function to have a standard keepGoing loop. 

Inside the loop, play the intro scene, and then use the status to determine whether you play the game or exit the loop

Modify the Intro scene’s constructor to take a score value in the constructor.  

Modify the main loop so the score from the game is passed to the Intro screen on each pass.

The Game Design Document

You started the game design document last week, but to get to all this new content, you’ll need to make your document more complete.  At this point it should include:

  • Some kind of diagram of game play
  • Label each sprite on the screen indicating what class it will be
  • For each sprite:
    • What image are you hoping to have here?  What’s its size?
    • Is it a standard sprite or custom? Can it be BasicSprite or SuperSprite?
    • How is the sprite born?  Does it die?  How?
    • How does the sprite move? Is it under user or computer control?
    • What specific motion mechanics do you expect?
    • What happens when this sprite leaves the stage?
    • What happens when this sprite collides with any other sprite on the screen?
  • UI
    • How will you explain the game before gameplay begins?
    • What feedback will you give during game play?
    • What UI components will you need?
    • How will they be updated with necessary information?
    • Where will they go on the screen?
  • Game State
    • What are the game states?
    • How do you transfer between them?
    • How do you communicate any needed information between states?
    • How does the entire game eventually end?
  • Sound effects
    • What sound effects do you need?
    • You can record them yourself if you can’t find something good
    • When will the sound effect play?
    • Where is the best place in code for the sound effect to be coded?
  • Background image
    • Will you have a background image?
    • Where will it come from?
    • Can you still see all the gameplay elements clearly?
  • Intellectual property
    • List where each image or sound effect came from
    • If it is original, that’s all you need to say
    • If it is open-source or creative commons, still link the source
    • If it is copyrighted, get something else
    • Placeholder values are fine.

Expectations

I have given you plenty of examples to start with.  If you’re getting lost, please review the videos and examples, especially these:

  • Your first game code examplesLinks to an external site.
  • milestones 1-3 videoLinks to an external site.
  • milestones 4-6 videoLinks to an external site.
  • milestones 7-8 videoLinks to an external site.

You’ll get a better grade by having excellent documentation and adding to the core in some creative ways.  Try to build your own game with your own dynamics.  It’s fine if you don’t get the gameplay perfect on this go-around.  Build a foundation you can build on with all the main mechanics in place. Have Fun!

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least th

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least three other components of the computing device. In the speaker notes, discuss in detail what you use the device

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confident

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confidentiality, or some other high-profile attack. Find a news article about a recent network attack (no more than one year ago).

I am doing IFSM 300 Information Systems in Organization. the instructions The Stage 4 case study project is due as shown in the schedule. The assignment instructions and vendor brochure are attached.

I am doing IFSM 300 Information Systems in Organization. the instructions The Stage 4 case study project is due as shown in the schedule. The assignment instructions and vendor brochure are attached. The Case Study is posted under Course Resources. Use the Case Study and weekly readings to develop your assignment and understand the concepts

Find 5 student organizations that interest you. For each organization: Why are you interested in this organization?Describe some of the activities of the organizationWhen and where is the next meeti

Find 5 student organizations that interest you.  For each organization: Why are you interested in this organization? Describe some of the activities of the organization When and where  is the next meeting? If you have questions about the organization, how would you contact them?CSE1106 – Intro to Computer Science and

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confident

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confidentiality, or some other high-profile attack. Find a news article about a recent network attack (no more than one year ago).

Linux in Action (Required/Graded) Review this Linux case study. In particular, review the section titled “Results.” Share your thoughts on Linux after reviewing this study. Did you learn anything tha

Linux in Action (Required/Graded)  Review this Linux case study. In particular, review the section titled “Results.” Share your thoughts on Linux after reviewing this study. Did you learn anything that surprised you? Did it influence your opinion about Linux? Why or why not? In addition to your primary forum response, post

Linux Project and Virtualization (Required/Graded) Next week, the final element of your project will be due. In this phase, you’ll install Linux into a virtual machine and demonstrate some Linux comm

Linux Project and Virtualization (Required/Graded)  Next week, the final element of your project will be due. In this phase, you’ll install Linux into a virtual machine and demonstrate some Linux commands. A vital element of the project is virtualization. Have you previously used virtualization tools, such as VMware, VirtualBox, HyperV,

Careers in Linux System Administration (Required/Graded) SubscribeChoose from one of the following options. Be sure to include the option number in your response. 1. Job Search Use Indeed.com, Monst

Careers in Linux System Administration (Required/Graded) SubscribeChoose from one of the following options. Be sure to include the option number in your response. 1. Job Search Use Indeed.com, Monster.com, or LinkedIn.com to research IT job careers that require Linux Administration skills in your area. You can use keywords such as "Linux

Write a Java program as follows:1. Prompt the user on which action they want to take:a. Convert cubic feet to U.S. bushelsb. Convert miles to kilometersc. Determine graduation with honors titled. Exit

 Write a Java program as follows:1. Prompt the user on which action they want to take:a. Convert cubic feet to U.S. bushelsb. Convert miles to kilometersc. Determine graduation with honors titled. Exit program2. Programs at a minimum must have the following methods:a. Convert cubic feet method that gets cubic feet

Calculator Server and Client Java The goal: Make a client that sends simple arithmetic expressions, and a server that solves them and sends the result back to the client. Class design requirements:

Calculator Server and Client  Java  The goal: Make a client that sends simple arithmetic expressions, and a server that solves them and sends the result back to the client.  Class design requirements:  Your program should contain at least the following classes • CalculatorClient • CalculatorServer Important note: This is an

This is about java. I would appreciate your help! Please do not provide a “copy and paste answer”! Among other things, the purpose of this assignment is to assess the student’s ability to write a pro

This is about java. I would appreciate your help! Please do not provide a “copy and paste answer”!  Among other things, the purpose of this assignment is to assess the student’s ability to write a program dealing with window events, mouse events, and the Delegation Event Model. PROGRAM SPECIFICATIONS Beginning

The following program draws an BB-8 as shown below. Modify the program to move the BB-8 left or right using the arrow keys. The program can be download from the CMS. Please use Javafx   import java

The following program draws an BB-8 as shown below.  Modify the program to move the BB-8 left or right using the arrow keys.  The program can be download from the CMS. Please use Javafx  import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.input.KeyCode; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Line; import javafx.stage.Stage;