Pygame Tutorial - Part 4 - Jumping Motion

preview_player
Показать описание
Learn to create your own 2D-Video Games using the module Pygame with Python. In this video we will learn how to code a jumping motion into our game.

◾◾◾◾◾
🎬 Overview 🎬

Previous Episode:
3️⃣ Pygame Tutorial - Part 3 - Add Boundaries to Movement

Next Episode:
5️⃣ Pygame Tutorial - Part 5 - Set and Loop Background

◾◾◾◾◾
💳 Attribution:

📷 Sprites and Images:
- Background: Dylan Squires

👪Related Content

◾◾◾◾◾ 🌎 Let's Connect! ◾◾◾◾◾

🌟 Please leave a LIKE and SUBSCRIBE for more! 🌟

Hashtag: #Pygame
Рекомендации по теме
Комментарии
Автор

i like the way of defining jump as a bool and then use it further

vaibhavpandey
Автор

I can now say that this is the best tutorial in jumping in pygame

vybz
Автор

Thank you guy, sorry for my english and hello from russia

concop
Автор

thanks I am not even using pygame/python but was helpful

mountainshark
Автор

Dude you really deserve more sub! Hahaha

wkppp
Автор

I am having a problem. The jump mechanic only activates when i keep on pressing the space button. Is there a way where it executes when i press space button only one time?

bibekgautam
Автор

great video, I'm learning a lot from you!

visaogeralservicenow
Автор

It works apart from after it lands my cube disappears. I have a wall at the bottom of the screen which my cube collides with and i have gravity so the cube falls. Would this be a reason as to why it disappears when the jump finishes?

thebluegamer
Автор

I have a question. I can bring my figure to jump but it looks very weird is there a reason for that?

thanhtinhchau
Автор

Is it possible to declare a jump function outside of the main function? I tried to do it but seems like the vel_y and jump variables were not changing because of the constant refreshing.

Melvinn
Автор

very good, ..but how do you make it realistic, real motion is not like that.

dimitriosdesmos
Автор

Whenever i run the code the circle doesnt show

dominic
Автор

In line 15 (for event in pygame.event.get():...), you just put three dots after the colon and in the next line there is no indentation !!!

What are those dots ?

Without indentation the code is supposed to be wrong ???

But you ran it ; HOW ?

premprasad
Автор

(im a boy(mom's account)) It cannot go down until you press space again and agaian or press the arrow keys :(

svetlanasizova
Автор

Use pygame's clock instead of a time delay

whipit
join shbcf.ru