Sorcerus

by Oren Erlich

About

For my final project, I wanted to create a simple first person game where you play as a wizard and kill Goblins with magic spells. Unfortunately I wasn't able to get the goblins in the game, so now you're just a wizard vibing in a courtyard.

My technologies were: keyframed animation (not skinned mesh), distance attenuation and multiple lights, collision detection for players and spells, and a first person camera. This project was great and I learned a lot about my programming skills! I may be adding the goblins in the future!

example image example image example image example image

Keyframes

When implementing the keyframed animation for the player walk, backpedal, and shoot animations I ran into an issue. I did not have an easy way to store the vast amounts of information required for each keyframe in the animation. To solve this issue I created my own format! Using an Animation class and Keyframe class, I created a system that allowed me to pass an "animation directory" to my Animation constructor and it would automatically parse everything into a format that was easily usable. The format for a keyframe looks like this:

example image

The first line is the time (in seconds) since the beginning of the animation that the keyframe takes place at, then each subsequent line is the ID of the joint, followed by the x, y, and z rotations for that joint. The animation directory also includes an "info.txt" that just contains the number of keyframes in the animation, which helps with parsing everything. Hopefully the work I did in making this system is helpful to someone else in the future!

References

learnopengl.com: An excellent resource for learning a ton of stuff about OpenGL, I specifically used the collision detection article heavily.

The-Flying-Animator Walk Cycle Tutorial: Without this tutorial I would have had a much harder time coming up with my walk cycles.

TurboSquid, CGTrader, Free3D: Excellent resources for free OBJs that come with textures

cppreference.com: The best resource for the C++ standard library that helped me throughout the project.

>Infinity StackOverflow questions, Wikipedia pages, and other various google searches

Time. This project took a lot of time, time is a good resource.

Fin.