Team 12 Report 3 – Including animations and implementing it into our engine.

Hello! This week I will go through what I have been working on for this week. This week my task was to implement an old Animation skeleton from the SDL library to our new engine that is SFML based. This task proved itself to be a very hard challenge, my initial prediction of the time it would take was around 20 hours but that was a way to positive and naive prediction.

What I have made: I have converted the old SDL Animation skeleton to our new SFML based engine. This is so that we will have an easy to use way to implement animations and it will give us a great deal of flexibility and control over the animations. With this new skeleton we would only have to write a minimal amount of code to be able to use animations and it would mostly be filed based.

Why I chose to pick the animation implementation: I chose to start working on the animation skeleton since I wanted to challenge myself and see how much I could to in c++ and SFML. The reasons are more personal than optimal since I am not the best programmer in my group. Another reason I wanted to work on the animation skeleton was because I have worked a lot of programming game mechanics but not as much on the engine based things inside of our game. This lead me to be a bit afraid of falling behind on the more technical aspects of programming and I wanted this as a learning challenge.

How I made and implemented the animation skeleton: In order for me to explain how I made the animation skeleton I will need to explain the very basic foundation of how it works.
An animation works by taking multiple pictures and playing them one after another in rapid succession. To do this you need to do a couple of things. The first thing you need to to is to load a sprite sheet into the program, a sprite sheet is a picture with multiple sprites in it. for example a walking animation can contain 5 pictures and a sprite sheet with all of them in it would be a walking animation sprite sheet. The second thing you need to do is assign which parts of the sheet should be what picture, you need to put them in order so that they are played one by one after another. In order to play them one after another you need a timer that keeps track of which  picture you are on

.Featured imagepicture of a sprite sheet.

All of these things that were needed were inside of the old SDL engine and my main task was to convert SDL based functions into SFML based functions that would work in our new engine.

A lot more could be said about this topic but I feel like that would go way to deep into the programming lingo. Overall this was a very difficult challenge for me and as for the time when im writing this the animation skeleton is about 80% done.
Thanks for reading!

Lämna en kommentar