►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/...
Смотрите видео [Ep. 27] Animating Sprites in Simple DirectMedia Layer with a simple sprite class | Intro to SDL2 онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Mike Shah 29 Ноябрь 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 3,917 раз и оно понравилось 103 посетителям.