• Cursos
  • Compilador de Código
  • Discutir
  • Preços
  • Teams
Menu
+ 1

How to move rectangle in pygame, such that it moves horizontally when pressing right or left on keyboard and it moves vertically when pressing up or down?

Pygame

pythontoinhowandonorkeyboarditthatwhenrightupmoveleftpygame,suchhorizontallyrectanglemovespressingvertically
27th May 2017, 11:14 PM
Hesham Emara
4 Respostas
+ 2
Here is a tutorial form the official site of pygame: https://www.pygame.org/docs/tut/MoveIt.html
27th May 2017, 11:27 PM
Ulisses Cruz
Ulisses Cruz - avatar

Costuma ter perguntas como essa?

Aprenda de maneira mais eficiente, de graça:

  • Introdução ao Python

    7.1M de alunos

  • Introdução ao Java

    4.7M de alunos

  • Introdução ao C

    1.5M alunos

  • Introdução ao HTML

    7.5M alunos

Ver todos os cursos
Quente hoje
Best way to learn a new programming language fast?
3 Votes
Where make_unique is better than unique_ptr(raw pointer)
0 Votes
Will i land a job
1 Votes
why is my leaderboard diferent than my brothers
0 Votes
Why we use oops in python rather than any function ?
1 Votes
someone helps how can i make two for loops over a 2d array in c ( i didn't learned pointers yet )
0 Votes
Project ideas
1 Votes
What do you think would be good for some new courses?
0 Votes
Do you think AI will replace programmers?
0 Votes
Question to sololearn
1 Votes