Pygame Tutorial 8 - Platforms and Collision

Subscribers:
50,600
Published on ● Video Link: https://www.youtube.com/watch?v=0tt_VP-aias



Duration: 0:00
68 views
4


pygame tutorial. In the previous few videos, we went over game physics for jumping with gravity in the y direction, and moving/sliding with friction in the x direction. For both tutorials, we set an invisible floor for the player to land on. In this tutorial, we remove that invisible floor and create platform with tiles instead. We also setup collision detection with the platform, and we will use this same function for collision detection with enemies, items, traps, etc.

Luckily, pygame already provides a collision function that we can use, but if you want to define your own, you can reference this formula defined in a function of my version of flappy bird, built in javascript: https://github.com/ImKennyYip/flappy-bird/blob/master/flappybird.js#L163

How to install Python for VS Code:    • How to set up Python on Visual Studio...  

How to install Pygame:    • How to Install Pygame  

Pygame Tutorial Playlist:    • Pygame Python Game Programming Tutorial  

Github for Pygame Tutorial Code: https://github.com/ImKennyYip/pygame

Python Object Oriented Programming Playlist:    • Python Object Oriented Programming  

Python Game Projects Tutorial Playlist:    • Python Game Programming Tutorial  

Pygame Website: https://www.pygame.org/