Description:
A simple first person shooter made in processing.
Final Report
Project Presentation:
Longer Presentation:
Originally, I thought the presentation had to be 3 minutes. Here is the longer version, it had additional slides and talks briefly about the particle effects.
Controls:
wasd - movement
arrow - looking
/ - shoot
space - jump
l - quit
m - change to mouse controls
r - reload
Code:
The code for this project can be found here: https://github.com/JosephS068/Processing-First-Person-Shooter
Known ISSUES:
There are two minor problems with the game’s presentation, firstly, the audio can lag, this only occurred on my machine while other applications were running, like a web browser.
Secondly on the win/death screen the text can become cut off, cause unknown, likely clipping into obstacles.
Videos:
Play Through
- Video shows:
- Entire play through of level
- Obstacle collisions
- epsilon A* boss fight
- Collision with box obstacles
- Boid enemy
- Bullet detection by entities
- Player interaction with Doors
Target Collision Problems
- Video shows:
- The hit boxes in this game are all spheres, so you can shoot in front of targets and still hit them.
- Bullets move through obstacles/other entities, multiple targets can be hit with one bullet.
Collisions
- Video shows:
- Player interacting with pipe collision(Cylinder Obstacle).
- Wall collision(Quad Obstacle).
- Box Collision(Rectangle Obstacle)
- Player escaping the map, as geometry allows it.
Boss Mapping Displayed
- Video shows:
- The random points the boss can move to and how the goal(player position), is changed when the boss creates a new plan.
Play Through With Audio (Phone Camera)
- Video shows:
- I was unable to record audio with my software on my laptop. A phone video is taken to provide a general overview of the audio present in game.
Images
Target Area
Pipe With Collision
Player Firing, Hitting Target
All Targets Cleared
No Targets Hit
Boss Fight
Boss’ Traps
Boss’ Shield Up
Boss Dead
Boss Following Player
Death Screen
Obstacle Course
Final Corridor
Player Shooting Enemy, In Final Elevator
Corridor Empty
Win Screen Glitch
Maps For Level Creation
Below are the maps I used while programming the level, it was used to help figure out each obstacle’s coordinates, as well as provide the ground work of the level’s layout. It’s primary use was keeping track of how Z axis and X axis were positioned. I gave every wall an id, which allowed for quick map creation. Finally when coloring floors/ceilings the below maps are used
Benchmarks:
Though FPS bench marks were not taken, an exported version of this game was played on a Mac Book running windows. Which was found to have a large decrease in performance compared to my Acer laptop. I made this note, because the Acer laptop used to develop this game was weaker than the Mac Book. To improve performance on all machines, parts of the level is removed from collision check after passing a certain section. Additionally, short audio clips are loaded in memory at the start up.
Tools/Libraries Used:
Processing: https://processing.org/
Minim: http://code.compartmental.net/minim/
Audacity: https://www.audacityteam.org
FPS Camera:
While no code was directly used from the following source, it was helpful in understanding a working first person camera.
https://forum.processing.org/one/topic/1st-person-perspective.html
Mouse Controls:
No code directly used, but information helped develop mouse controls.
https://processing.org/discourse/beta/num_1226167144.html#4
https://stackoverflow.com/questions/1439022/get-mouse-position
Exporting Application:
https://stackoverflow.com/questions/11832342/processing-exported-applet-not-working
When using audio library, had lag issue and null pointers. Following post helped fix that issue.
https://github.com/ddf/Minim/issues/45
Music:
All music in this game was produced by a Friend.
Play Testing:
A Friend
Voices:
Hurt/Death sound effects by A Friend
General/Sergeant U.S.A by a Friend
Icons:
Cross Hair: https://image.flaticon.com/icons/png/512/59/59325.png
Ammo: https://image.flaticon.com/icons/png/512/225/225814.png
Heart: https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fgetdrawings.com%2Ffree-icon-bw%2Fheart-icon-transparent-background-22.png&f=1&nofb=1
Sound Effects:
GunShot: http://soundbible.com/2120-9mm-Gunshot.html
Reload: http://soundbible.com/1959-Shotgun-Reload-Pump.html
Footsteps: http://www.orangefreesounds.com/walking-footsteps-on-metal-surface/
Explosion: http://www.orangefreesounds.com/explosion-sound-effect/
Door Open: http://www.orangefreesounds.com/metro-door-open-sound/
Robot Hurt 1: http://soundbible.com/906-Drop-Sword.html
Robot Hurt 2: http://www.orangefreesounds.com/crash-sound-effect/
Robot Hurt 3: http://www.orangefreesounds.com/metal-door-closing-sound-effect/
Trap Place: http://www.orangefreesounds.com/footstep-single-ice/
Sword Spin: http://www.orangefreesounds.com/fan-sound-effect/
Bullet Deflect: http://soundbible.com/1464-Western-Ricochet.html
Target Hit: http://soundbible.com/1781-Metal-Clang.html
Teleport: http://soundbible.com/1885-Martian-Death-Ray.html
Trap Closed: http://soundbible.com/1104-Metal-Clank-Wobble.html
Textures:
Metal Floor: https://www.pinterest.com/pin/123075002294687146/