CourseWork2 Software Maintenance SpaceInvaders Game Specification sheet:
Please also refer to the Coursework2 Issue sheet for coursework details.
A. Add a new simple level. [20%]
You are required to add a simpler level at the start of the game with the following properties:
- All the enemies should be in one horizontal line 2/3 way down the screen
- Enemies shall be stationary (don’t move)
- This should be added as a new third level; all levels that follow should shuffle down one level number (e.g. level 3 becomes level 4, etc.)
- The enemies should appear as in the screenshot below
HINTS
You find some notes from previous developers:
“When building levels, note that SpaceInvaders.level package will be useful”
“It’s a good idea to use an existing level as a starting point. Different levels have different arrangements of bad guys and different movement characteristics. Level 2 is fairly simple”
B. Add new weapon [20%]
Your boss likes how the game is coming along, but wants more variety in the weapons. “How about adding a new weapon which kills a random number of enemies – if you get lucky it may destroy them all!”
Your tasks:
1. Add a new bonus weapon power-up.
- You will need to create a sprite (graphics file) for the weapon graphic
- Add functionality so that when picked up, it will destroy a random number of enemies from those currently onscreen.
- Additionally, we would like more bonuses to spawn. Increase the chance of a bonus spawning from 25% (on killing an enemy) to 45%.
Unfortunately, there is no documentation on this section of the code.
Your only knowledge is that graphics files are normally stored in a “…resources\assets” folder.
You will need to figure out how the code around bonus weapons works.
C. Add a Sprite Editor [40%]
For this part, the core game coding team have asked for a tool to support the graphics development of the game. Your task is to write a simple Sprite Editor to edit the graphics assets in the game.
Note: you should use knowledge gained in the JavaFX lectures to help solve this part of the coursework. Therefore, it may be best not to start coding until after those lectures.
D. Your tasks:
For moderate marks:
- Make a GUI which allows the user to pick and set colours in a 32×32 grid, using JavaFX
- This represents the pixels in the sprite
- The user must be able to pick from a pallet of at least 8 colours Elements of this will be described later.
For higher marks:
You will need to make the app into a runnable .jar file, and place it into a \bin folder from the project root.
You will also need to record a short <2 minutes’ video demonstrating your tool (see coursework issue sheet for details).
Tips
Remember that this is about maintenance. We expect that you will invest some time to understand the code that we have given you. You may find it helpful to look into the FXGL library on GitHub (https://github.com/AlmasB/FXGL), which forms the source code behind the FXGL library itself.
There are numerous resources to help you understand some aspects of FXGL, if needed (e.g. see https://github.com/AlmasB/FXGL#getting- started)
You should be able to load in an existing PNG file and represent this on your grid of pixels
o The user should be able to edit this loaded sprite
Allow the user to pick from a full palette of colours (rather than
a limited palette of 8)
Save the sprite to a .png file.
Allow the user to set and work with a different size
sprites/canvases such as 64×64.
Show well thought-out and presented design features.
Implement good coding practices, such as using standards and comments.