145 reputation
6
bio website
location
age
visits member for 1 year, 11 months
seen 2 days ago

Oct
28
awarded  Popular Question
Dec
16
asked Picking a suitable resolution for a modern low-res game?
Sep
11
comment SDL - Getting a single keypress event instead of a keystate?
I was thinking, because you said that type == SDL_KEYDOWN will stay true until another event arrives, I could use SDL_PushEvent after my event handling code block runs to force type == SDL_KEYDOWN to become false. Is that a bad way to go about it? Also, when you suggest checking the value returned from SDL_PollEvent, would that mean using a bitwise & to check to see if SDL_PollEvent & localEvent are the same event? I'm sorry if this is going right over my head. I'm a self-taught and very inexperienced programmer. :<
Sep
10
comment SDL - Getting a single keypress event instead of a keystate?
I'm curious.. Would it be possible (or smart) to create an SDL_UserEvent that essentially adds an empty event to the queue using SDL_PushEvent? That way, I could simply push an empty event to the queue after each keypress is registered? -- Also, would SDL_WaitEvent pause the program? I'd like to have the ability to use animated screens also, but maybe I shouldn't be looking for a one-size-fits-all solution...
Sep
10
comment SDL - Getting a single keypress event instead of a keystate?
I see! That's gotta be the issue. Thanks so much for your insight! :D
Sep
10
accepted SDL - Getting a single keypress event instead of a keystate?
Sep
10
awarded  Student
Sep
10
comment SDL - Getting a single keypress event instead of a keystate?
That seems like a way to work around this issue. But, is this the normal behavior for SDL_Events? I'm hoping to get to the bottom of this problem.
Sep
10
awarded  Editor
Sep
10
revised SDL - Getting a single keypress event instead of a keystate?
added 699 characters in body
Sep
10
comment SDL - Getting a single keypress event instead of a keystate?
Unfortunately, that didn't seem to fix my issue. =( I tried setting the SDL_EnableKeyRepeat in both the initialization of the state, as well as just before the SDL_PollEvent. It still ran the event-specific code once per tick! :(
Sep
10
asked SDL - Getting a single keypress event instead of a keystate?
Aug
24
awarded  Supporter
Aug
23
comment How much would it cost to hire a musician
I'd like to add that the same kind of thing applies to commissioning visual artists as well.
Aug
23
answered How much would it cost to hire a musician
Aug
9
awarded  Teacher
Aug
9
answered How do i choose what technology to use for a 2D game like Pokemon?
Aug
7
accepted Structuring various game states and unique levels
Aug
7
awarded  Scholar
Aug
7
comment Structuring various game states and unique levels
Great answer. That really helps me, thank you! So if I'm understanding this correctly, you're saying that the 'PlayState' class should have some way to load a 'level' data type? So when you want to change levels, you simply change the 'Level currentLevel;' by loading in a different level..? (if that makes any sense..) :D