Everybody Loves Rayguns

Screen shot from 'Everybody Loves Rayguns'

Shrink, grow and teleport objects to solve puzzles.
Genre: First Person Puzzle-Platformer || Platform(s): PC, Mac
[Download Page]

The name started out as a joke name based on our game concept, but we ended up falling in love with the name and keeping it. It was some sort of Stockholm syndrome situation I think.

This game was my final project for my console development class in my last year of college. We were a group of 4 consisting of myself, and my friends, Derek, Wahid, and Chris. Chris was in charge of the networking (which doens’t show up in the downloadable build, but is there in the repo), Derek was in charge of the event/messaging system which heavily aided us to create the game mechanics, and Wahid and I were resposible for the gameplay programming and level design.

The main gameplay element I worked on was the teleporting beam. In the game the player can deploy(shoot out) beacons that attach to specific surfaces and with the beacon deployed the player can teleport puzzle elements to where ever the beacon is deployed. There were a couple of challenges I encountered while creating the teleport beam. One was to detect if there was enough room to teleport any potential object, and two was to give the player feedback on how where the teleported object would end up.

I was very proud after solving the first issue. I wanted to know before teleporting an object if it was possible to even teleport it in the first place. What I ended up doing was having an empty object on the beacon that shot out rays to check if there was anything in the area around the beacon that would cause problems. When the player points their cursor on an object that can be teleported, the dimensions of the object are passed to the beacon. The beacon then repositions the empty object a bit more that half the length of the teleporting object away from the beacon so that the object wouldn’t clip into the surface that the beacon is attached to. The beacon calculates the lengths of rays to be cast out from the empty object and then does so.

At first I only had rays casting outward, but I came across another problem if the empty object was within a collider casting out wouldn’t trigger any flags since the rays wouldn’t detect colliders from the inside. The solution was to cast out and then cast back from the ends of the outward casts. Doing this doubled the rays which I wasn’t too happy about, but it was the only way I could solve the problem. So even if the empty object was within geometry (I don’t want to teleport object into things) it would correctly detect that objects cannot be teleported to the beacon’s location.

My prof gave me feedback after showing him one of the early prototypes. He told me, rightly so, that it wasn’t clear where the object would end up after teleporting it. I solved the second problem in 2 ways. The first thing I did was to add a camera to the beacon and display what the beacon was seeing to the player. This way the player could see exactly where any teleported object landed. The second thing I did was to broadcast a hologram from the beacon showing how the object would look like before the player actually teleported the object.

I used a cool shader I found to achieve the effect of a hologram. Though I’ve used shaders before in graphics programming classes I had never used one in any game I ever worked on. This brought me down the path to learning about shaders and how powerful they can be. So, yes I didn’t write any shader from scratch for this project, but I did modify it a bit and shaders are definitely in my back pocket for future projects.

Outside of the game itself I learned a lot about working on a team and even a bit of team management. Working on this project has definitely shaped the way I will work on projects in the future.

Also, why is the game called Everybody Loves Rayguns, yet there are no rayguns in the whole game? 🙂