Pygame (Python Game Development) Tutorial - 23 - Fixing Some Stuff

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Man, 2nd day programming and on tutorial 23. Some of this is a breeze while the other parts feel so confusing. Its rather overwhelming but I'm just going to keep at it. Thanks for making these tutorials! You can see lots of people start to give up as the view count on these tutorials has gone from 30, 000 to 10, 000!

iPCGamerCF
Автор

This is awesome I can't thank you guys enough for helping me learn how to code. Some of the video tutorials on TheNewBoston have been the only reason I have passed a few of my early comp sci classes. 

knotfreak
Автор

May I say you are greatest guy on youtube! :D :D :D

mikiristic
Автор

You should change:

randAppleX = round(random.randrange(0, display_width - block_size))#/10.0)*10.0
randAppleY = round(random.randrange(0, display_height - block_size))#/10.0)*10.0

to:

randAppleX = round(random.randrange(0, display_width - AppleThickness))#/10.0)*10.0
randAppleY = round(random.randrange(0, display_height - AppleThickness))#/10.0)*10.0

so that the apple doesn't spawn with parts of it off the screen

just
Автор

I wrote a function that people could use if they were to have multiple things taht they wanted to check for a collision:

def boundCheck(characterX, characterY, thingX, thingY, thingW, thingH):
if characterX >= thingX and characterX <= thingX+thingW:
if characterY >= thingY and characterY <= thingY+thingH:
return True

jacksonvanderkooy
Автор

Thank you so much for your tutorial! :)

luxsanchez
Автор

Love ur tuts! this really helps me! :)

tongqiu
Автор

I'm using Python 3.5 and its respective pygame (from the unofficial libraries site) but when coding this I keep getting a bug where I'm able to move into myself (with the backwards movement checking) if I time a side turn right before facing backwards just right.

I was thinking maybe using the pygame.tick() code may be the reason why this is allowed (I was expecting you to code the frames per second handling from scratch, and then make a game refresh cycle individually based on time.)

I've only started working on this today, and am this far into the tutorial.

muizzsiddique
Автор

Your tutorials are awesome, but if you don't know how the while loop works...

martingaens
welcome to shbcf.ru