nice and straight forward tutorials, great videos!
@konradpodgorski19675 жыл бұрын
That type of tutorials should be displayed at the top of search results :) Very useful tip, good job , keep it up !
@FiveMinuteGaming7 жыл бұрын
Thank you, that's exactly what I needed :)
@codePylet7 жыл бұрын
No problem. If you get stuck on anything let me know.
@trootrooper7 жыл бұрын
You have made pygame so easy to use. Thank you!
@codePylet7 жыл бұрын
I'm really glad you like the videos. I'm working on a new collision detection video but I'm struggling to find time to get it made at the minute. It will arrive though :)
@metgaming95453 жыл бұрын
You could technically compile this into a function (though you would need to give alot of infomation) heres the code i used: def checkCollision(targetX, targetY, targetWidth, targetHeight, sourceX, sourceY, sourceWidth, sourceHeight): targetX2 = targetX + targetWidth targetY2 = targetY + targetHeight sourceX2 = sourceX + sourceWidth sourceY2 = sourceY + sourceHeight if targetX > sourceX2 or targetX2 < sourceX or targetY > sourceY2 or targetY2 < sourceY: return False else: return True # when calling the function, call it like this: checkCollision(targetX, targetY, targetWidth, targetHeight, objectX, objectY, objectWidth, objectHeight) # make sure to call the command in the game loop or it wont work.
@szymanek2k2087 жыл бұрын
What can I say except, like and thanks for tutorial. I will use this tip to my project. ;)
@codePylet7 жыл бұрын
+Gimby Bronzu PL glad you found it useful :)
@billyalani20014 жыл бұрын
with the same logic, how could i be true only when it is above the object? spectacular video continues like this, thanks in advance :)
@szymanek2k2087 жыл бұрын
Can you in the next time will make a video about A* alghoritm etc. this good tips to make a game with AI. ;)
@codePylet7 жыл бұрын
Interesting I'll have a look into that :)
@codePylet7 жыл бұрын
Gimby!!!? Can you have a look at this A* implementation and let me know what you think please? drive.google.com/open?id=0BwDJQBs1OukNSXo2S2pFbjlkVzA
@szymanek2k2087 жыл бұрын
No bad but this code is very complicated for beginner users. I will make my version of A* alghoritm and will show you after some days ok?
@szymanek2k2087 жыл бұрын
No bad but it's very complicated for beginner users I think. My tip for you is make a Representative class exemplae - Squer_grid - next make a basic very basic pathfainding algh. based on it. What do you think ?
@szymanek2k2087 жыл бұрын
EXAMPLE: class Squer_grid(object): """ Klasa obslogujaca siatke/kwadraty. """ def __init__(self, width, height): self.width = width self.height = height self.walls = [] self.connetions = [vec(1, 0), vec(-1, 0), vec(0, 1), vec(0, -1), vec(1, 1), vec(-1, 1), vec(1, -1), vec(-1, -1)] def in_bounds(self, node): """ Falsz gdy mamy x lub y na minusie. """ return 0
@-AWEJOKER5 жыл бұрын
this is so over-engineered and complex, just use pygame.Rect.colliderect(Rect)
@heavymetal1ization4 жыл бұрын
I have no idea why on earth he has so many functions in literally every single class he makes, it's so confusing and unnecessary
@atlantic_love4 жыл бұрын
@@heavymetal1ization Designing classes is not easy. Do you have a solution, for doing this with classes?
@atlantic_love4 жыл бұрын
The problem is that you would have nested lists or arrays to keep track of attributes for all those rectangles. At the time of writing this comment, I don't know if he ended up putting all of these objects in a list or not.
@Divijcool2 жыл бұрын
your word code.Pylet yay 10points
@mason63005 жыл бұрын
Its lagging pretty bad on my macbook, even with just 10 stars