Thursday, February 7, 2019

Shutter




Shutter is a game created in SFML, a lightweight opengl library.
I created the game in a total of 5 weeks in my free time during my winter quarter at scad.
I wanted to show my knowledge of c++ by creating a raycaster game.

I based my initial prototype off of the OneLoneCoders First Person Shooter. The sprite rendering and floor rendering were informed by this as well.

However, I notices several issues with the OneLoneCoder's code. 
Firstly, there was an error which caused a fish eye lensing effect. This was solved by scaling the ray distance based of the ray angle.

Secondly, there was no depth buffer. This was needed to add billboard sprites to the game. I looked at the way Wolfenstein Created their billboarded sprites and implemented the sprites in a similar manor.
Each Sprite is separated into vertical slices, hare occluded by the depth buffer. The Depth buffer only need  be one dimensional because there is no way for a sprite to be overlapped horizontally, it will only ever be overlapped from the left or right side.



After i had a simple raycaster i needed to create a game to go along with it. I came up with the idea of taking pictures and looked at how i would create that effect. When a picture is taken, the world will render out based of of a "secret" array. With hidden information like keys and doors that will only be visible in photographs.

Sadly sfml's functions for taking screenshots have been depreciated, so i had to go with a slower texture.update().

After i had the camera effect created i had an idea to have a ghost that only move when you take a photo. This turned the game into much more of a horror game as the player is trying to balance gaining infromation from photos of the room and keeping track of the ghost, and of course keeping track of the ghost in it of itself is a uphill battle as it moves closer each time you find out where it actually is.


The full  source code is available Here







Saturday, January 5, 2019

OceanPort Mystery





The oceanport mystery is a quick experiment i created when playing with my new fitbit versa. I used the convenient fitbit studio and some JavaScript to put it together in an afternoon and i liked it so much i just had to show it off.

Play it online: here