Easy Way to Make Jumping in PyGame! (7 Mins)

  Рет қаралды 36,003

baraltech

baraltech

Күн бұрын

Пікірлер: 63
@baraltech
@baraltech 2 жыл бұрын
Code - github.com/baraltech/Jumping-PyGame Thanks for watching!
@seba1842
@seba1842 2 жыл бұрын
This was the only thing I needed for my portion of the code in my group to be complete thank you so much!
@baraltech
@baraltech 2 жыл бұрын
Always glad to help. Thanks for watching!
@KyleGameTesting
@KyleGameTesting 3 ай бұрын
I like the way you explain bro. Appreciate the detail!
@MowiWowi
@MowiWowi 7 ай бұрын
So satisfying seeing code work so perfectly
@sasamak420
@sasamak420 Жыл бұрын
i found so much stuff that had like 10x your code and i understood your tutorial way better than all of the other ones ty for that
@baraltech
@baraltech Жыл бұрын
Tysm my g
@gamalielgerona2391
@gamalielgerona2391 8 ай бұрын
Nice. Now I can enable jumping for my PyGame Slime Destroyer project. You got a subscriber.
@rajpulapakura001
@rajpulapakura001 Жыл бұрын
Clearly explained and simple! Exactly what I needed!
@Ishaan_Garud
@Ishaan_Garud 2 жыл бұрын
THANK YOU SOOOOOO MUCH!! I WAS MAKING MY GAME ENGINE, AND WAS Stuck BUT NOT ANYMORE BECAUSE OF YOU BE SURE TO CHECK MY ENGINE
@baraltech
@baraltech 2 жыл бұрын
No problem dude haha
@flowersArePretty1
@flowersArePretty1 2 жыл бұрын
THE BEST tutorial, thanks man, very handy indeed
@baraltech
@baraltech 2 жыл бұрын
Thank you so much!
@Kal-elB
@Kal-elB Жыл бұрын
Thank you! I never thought about how you'd make the character move up without teleporting it
@baraltech
@baraltech Жыл бұрын
No problem!
@dualscreenchef8535
@dualscreenchef8535 2 жыл бұрын
Thanks to this video, I can break copyright correctly
@pursuingcode1773
@pursuingcode1773 2 жыл бұрын
solid tutorial my dude
@baraltech
@baraltech 2 жыл бұрын
Glad you liked it!
@심지은-j4e
@심지은-j4e 2 жыл бұрын
really helpful thank you
@baraltech
@baraltech 2 жыл бұрын
No problem!
@eternulized
@eternulized 2 жыл бұрын
Thank you for this video sir
@papajowapapaja2759
@papajowapapaja2759 Жыл бұрын
Cool, thx!!!
@baraltech
@baraltech Жыл бұрын
No problem!
@Ray-sb8qi
@Ray-sb8qi 2 жыл бұрын
I have an issue where my character will land a little bit higher than where he jumps from every time I jump. My variable values are the same as yours.
@alvo6375
@alvo6375 Жыл бұрын
me too
@realjonav
@realjonav Жыл бұрын
hey is there a way to make it so the "S" key would make you fast fall?
@thatanimeguy8461
@thatanimeguy8461 8 ай бұрын
if key_pressed[pygame.k_s] gravity = bigger value than normal gravity
@seal6978
@seal6978 2 жыл бұрын
Thank you so so so much.Your amasing!!!!
@baraltech
@baraltech 2 жыл бұрын
No problem! Thanks for the comment!
@romanward78
@romanward78 Жыл бұрын
Thanks man it works great. What does the boolean variable ‘jumping’ do in the code?
@ahmadsyahmibinjamaludin1036
@ahmadsyahmibinjamaludin1036 2 жыл бұрын
Great video! My suggestion is you should also show how to make it in sprite class. I saw many people usually used sprite class since it is more organizable. Love the content😁
@baraltech
@baraltech 2 жыл бұрын
Thanks for the comment! I'll keep that in mind!
@noodle69
@noodle69 2 жыл бұрын
very helpful thank you
@baraltech
@baraltech Жыл бұрын
No worries!
@tasmiatasnim-pw7gm
@tasmiatasnim-pw7gm 6 ай бұрын
I don't understand one thing, y_pos = y_pos - jumpvel(10) wouldn't it go way up the screen then vel would become 9,8... to 0 won't this be beyond our screen. i get it how it goes up and then down but i didn't understand this part. Upward movement: 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 55 units Downward movement: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55 units why it doesn't look like it jumped 55 units
@UXER260
@UXER260 2 жыл бұрын
Nice video! You could fix the 20 division bug if you use ‘floor division’ (‘//‘ instead of ‘/‘ and then multiply it by twenty
@baraltech
@baraltech 2 жыл бұрын
Thank you!
@lovelivevike5507
@lovelivevike5507 Жыл бұрын
got a subscriber at 2:30 sec in =)
@baraltech
@baraltech Жыл бұрын
Thank you :)
@KeyGilz
@KeyGilz 11 ай бұрын
cool tutorial, thank you. for some reason, mario_rect is at x=376 and y =568, so he's hovering over the ground... any ideas? i used the same values in the tutorial 400, 600
@Vitvab
@Vitvab Жыл бұрын
very helpful tutorial, but how do i make it just fall though the ground and i cna make it jum again even if it doesn't stand on anything
@UsernameaBad
@UsernameaBad 6 ай бұрын
thanks
@Ganav_ha_shtihim
@Ganav_ha_shtihim 11 ай бұрын
the sprite can jump how much it want like flying not just one time it can go up infinatly help
@BardockSuperZ
@BardockSuperZ 9 ай бұрын
Nice tutorial , i copied the logic of your tuto for apply in the ursina engine
@baraltech
@baraltech 9 ай бұрын
No problem! :)
@matrixneo2412
@matrixneo2412 Жыл бұрын
Hi i know my comment is late and idk if you will see this but i wonder if you could make a video so your character can be able to left or right anyways thanks for this tutorial
@pranavnair3282
@pranavnair3282 2 жыл бұрын
Help! What is Y_POSITION equal too?
@tskvito5494
@tskvito5494 2 жыл бұрын
for some reason it jumps and never comes down, i checked 100 times and i cant find the difference between my adn your code
@baraltech
@baraltech 2 жыл бұрын
Try copying it
@abulhasan923
@abulhasan923 2 жыл бұрын
Really helpful but I want horizontally long jumps and this tutorial made the character jump very short horizontally... Please can anyone help?
@darkultimate6723
@darkultimate6723 3 ай бұрын
Video does not work for me I watched the tutorial for hours but it only works when I hold space or any other key down.
@J6342-n8d
@J6342-n8d Жыл бұрын
what if the sprite is moving?
@cws03
@cws03 Жыл бұрын
why are you using all caps?
@sploosh2857
@sploosh2857 2 жыл бұрын
Gravity
@anya637
@anya637 2 жыл бұрын
😌 ᴘʀᴏᴍᴏsᴍ
@jasonsworld333
@jasonsworld333 2 жыл бұрын
This is no good because you dont show how to find the charcter location. thats the most important part so this is useless to me
@baraltech
@baraltech 2 жыл бұрын
Thanks for the feedback. You can find the character location by referencing its rect’s x and y properties. Ex. print(mario_rect.x). Sorry you feel that way about the video and hopefully this helps!
@jasonsworld333
@jasonsworld333 2 жыл бұрын
@@baraltech This is a common problem I'm seeing amongst pygame tutorials. If you can find a way to do an easily scalable tutorial for all little elements like movement, assets, camera, etc... and explain them in depth everyone is making pygame tutorials but very little explanation of how to copy that to your code in a generalized way. These tutorials are saying what to do with a tool vs actually describing the tool. One of them puts viewers in a position to mimick you, the other puts the viewer in a position to mimick the concept.
@dole1393
@dole1393 Жыл бұрын
This is a scam.
@dole1393
@dole1393 Жыл бұрын
This is a scam.
@dole1393
@dole1393 Жыл бұрын
This is a scam.
@baraltech
@baraltech Жыл бұрын
How so
@goodlookinouthomie1757
@goodlookinouthomie1757 10 ай бұрын
@@baraltech It's a bot
Get Started in Pygame in 10 minutes!
10:19
Coding With Russ
Рет қаралды 410 М.
2 YEARS of PYTHON Game Development in 5 Minutes!
4:54
Coding With Russ
Рет қаралды 1 МЛН
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
БАБУШКА ШАРИТ #shorts
0:16
Паша Осадчий
Рет қаралды 4,1 МЛН
A.I. Learns to play Flappy Bird
7:46
Code Bullet
Рет қаралды 14 МЛН
Get Text Input in Python/PyGame in 9 mins!
9:14
baraltech
Рет қаралды 17 М.
How to Make Full Screen and Resizable Python Games with Pygame!
7:16
Scrolling Backgrounds in Pygame
7:53
Paget Teaches...
Рет қаралды 87 М.
How to ACTUALLY get into Gamedev
14:01
DaFluffyPotato
Рет қаралды 752 М.
EASY Way to Make BUTTONS for Python/PyGame Projects
10:47
baraltech
Рет қаралды 27 М.
How to Use Pygame Masks for Pixel Perfect Collision
10:28
Coding With Russ
Рет қаралды 42 М.
Can I 100% Superliminal and Get a Refund?
23:36
Gronf
Рет қаралды 399 М.
Python Socket Programming Tutorial
49:43
Tech With Tim
Рет қаралды 1 МЛН
Pygame Tutorial - Part 4  - Jumping Motion
8:47
Max Rohowsky (Max on Tech)
Рет қаралды 27 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН