Kivy Tutorial #6 - Animation in Kivy Python | Pong Game

preview_player
Показать описание
In this video, we finally start to move our ball.
Steps to first animation

- Create the ball object Property - Add the id in in PongGame .kv file
ObjectProperty - Just like NumericProperty we are tell the program that is an object variable inside a class
Why we need need linking up? Explain the flow

Have a look at the PongGame class - Look inside kv file & create the ball -Look at object Property
Go again inside kv file to find this 'ball' Object property - After finding it, it will see what ID does refer to? It will further inside and find the id and thus hooking up the ball objectproperty to the pongball inside pong game.

Now if we change anything in the ball it will automatically change our drawing of the PongBall inside the PongGame

Moving the Ball
2) serveball()
3) Change the return PongGame() to game

Next video - Bouncing and Boundaries

#python #kivy #pythongui
Рекомендации по теме
Комментарии
Автор

My ball's pos is increasing due to velocity (seen with print) but my widget doesn't move on the screen...does someone else have the same problem ?

oulaoula
Автор

Where did you learn the kivy and kivymd bro please tell

ranjithl
Автор

Why you can call the method move() in the class PongGame if actually is a method of method PongBall? Thanks. (im a beginner)

ErdosainNueve
Автор

Hi, i know im late to this playlist but ive followed every step mentioned, the ball just keeps redrawing.. like there are infinite balls spawnling from the center and moving

AlienProGamer
Автор

Just found that in video, # 5 you said you would explain a bit more about physics behind motion of ball, but in vid #6 there wasn't and also there were some extra lines of code appeared. Was there a 5.5 video or something?

tanercoder
Автор

I am getting the below error and donot know why exactly it is 'NoneType' object no attribute 'velocity' "

sreegayathrisiddamsetti
Автор

self.ball.move()
AttributeError: 'float' object has no attribute 'ball'
I Am Getting This Error Could You Please Help Me With It??

dillig
Автор

Hello, you have several comments indicating a problem with 'NoneType' object no attribute 'velocity' " I am getting this error when using your code on github

NeilG
Автор

*Important Doubt*
What is *Stackless Python* ?
_Answer as a reply..._

mvsprabash
Автор

I am getting an error that dt value is not used can anyone help me with this....?

rakshithan
Автор

I just dont understand how you are constantly using methods from other classes without mentioning them... like "self.ball.move()". Isnt "move()" a method from the class PongBall? How can you use it without mentioning the class.

Is this related to inheritance or what?? Cuz I thought it would only inherit methods from the parent class(in this case Widget)

eternalstudent
Автор

Bro upload about how to create hacking tool in python pleaseee

mohamedabdullah