Task description
In this assignment we will use the RxJS Observable stream explored in the Week 4 worksheet to create the classic Space Invaders game (YouTube) in an SVG image hosted in the spaceInvaders.html webpage. The YouTube video is meant to give you an idea of the basic gameplay, but yours neednt look the same or work in precisely the same way. You will also need to write a report detailing the design of your game. The baseline functionality required for a passing grade, what needs to be included in your report and a list of alternative ideas for achieving an HD, are listed below.
Minimum requirements. All of these requirements must be reasonably executed to achieve a
passing grade (detailed marking rubric below).
- Implement a one-player Space Invaders game with a spaceship movable by mouse (while the mouse cursor is over the svg canvas) or by keyboard.
- Rows of aliens should appear and move across and down the screen.
- The aliens should fire bullets at the user. If the user is hit by one bullet, the user will die and the game will end
- Indicate the score for the player.
- A 1-2 page PDF report detailing your design decisions and use of functional programming techniques discussed in the course notes.
Full Game:
- Meets minimum requirements
- The user has shields, which disintegrate over collisions Smooth and usable game play.
- Able to restart when game finishes
- The game progresses to a new level after all aliens are shot
- See video for an idea of appropriate gameplay
All the above need to be implemented in a good functional reactive programming style to get a good grade. To get a higher grade you have to use a little creativity and add some functionality of your own choice suggestions below.
Ideas for getting an HD. Any one or more of the following (or something of your own devising with a similar degree of complexity) done well (on top of the basic functionality described above) will earn you an HD provided it is implemented using the functional programming ideas we have covered in lectures and tutes:
- Create unit tests and create a file tests/main.test.js
- Incorporate gameplay from other classic arcade games e.g., breakout, galaga, etc.
Add power-ups to the game larger shields, slower aliens, faster spaceship, etc.
- Add combination bonuses, e.g if you hit 5 aliens in a row.
- Advanced (not recommended unless you already know how): Make a distributed multiplayer version, wrapping the comms in Observable (youll have to provide your own server for this).
- Your own ideas!
Some of the above will require a little independent research. Thats what computer science is all about!
Report. Your report should be 1- 2 pages in length, plus up to one page per extension, where you should:
- Include basic report formatting headings/paragraphs Include diagrams as necessary.
- Summarise the workings of the code and highlight the interesting parts.
- Give a high level overview of your design decisions and justification.
- Explain how you tried to follow the FRP style.
- How you manage state throughout your game.
Marking. The goal of this assignment is to assess your understanding of FRP. The marking is done in two parts.
- Implementation of game features.
- Use and understanding of proper functional programming style.
The idea here is that adding features to Space Invaders will grant you a higher grade under the condition that it is done in proper Functional and FRP style. For an example of the proper style, refer to the example Asteroids Game described in the Course Notes. Code that does not use Observable will not get a passing grade; code which relies on imperative code will be penalised. To achieve a mark in the HD range you need to implement a complete Space Invaders game with good style and a choice few additional features, as above.
Additional information
Similar to the tutorial exercises we will provide you with a starter project which you can download in a zip file from Moodle that contains:
- html currently just an empty SVG object. Your Space Invaders game goes here! Add instruction text to the page to explain how to play your Space Invaders game. Make sure the instructions are sufficient that we can properly try out all of your features.
- ts source code for your Space Invaders game. This is where most of your work will go.
Tips for getting started.
Complete the Week 4 Tutorial Worksheet Observable exercises and begin studying Observable in the course notes.
- In week 5 Tutorial you will complete ts
- Once you have completed the above, work through the example Asteroids Game described in the Course Notes. Follow the same framework to begin adding functionality to spaceInvaders.ts as above.
More tips.
- Finish all the JavaScript and TypeScript tutes (up to the first part of Week 5) and the course notes FRP material first. They are designed to give you the experience you need to prepare for this assignment.
- Come to the workshops and tutes for important tips and assistance.
- Attend consultations given by the teaching team.
- Any general questions should be directed to the Ed forums when possible. However, try to avoid posting potential solutions. If you cannot make the consultations, you may make a private post with Staff on the assignment with code.
- Your code should include brief comments to explain logic and design choices where necessary or to refer to detailed explanations in your report. Please do not add comments that are self evident from the code, e.g.:
- const x = 1; // variable x is set to 1.
- Start as soon as possible. Do not leave the assignment until its too late.
Recommended coding practises.
- Structure your program in a consistent and coherent manner (group relevant functions, declarations, and variables together)
- Use block/section comments to clearly layout each part of your code
- Use nice indenting and formatting (can look into formatters if you wish prettier beautify)
- Use camelCase for names and UPPER_CASE for constants
Reviews
There are no reviews yet.