My project is a 2d, Timing based platformer that exclusively uses linear interpolation and Catmull-Rom splines for animation. Additionally I implemented non-recursive ray tracing for generating certain keyframes. Note that in the gifs below any artifacting visible on the platforms is due to the poor quality of the screenrecording software I used, as you can see in the video above this does not occur within the program.
The thing I worked on first was rendering a jumping animation using user-generated keyframes, these keyframes positions are based on time as you can see from the red arc moving to the right. At this point in time the jump was only capable of occuring once and was locked to the x axis.
The developments following a single jump included: Repeating the jump, with better camera tracking of the spring. Creating a series of platforms with varying heights and sizes. Additionally I added a condition for when the spring falls between the platforms.
The falling animation uses a non-recursive ray cast, taking the last two know points of the spring to create a falling direction, and then seeing where the spring will collide against the next platform. Additionally using the direction vector and the normal of the side of the plane, a reflection ray is found. Using the points of 1. Initial spring location. 2. location of collision between spring and platform side and 3. Location of springs reflection from platform. I recognise that this animation does not look smooth, especially at the point of collision. However I could not find a solution to this problem.
This is the screen that shows when the spring lands upon the final platform. If I wished to expand this project with things like levels of varying difficulty it would be extremely simple to do so as the speed of the spring is a single easily modifiable value, and the platform generation is as simple as a single function call. An interesting direction to take the project would to make the platforms procedurally or randomly generated, while the speed continues to increase with each platform.
Libraries Used: OpenGL, GLMathematics, GLExtensionWrangler. The model for the spring was found on cults3d:
Spring Model