Starting from:

$25

FIT2102 - Space_Invaders -Solved

 Programming Paradigms 

Assignment 1: Functional Reactive Programming


Overview. Students will work independently to create a classic arcade game using Functional Reactive Programming (FRP) techniques. Programs will be implemented in TypeScript and will use RxJS Observable streams to handle animation and user interaction. Programs should demonstrate a good understanding of functional programming techniques as explored in the first five weeks of the course and should include written documentation of the design and features.



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 needn’t 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 (you’ll have to provide your own server for this).

-       Your own ideas!

Some of the above will require a little independent research. That’s 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.


More products