I need you to make more videos about bouncing ball❤❤❤🎉
@codecc9Сағат бұрын
@@drachenmuskel99 okay, new video drop tonight
@drachenmuskel99Сағат бұрын
@@codecc9thanks bro❤❤❤
@drachenmuskel99Сағат бұрын
❤❤❤❤
@drachenmuskel99Сағат бұрын
❤❤❤❤
@azadak470014 сағат бұрын
how to do it on terminal on Mac?
@codecc93 сағат бұрын
@@azadak4700 I'm sorry i don't know, I'm not using Mac, try Google or chatgpt
@holyquran2403 күн бұрын
How to download this Video after project successful
@codecc93 күн бұрын
hi, this is for learning programming. if you want to record the video, just use OBS
@holyquran2403 күн бұрын
@@codecc9 bro without obs it's not possible to save video file ?
@codecc93 күн бұрын
@@holyquran240 you can code to make it exports to video, but the easiest way is just use obs
@10kmxps5 күн бұрын
currently punching air rn
@oberzoka8 күн бұрын
isn't there any easier way to add the music? Do we really need to add note by note?
@codecc98 күн бұрын
@@oberzoka You should add note by note, wav file sound better than mid file
@oberzoka9 күн бұрын
how can i add a music?
@codecc99 күн бұрын
@@oberzoka You need a list of "wav" files. Plz check others video in my channel
@oberzoka8 күн бұрын
@@codecc9 i used chatgpt to change the code a little and then i wrote something like note1=file1.wav note2=file2.wav Idk if u could understand
@codecc98 күн бұрын
@@oberzoka use sounds.py class from my video(add sound to bouncing ball part2)
@oberzoka8 күн бұрын
oh... actually i watched the wrong video
@RoleTopus111 күн бұрын
Hi, I get this error: Exception: midi Output not open.
@codecc911 күн бұрын
plz try google or chatgpt the error message. make sure you import Utils.py first then import others files
@codecc914 күн бұрын
install pybox2d: + download python 3.9 + download swig then add it to enviroment path + download visual studio 2022 comunity , then check "c++ desktop development" + then follow my part1 + if it show error: search gg or chatgpt the error
@sK_rTT15 күн бұрын
first of all you a fucking g for this you deserve so much more recognition second you think you could do that when the ball leaves a circle/shape that shape is removed with like a particle effect and a sound of your choice?
@codecc915 күн бұрын
@@sK_rTT thank you! If you know programming, that should be easy to code. If you don't, just paste the code to chatgpt and ask it to add those features . I will share some of animation with source code I made today, you can use it to learn
@sK_rTT14 күн бұрын
@@codecc9 yeah Imma be real I know nothing about coding and I am using visual studio but I can seem to manage to get box2d to work so I cant even run the code
@sK_rTT14 күн бұрын
@@codecc9 yeah imma be real I know nothing about programming and I'm using visual studio but I cant seem to get box2d working so I cant even run the code
@codecc914 күн бұрын
@@sK_rTT install pybox2d: + download python 3.9 + download swig then add it to enviroment path + download visual studio 2022 comunity , then check "c++ desktop development" + then follow my part1 + if it show error: search gg or chatgpt the error message
@sK_rTT14 күн бұрын
@@codecc9 like I said bro u are a G its working now love you
@TirasLaDeLaGula27 күн бұрын
Hi, I am getting the following error 'pygame.midi.MidiException: 'Device id invalid, out of range.''. Have you face this issue before ?
@codecc927 күн бұрын
@@TirasLaDeLaGula try show all device of your computer import mido print(mido.get_output_names()) Paste the error to chatgpt, it will show you all possible fixed
@gilbertnasayao4939Ай бұрын
Why is it that always cat pointed the arrow when every spin
@codecc9Ай бұрын
you use the code from github? Plz change the key 'cat' to other key you want the spin to stop. If you want it random, follow the code in the video
@gilbertnasayao493920 күн бұрын
@@codecc9 okay i will follow your code in your video, can you give me some code to have a confiti in a winner that pointed out the arrow and the pointed name will be remove after pointed the arrow. how to code like that.. ?
@maxi4891Ай бұрын
Is it possible to make the radius of the ball bigger each collision? 😀
@codecc9Ай бұрын
@@maxi4891 yes, you can just paste the code of ball.py to chatgpt and ask it to add a function to change radius
@drachenmuskel99Ай бұрын
did you change any command line in main .py?😢😢😢help
@codecc9Ай бұрын
1. copy sounds and sounds.py from pybox2d part2 to this project 2. in main.py , replace line 34 to "sounds.play()" if you don't know anything about code you can just copy and paste main.py,sounds.py to chatgpt and ask where to put sounds in main.py
@drachenmuskel99Ай бұрын
@@codecc9Thank you so much ❤❤❤❤❤
@drachenmuskel99Ай бұрын
did you change any command line in main .py?
@drachenmuskel99Ай бұрын
please guide how to change music for this program. ❤
@codecc9Ай бұрын
@@drachenmuskel99 just copy the sounds.py from my part 2 pybox2d video The idea is you just need a list of wav files, each collision it will play a wav file.
@drachenmuskel99Ай бұрын
@@codecc9did you change any command line in main .py
@drachenmuskel99Ай бұрын
did you change any command line in main .py?😢😢help
@Multi22-v8zАй бұрын
i paste the github code for pybox2 in cmd but it says that "git" isnt recognizable, pls help
@codecc9Ай бұрын
Plz install git
@RickCanalOficialАй бұрын
bro, i just found your channel and your content is amazing!
@codecc9Ай бұрын
Glad you enjoy it!
@drachenmuskel99Ай бұрын
please guide how to change music or 1 song into this program -> kzbin.info/www/bejne/an7baoSjnqqZoNE
@codecc9Ай бұрын
@@drachenmuskel99 plz follow part 2 video. You just only need Sounds.py file
@drachenmuskel99Ай бұрын
Is there any change in the command line in main.py?
@insadeytАй бұрын
tysm..Bro can u teach us how to make electron simulation like repelling each other etc ...as they get closer stronger they repell each other??
@codecc9Ай бұрын
@@insadeyt that a good idea. I will try to make a video about that
@insadeytАй бұрын
@@codecc9 that would be much appreciated thank u... There is a video on by a random guy but he used turtle library ☹️: kzbin.infoVdN_eOgsJqI?si=yhkMrgTM8tk8wm6r
@insadeytАй бұрын
bro please do commentary on your videos or use text to speech and also increase you font size its harder to see in mobile
@codecc9Ай бұрын
Thanks for the advice. I will improve it in future videos.
@EGG0FD00MMАй бұрын
How do i get the code on github?
@codecc9Ай бұрын
@@EGG0FD00MM github link on the description, you can download the code there
@EGG0FD00MMАй бұрын
@@codecc9 where do i download it tho, like what file is it that i download
@daman3628Ай бұрын
Thanks, ily
@forcoolguys1534Ай бұрын
ily too
@qmvthisАй бұрын
im trying to switch the music but then my balls and circles not synced anymore, could the give me the part of the code that i need to modify ( the part that correspond to the little circle in function of the music) thanks.
@codecc9Ай бұрын
@@qmvthis Try change Max time in Game.py
@codecc9Ай бұрын
@@qmvthis and tempo in midi.py too You can send the song, I help you check it tomorrow
@bigshmeaterАй бұрын
I want to get into coding and I want to try and make one of these, might seem dumb but could you do this on a phone or would you need a pc/laptop?
@codecc9Ай бұрын
@@bigshmeater need a pc/laptop Learn some basic of python first. Learn it from youtube, chatgpt then do some project yourself then learn pygame,....
@gunawanwibisono5084Ай бұрын
How i get code it
@codecc9Ай бұрын
How to write code ? You can learn it on youtube or chatgpt. 1. Learn some basic of python 2. Do some programming exercise 3. Learn basic of pygame .....
@waltrobertАй бұрын
Can you design a shape path at the beginning, like a heart shape or something?
@codecc9Ай бұрын
@@waltrobert + coding : no, I don't know how. My idea : draw a heart first then limit the ball position, velocity only on the heart. + video editing: yes, you can edit it step by step but it need a lot of time
@lucmrioАй бұрын
Hey man, can you make a code like this, but instead of playing that sound, it plays different parts of a song with each collision?
@codecc9Ай бұрын
@@lucmrioyes, plz check others video on my channel
@elvisnkeiАй бұрын
What python interpreter do I use?
@codecc9Ай бұрын
@@elvisnkei I use default setting. You can use any
@waltrobertАй бұрын
how to code the ball effect
@codecc9Ай бұрын
plz check other comments there a lot of tutorial on internet, you can just google or chatgpt! this is my effects and particles, replace ball.py and circle.py with the code below! import random import pygame from pygame import Vector2 from utils.util import utils class Particle: def __init__(self, pos, velocity, color, lifespan): self.pos = pos self.velocity = velocity self.color = color self.lifespan = lifespan def update(self): self.pos += self.velocity self.lifespan -= 1 def draw(self): if self.lifespan > 0: pygame.draw.circle(utils.screen, self.color, self.pos, 1) class Ball: def __init__(self, pos, radius=10, color=(255, 255, 255)): self.color = color self.radius = radius self.pos = pos self.particles = [] self.img = pygame.image.load("assets/butterfly.png") self.img = pygame.transform.scale(self.img, (30, 30)) self.colored_img = self.img.copy() # Make a copy to hold the color-modified image self.change_color(color) def change_color(self, color): """Apply a color overlay to the image.""" self.colored_img = self.img.copy() color_surface = pygame.Surface(self.img.get_size()).convert_alpha() color_surface.fill(color) self.colored_img.blit(color_surface, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) def update(self): # Generate new particles for _ in range(3): # Number of particles per update velocity = Vector2(random.uniform(-1, 1), random.uniform(-1, 1)) color = self.color lifespan = random.randint(10, 30) particle = Particle(self.pos.copy(), velocity, color, lifespan) self.particles.append(particle) # Update particles for particle in self.particles: particle.update() # Remove dead particles self.particles = [p for p in self.particles if p.lifespan > 0] def draw(self): # Draw particles for particle in self.particles: particle.draw() # Draw the ball with the colored image utils.screen.blit( self.colored_img, (self.pos.x - self.colored_img.get_width() / 2, self.pos.y - self.colored_img.get_height() / 2) ) /////////////////////////////////////// import pygame.draw from utils.util import utils class FadeCircle: def __init__(self, pos, initial_radius, max_radius, initial_alpha, fade_speed): self.pos = pos self.radius = initial_radius self.max_radius = max_radius self.alpha = initial_alpha self.fade_speed = fade_speed self.surface = pygame.Surface((max_radius*2, max_radius*2), pygame.SRCALPHA) def update(self): if self.alpha > 0: self.radius += self.fade_speed self.alpha -= self.fade_speed self.alpha = max(self.alpha, 0) # Ensure alpha doesn't go below 0 if self.radius >= self.max_radius: self.alpha = 0 def draw(self): if self.alpha > 0: self.surface.fill((0, 0, 0, 0)) # Clear the surface pygame.draw.circle(self.surface, (233, 233, 233, int(self.alpha)), (self.max_radius, self.max_radius), int(self.radius), 2) utils.screen.blit(self.surface, (self.pos.x - self.max_radius, self.pos.y - self.max_radius)) class Circle: def __init__(self, pos, radius): self.pos = pos self.radius = radius self.justCollide = 1 self.fade_circle = None def start_fade_out(self): self.fade_circle = FadeCircle(self.pos, self.radius, self.radius * 5, 200, 2) def update(self): if self.fade_circle: self.fade_circle.update() def draw(self): pygame.draw.circle(utils.screen, (233, 233, 233), self.pos, self.radius, 2) if self.fade_circle: self.fade_circle.draw()
@waltrobertАй бұрын
@@codecc9 thank you
@waltrobertАй бұрын
@@codecc9 can you share the assets/butterfly.png files or update your code in github
@waltrobertАй бұрын
@@codecc9 can you share assets files or update your code in github?
@waltrobertАй бұрын
@@codecc9 can you share this file of assets/butterfly.png ?
@waltrobertАй бұрын
which version of python usage?
@codecc9Ай бұрын
you can use any python3 version! mine is python 3.9
@Jerry-e7pАй бұрын
Thank you so much!!
@FunexxxАй бұрын
what python software do you use?
@codecc9Ай бұрын
Ide : pycharm Python : python 3.9 Libraries: pygame
@semporteira1952Ай бұрын
waiting for Bouncing Ball Part 3, how to rotate the circle? the way I do it causes extreme lag when there are 3 or more circles
@codecc9Ай бұрын
@@semporteira1952 I do it soon, plz wait! You can just change body.angle of the ring Reduce size from 360 to lesser number
@redagewely425Ай бұрын
Thank you!
@xx-xj4yzАй бұрын
Hi, can you make a tutorial on how to insert the effects and particles?
@codecc9Ай бұрын
there a lot of tutorial on internet, you can just google or chatgpt! this is my effects and particles, replace ball.py and circle.py with the code below! import random import pygame from pygame import Vector2 from utils.util import utils class Particle: def __init__(self, pos, velocity, color, lifespan): self.pos = pos self.velocity = velocity self.color = color self.lifespan = lifespan def update(self): self.pos += self.velocity self.lifespan -= 1 def draw(self): if self.lifespan > 0: pygame.draw.circle(utils.screen, self.color, self.pos, 1) class Ball: def __init__(self, pos, radius=10, color=(255, 255, 255)): self.color = color self.radius = radius self.pos = pos self.particles = [] self.img = pygame.image.load("assets/butterfly.png") self.img = pygame.transform.scale(self.img, (30, 30)) self.colored_img = self.img.copy() # Make a copy to hold the color-modified image self.change_color(color) def change_color(self, color): """Apply a color overlay to the image.""" self.colored_img = self.img.copy() color_surface = pygame.Surface(self.img.get_size()).convert_alpha() color_surface.fill(color) self.colored_img.blit(color_surface, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) def update(self): # Generate new particles for _ in range(3): # Number of particles per update velocity = Vector2(random.uniform(-1, 1), random.uniform(-1, 1)) color = self.color lifespan = random.randint(10, 30) particle = Particle(self.pos.copy(), velocity, color, lifespan) self.particles.append(particle) # Update particles for particle in self.particles: particle.update() # Remove dead particles self.particles = [p for p in self.particles if p.lifespan > 0] def draw(self): # Draw particles for particle in self.particles: particle.draw() # Draw the ball with the colored image utils.screen.blit( self.colored_img, (self.pos.x - self.colored_img.get_width() / 2, self.pos.y - self.colored_img.get_height() / 2) ) /////////////////////////////////////// import pygame.draw from utils.util import utils class FadeCircle: def __init__(self, pos, initial_radius, max_radius, initial_alpha, fade_speed): self.pos = pos self.radius = initial_radius self.max_radius = max_radius self.alpha = initial_alpha self.fade_speed = fade_speed self.surface = pygame.Surface((max_radius*2, max_radius*2), pygame.SRCALPHA) def update(self): if self.alpha > 0: self.radius += self.fade_speed self.alpha -= self.fade_speed self.alpha = max(self.alpha, 0) # Ensure alpha doesn't go below 0 if self.radius >= self.max_radius: self.alpha = 0 def draw(self): if self.alpha > 0: self.surface.fill((0, 0, 0, 0)) # Clear the surface pygame.draw.circle(self.surface, (233, 233, 233, int(self.alpha)), (self.max_radius, self.max_radius), int(self.radius), 2) utils.screen.blit(self.surface, (self.pos.x - self.max_radius, self.pos.y - self.max_radius)) class Circle: def __init__(self, pos, radius): self.pos = pos self.radius = radius self.justCollide = 1 self.fade_circle = None def start_fade_out(self): self.fade_circle = FadeCircle(self.pos, self.radius, self.radius * 5, 200, 2) def update(self): if self.fade_circle: self.fade_circle.update() def draw(self): pygame.draw.circle(utils.screen, (233, 233, 233), self.pos, self.radius, 2) if self.fade_circle: self.fade_circle.draw()
@xx-xj4yzАй бұрын
@@codecc9 perfect, thank you very much.
@燊芾Ай бұрын
wow!
@tayfurbingolbjkАй бұрын
How can I learn pygame , do you have some recommendations?
@codecc9Ай бұрын
@@tayfurbingolbjk Watch youtube tutorial and chatgpt Then do some game project yourself
@tayfurbingolbjkАй бұрын
@@codecc9 Okay, i will try thank you
@pawanbeingclassy1992Ай бұрын
can i get the link
@codecc9Ай бұрын
I'm sorry, I lost this project files
@qmvthis2 ай бұрын
how do you run box2d with python3.12 ?
@codecc92 ай бұрын
@@qmvthis I forgot to delete the import box2d You don't need box2d for this project. Plz use python 3.9, there some error if you use python 3.12 with pybox2d
@qmvthis2 ай бұрын
@@codecc9 🙏🙏
@African_Chronicles2 ай бұрын
I encountered this error while trying to install pybox2d: Unable to find file 'Box2D\Box2D.i'. error: command 'C:\\swigwin-4.2.1\\swig.exe' failed with exit code 1. Please help! Thank you
@codecc92 ай бұрын
@@African_Chronicles there no box2d in this project It probably my mistake. You can just remove all import Box2d line
@African_Chronicles2 ай бұрын
@@codecc9 my question is actually for your bouncing ball video part 1
@codecc92 ай бұрын
@@African_Chronicles Plz install swig.exe, Google swig then install it Make sure you install visual studio too (check the c++ desktop development)
@African_ChroniclesАй бұрын
@@codecc9 it's installed. It's even the latest version
@African_ChroniclesАй бұрын
@@codecc9 i have swig, the latest version. But it persist
@joshuacabatan30092 ай бұрын
great tutorial. got yourself a subscriber. if i could make a request, can you make a video tutorial on how to make holes in the circle that the ball can pass through? i've been cheating by making another object that is the same color as the background on top of the white circle but the ball doesnt seem to pass through
@codecc92 ай бұрын
@@joshuacabatan3009 yes, plz wait for part 3
@codecc92 ай бұрын
@@joshuacabatan3009 you can check part 1 while waiting, I did show how to make hole on the ring
@lolade79382 ай бұрын
For installation of pygame, How did you setup the environment on command prompt (python) before copying and pasting the codes from github? Thank you Tried zooming in but its blurry
@codecc92 ай бұрын
if you just want to run my code from github 1. install python (3.9) 2. install visual studio (check c++ destop development) 3. install swig 4. install pybox2d 5. pip install pygame 6. run: python main.py
@lolade79382 ай бұрын
@@codecc9 installing the pygame is what I don't know how to do. I know the instructions is on the GitHub page but I don't know where to paste the codes to install pygame Thanks for the prompt reply btw
@codecc92 ай бұрын
@@lolade7938 pip install pygame
@codecc92 ай бұрын
if you use cmd: 1. open cmd 2. type: pip install pygame
@lolade79382 ай бұрын
@@codecc9 the error I got was " 'pip' is not recognized as an internal or external operable program or batch file"
@FortbloxNET2 ай бұрын
is the last tutorial finished with part two? you showed tons of example in first part and then its just circle within circle. i thought ýou would also show the rectangles and different things. or is this for us to find out by learning by doing? ^^
@codecc92 ай бұрын
I will separate it to different Playlist and do more pybox2d in the future Which idea you think I should do in part 3 ?
@FortbloxNET2 ай бұрын
@@codecc9 yeah that thing i mentioned in another comment where you have a real song(mp3) and whenever it touches it plays like 0.5-1s of it. there are many such videos for exampla with that "PEDRO" song. and then for example not full circle but with a whole and many around them and when the ball falls out the inner circle gets destroyed and then bounces in the next circle until it falls out of the gap etc... same with different shapes, rectangle octagon whatever. i don't know how advanced pygame is. in unity you can easily put a shader. maybe you can make different colors or mage it glow. some effects.
@codecc92 ай бұрын
@@FortbloxNET okay, I make a video for ball escape multiple rings. No splitting mp3. There no shader, glowing effect in pygame, you can add glow bloom effect after record video. Or you can make these on unity, it even faster than python
@Akash-q9t2 ай бұрын
can you give the link for this to download the project
@codecc92 ай бұрын
I'm sorry! I haven't upload the part 2 code, you can check source code link in part 1 video then code part2
@Darkplayz_182 ай бұрын
can you make a tutorial of the programs that needs to pycharm work?
@codecc92 ай бұрын
I don't understand what you mean. pycharm is an ide to edit python code. plz follow part 1 for seting up project!.
@Darkplayz_182 ай бұрын
@@codecc9 I follow the part one but the codes doesn't work.
@codecc92 ай бұрын
@@Darkplayz_18 plz send error message
@FortbloxNET2 ай бұрын
uff these part where you press every key on the piano and download a wave file. isnt that too much? is this really the way? some of those ball videos just play mp3s for 0.1s whenever it has contact. and other thing. with pygame you can also create your own piano sound on the fly. chatGPT helped a bit out. you can make a dictionary of every NOTE and the corresponding frequency and then just say which NOTE should be played....that way you can just write a one liner what notes to play and dont download tons of waves.
@codecc92 ай бұрын
there a better way, but I don't know about it! I already try split mp3 to multiple segments + if a segment have multiple notes, it sound bad + can't hear the sound if there a high speed ball
@r-l-h7p2 ай бұрын
is it possible to put in pictures instead of text on each part of the wheel?
@codecc92 ай бұрын
yes, for more detail you can google : how to draw image on js canvas const img = document.getElementById("yourImage3"); ctx.drawImage(img, x, y);
@FortbloxNET2 ай бұрын
..................yeah so for a full tutorial you should give explanation how to install GIT, because i dont have the GIT command. then installing pybox2d doesnt work either because it searches for swig.exe which i also dont have. so at least say or write stht like "you need to install GIT and SWIG" first.......
@codecc92 ай бұрын
I'm sorry, I forgot that! plz follow step 1 and step 2 from that install instructions first!
@FortbloxNET2 ай бұрын
yeah, so installed GIT, cloned this pybox2d, downloaded SWIG, added it to PATH from windows. then tried install pybox2d and it failed. fatal error C1083 : file(include) cannot be opened: "io.h" no such file or directory.......so basically, that means, i need to install more things and find out myself what exactly is missing.....
@codecc92 ай бұрын
@@FortbloxNET follow step 1 to install mingw then MSYS. or install Microsoft Visual Studio -> check desktop c++ development
@lolade79382 ай бұрын
Thanks for the video. When I logged into GitHub can access the files but not the instructions beneath the file. Any way to fix this? I'm a newbie Thank you