►SDL2 Playlist: • SDL2 Simple Directmedia Layer
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Git Repo: https://github.com/MikeShah/SDL2_Tuto...
►Lesson Description: In this lesson I teach you how to perform sprite animation in SDL 2. This relies on us being able to select a portion of a sprite sheet (i.e. an image that contains multiple frames of the same character or object) and then being able to cycle through a specific set of frames.
Note: Sprite sheets are likely more efficient than having to load several images and maintain them, we would rather have all of the data in a single texture.
At the end of the video, I also discuss the content asset pipeline to further add power to your API.
00:00 Animating sprites like a flip book
1:15 Understanding a simple sprite sheet
2:15 Example of how to modify a sprite sheet to a grid
4:40 Review of file structure and new files
5:25 The Animated Sprite interface (i.e. header) file
6:25 Understanding how to play a single frame
8:25 Using SDL_RenderCopy to copy a portion of texture to screen
9:40 Looping animation over multiple frames
10:40 Successful demo of animation and SDL_Delay
11:45 Discussion of Content Asset Pipeline
12:45 Thank you!
►YouTube Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: https://courses.mshah.io/communities/...
Watch video [Ep. 27] Animating Sprites in Simple DirectMedia Layer with a simple sprite class | Intro to SDL2 online, duration hours minute second in high quality that is uploaded to the channel Mike Shah 29 November 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 3,917 times and liked it 103 visitors.