Skip to content

u/abuxTM

In this archive from Oct 2022 to May 2023

12
posts
11
comments
0
media
140
score
7 saved before deletion

Top posts

SDL2 simple movement (c++)

hi i just wonted to ask how can i make my movement look smooth (smoother than my brain) i can move my character but is snappy as f code: const Uint8* keyboard = SDL_GetKeyboardState(NULL); if (keyboard[SDL_SCANCODE_A]) drect.x -= getPos().x += speed; if (keyboard[SDL_SCANCODE_D]) drect.x += getPos()...

4 points14 comments
Open on Reddit

Top comments

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.