Witch Crossing

by Luke Reckard

My project is based off of the popular game series Animal Crossing but with a twist. In it there are three witches living quietly in the woods, working on witchcraft. One is able to start fires, the next is skilled at levitation, and the final is a scry that uses the lake as a surface. All are terrible house designers.

Game Modes

Outdoors

The first mode is outside where the user can freely roam the virtual world of the witches using WASD and moving the mouse. When F is pressed, the fire witch starts the campfire, which uses a particle system to immitate flames. Pressing G makes the gravity witch start levitating and doing circles in the air, and pressing that same button will bring her down. Using the R key allows the user to peer into the world of the scrying witch and see ghastly reflections in the lake.

Indoors

The second mode is inside the log cabin, which can be accessed and left by pressing H. The log cabin is completely empty, but luckily the witches have designed a magical catalog for accessing their furniture. By pressing the F key to scroll through options, users can use the P key to make each furniture piece appear (or disappear!). Then while a furniture piece is selected, WASD can be used to move and R is used for rotating each piece into place.

Creating the Game

Scrying

The scrying lake is made by binding a texture and then using the glCopyTexSubImage2D function to read in the render and copy it as a texture onto the lake. This is combined with a cube mapping system of the skybox to create eerie reflections in the lake.

Shaders

Six shaders are used to color my program. There is the start shader that discards pixels based on whether they match the starting screen text color or not. A blinn-phong model mixed with textures is used to color anything outside. A skybox shader is used to cube map the skybox, and a reflection shader is used as mentioned above for the lake. The particles from the fire are made by a particle shader. Finally, a regular texture shader without lighting is used to texture the furniture and room inside.

Collision Detecting

Inside the house, the furniture is not allowed to leave the room. I did basic collision testing by making sure that the position of each piece could not go past the bounds of the room even when the user presses one of the move keys.

Models

All models outside except for the train were made by me in blender. The train, room, and furniture on the inside were all found by googling Animal Crossing OBJ files.

References

https://learnopengl.com/Advanced-OpenGL/Cubemaps

https://learnopengl.com/Lighting/Multiple-lights

http://ivanleben.blogspot.com.au/2008/03/water-reflections-with-opengl.html