Assignment 1 - Programming in Java
Get Help With a similar task to - Assignment 1 - Programming in Java
Additional Instructions:
COMP10062: Assignment 1 © Sam Scott, Mohawk College, 2021 The Assignment: An Asteroids Screen This assignment is about using variables, data types, loops, if statements, and FX Graphics to draw a single screen from the classic video game Asteroids, configured according to user input. (Don’t worry, it’s just a still screen – nothing has to move in this assignment.) Setup Use the FXGraphicsTemplate for this assignment. Change the class name to something meaningful and change the window title, and size of the stage to whatever makes sense. Input When your program runs, it should have a dialog with the user (don’t show the JavaFX stage until after this dialog is over). Ask the user: 1) the x and y location of the center of each asteroid as well as its size (allow the user to decide how many asteroids), 2) the current score, 3) the number of lives remaining, 4) the x and y location of the player’s spaceship, 5) the x and y location of at least 1 alien spaceship, and 6) the color of the player’s spaceship and the alien spaceship (use integers, e.g. 1=red, 2=blue, 3=green). Make sure the user enters values that will look good (e.g. each asteroid should display fully on the screen). Give the user a range of acceptable values in each prompt and make them repeat each input until they get it right. Important Tip: Instead of storing the asteroid locations and sizes, draw each asteroid as soon as the user has entered its x, y, and size values. Output When the stage appears, it should look a bit like a scene from an Asteroids game, as shown below. Score and lives Asteroids Alien Spaceship Player’s Spaceship Copyright (Your name, 2021) NOTE: Your output does not have to look like the image shown above. For example, you could use circles for aliens, and squares for houses. And feel free to make the game as colorful as you like! But try to use at least two Java FX shapes to make the alien ship look like a flying saucer or something recognizable. You’re not going to be graded on your artistic skills! Documentation Standards Don’t forget to follow the Documentation Standards for the course (i.e. Javadoc commenting, meaningful variable and class names, consistent indenting). See Documentation Standards on Canvas. Handing In You have approximately 1 week to complete this assignment. See the due date and time in the Assignments area on Canvas. Hand in by attaching a zipped version of your .java (not .class) file to the drop box. (If you used images or sounds – see the extra challenges above – you must also include these files in the zip file.) Evaluation Your assignment will be evaluated for performance (40%), structure (40%) and documentation (20%) using the rubric in the Assignments area on Canvas. Extra challenge 3: Use the FXAnimationTemplate instead and add some animation effects such as a moving alien spaceship bullets. Maybe you could even figure out a way to add sound effects… Extra challenge 1: Find some authentic videogame images on line and use those instead of squares and rectangles. Image img = new Image("imagename.jpg"); gc.drawImage(img, x, y); Extra challenge 2: Add a “random” option that generates all the inputs randomly and displays the result (Math.random()*RANGE+MIN) generates a random double between MIN and MIN+RANGE-1.
Related Questions
Tutlance Experts offer help in a wide range of topics. Here are some of our top services:
- Math homework help
- Nursing homework help
- Statistics homework help
- Nursing coursework help
- Capstone project writing services
- Essay writers for hire
- Case study writing help
- Buy college papers online
- Buy college research papers
- College homework help
- Professional resume writing services
- Programming homework help
- Coursework writing help
- Term paper writing help
- Biology homework help
- Do my physics homework
- Dissertation data analysis help
- PhD Dissertation writing services
- Chemistry homework help
Post your project now for free and watch professional experts outbid each other in just a few minutes.