##Authors Lokesh Manchi (@lokeshmanchi)
Rob Russell(@robdoesweb)
##Overview We're designing a 2D space shooting game that uses graphics and sound to make it fun and interesting. The user will be able to control a spaceship and the purpose of the game is to avoid and shoot the obstacles that are ahead.
##Concepts Demonstrated
- Object Inheritance is used to expand a basic entity class into the different game objects.
- Map and Filter are used to extract data from certain game objects to update and render them.
- Data Abstraction is used to hide the way game objects store values like their position and size
##External Technology and Libraries Briefly describe the existing technology you utilized, and how you used it. Provide a link to that technology(ies). ####Libraries used:
- 2htdp/universe - Racket-Universe
- 2htdp/image - Racket-Images
- rsound - [Racket-Rsound] (https://docs.racket-lang.org/rsound/index.html)
- lang/posn
##Favorite Scheme Expressions ####Lokesh Manchi (a team member)
This code allows the user to use the arrow keys on thier keyboard to interact with the game. The way it works is if the player hits lets say the right key, in the cond statement it hits the key=? key "right". This tells Racket to then call the key-expr function which in this case is (player 'move-right) on the current world. The result of the call is the current world.
(define (handle-key-down world key)
(cond
[(key=? key "left") (player 'move-left)]
[(key=? key "right") (player 'move-right)]
[(key=? key "up") (player 'move-up)]
[(key=? key "down") (player 'move-down)]
[(key=? key " ") (player 'shoot)]
[else world]
)
)####Rob Russell (another team member) The render function filters through alive entities and maps their positions and sprites to new lists used to render everything in one sweet step.
(define (render x)
(define ents-pos (map (λ (entity) (make-posn (entity 'x) (entity 'y))) (filter alive? ents)))
(define ents-sprites (map (λ (entity) (entity 'sprite)) (filter alive? ents)))
(define screen '())
(set! screen (place-images ents-sprites ents-pos background))
(define game-over-text (text "GAME OVER!!! YOU DIED!!!" 36 "red"))
(if game-over
(set! screen (place-images (list game-over-text) (list (make-posn 250 250)) background))
void)
screen
)##Additional Remarks Building this game was really fun and the structure that exists here is now easy to expand to add more entities with custom updates (ie.. enemy ships that shoot back at the player).
#How to Download and Run You may want to link to your latest release for easy downloading by people (such as Mark).
- Click on release at the top of the page and download the most recent release
- After downloading the file extract it and place it anywhere
- Install rsound library on your computer throught the Dr.Racket package manager
- In the project release click on SpaceXplore.rkt, which is the file that starts the game
- A starter page will open up and you have to press spacebar to initialize the game (first image in the screenshot section of this file)
- A second window will pop up (second image in the screenshot section) and this is the game. The controls are the arrow keys to move around and the space bar to shoot
- Dont get hit!

