Description

Slay the Spire is a turn based card game by Mega Crit Games. For my final project, I have created a reimagining of this game as a first person real time game in which one must throw playing cards at enemey Sentries to survive. Cards can deal damage, give you block, or draw more cards into your hand. Avoid enemy lasers and defeat your foes before they defeat you!

Snow

Controls

Key Control
WASD Move
Shift Sprint
Mouse Look around
Q/E Change selected card
F/Lmouse Throw/play card
R/Rmouse Refresh hand and energy
G Godmode (gain 9999 energy, health, and block)
N Enable noclip
Forest
Mountains

Features

I used a frame buffer object in order to do post processing on my rendered scene. In particular, an FBO was used to apply a Gaussian blur filter to the laser beams sentries shoot, in order to increase their realism. Gaussian blur was approximated using Pascal's triangle as described here. In implementing this, I used provided base code, along with the learn OpenGL tutorial on FBOs.
I implemented some simple physics in order to have thrown cards fly in a realistic way. When cards collide with enemies, they trigger a slashing animation and then disappear. When they collide with the floor or roof, however, the cards stay stuck in place.
Physics was implemented by keeping track of the position and velocity of cards and updating these values each frame by applying a downwards force. In addition, cards curve when thrown in order to have a more realistic flight path, by applying a second force perpendicular to the thrown direction. Collision was implemented using implicit equations for planes (for the floor and roof) and cones (for enemies).
In order to render text to the screen, I used the FreeType library. This was used to display a hud for a player including health, block, energy, and delay till a new hand can be drawn. The font used is Kreon, the same font used in the game this project is based on.
Texture mapping was used on the brick floor, in addition to on card textures and slashing animations. Instead of modeling the exact geometry of these cards, fragments from the card texture were discarded in order to achieve the correct shape. Similarly, fragments were discarded in a similar was for the slashing animation. Card textures from Slay the Spire were used and sourced from here.
  • Hierarchical Modeling
  • Cubemap Skybox
  • Blinn-Phong Lighting

Video Demo

References & Resources