SDL2 Tutorial: How to handle Mouse and Keyboard Events

preview_player
Показать описание
This video goes over the SDL event system including how to handle keyboard and mouse events.
Рекомендации по теме
Комментарии
Автор

You saying, "Key is pressed", "Key is released", brought images of making a Megaman X like game. I'm new to c++ and using SDL2 and find your video to be highly easy to follow, and very readable. I keep the SDL wiki open to delve a little deeper into the function parameters, but your videos are definitely connecting some dots for me.

Respect ✊

omari
Автор

wowow how did we get here? the beginning of the video has a bunch of stuff without explanation
I can understand what is happening with the SDL_PollEvent function and all of that but seems kinda rough compared with how everything else is explained

gasparliboreiro
Автор

i know im late but when i use this, the program only detects one key at a time. Is there a way for it to detect more?

eprxy
Автор

I do not know how to check keys ate the same time. SDL can only check one at a time through the "while(SDL_PollEvent...)"

vinniciusrosa
Автор

Thanks for the video! But i was wondering how do you deal with input delay when you hold down right key?

gameDev_Pat