XCube2D Animation Subsystem
XCube 2D is a simple game engine that has been developed using SDL 2.0 and C++. My subsystem extends the XCube engine to include an animation playback system which uses CSV files to display and play different animations on screen. On top of this it allows for different sprites to render at any frame rate that is equal to or lower than the frame rate of the game screen and stabilises these animations to create a smooth experience.
Each animation that is created by the user will need to have a specific CSV file which states all the necessary details of the animation in question. A CSV file is used within the subsystem to allow the user to manipulate their animations without changing the subsystem itself. It also allows for animation detail data to be easily changed when debugging an issue. The CSV file for each animation must contain the following data:
-
- Animation Name.
- Frame Rate.
- Playback Time.
- Image Location.
- Number of sprites within each row and column.
- JSON file location, if needed.
- Sprite width and height.
- Scale width and height.
- Which way to flip the animation, if needed.
- Whether the animation is to be looped.
- All keyframes.
-
Within this project, I further learned about SDL and C++ as the system encouraged me to learn about more specific features of SDL and C++, such as the difference between source and destination rects and the best ways to use both. It also helped to solidify my understanding of references and pointers. On top of this I gained a strong technical understanding of how animation is achieved within game engines as well as the many different ways these problems can be tackled even when creating simple animations and features.

3rd party assets used:
- Awesomeduck (2019) Available at: https://opengameart.org/content/racing-car-0 (Used for: Sprites)
- Kenney (2015) Available at: https://opengameart.org/content/racing-pack (Used for: Sprites)
- Praew_p_1985814285 (No Date) Available at: https://www.vecteezy.com/vector-art/1343818-green-lawn-grass-texture (Used for: Sprites)
- Spyros Zevelakis (2020) Available at: https://www.fontsquirrel.com/fonts/alatsi (Used for: Font)
- Joseph Sardin (No Date) Available at: https://bigsoundbank.com/detail-1286-car-on-a-road.html (Used for: Sound Effects)
- Mixkit (No Date) Available at: https://mixkit.co/free-sound-effects/car/ (Used for: Sound Effects)
- Shane Ivers (2019) Available at: https://www.silvermansound.com/free-music/very-superbeep (Used for: Music)