Войти
  • 3197Просмотров
  • 4 года назадОпубликованоBig Python

Event-driven architecture: Snake tutorial in PyGame

In this beginner tutorial, you'll learn how to make a Snake game in Python using Object Oriented Programming and Event Queue for the game logic. Event-Driven Programming is often used for UI code, but it can be handy anywhere to break tight coupling between parts of code. At the end of the video, we'll demonstrate how the Event-Oriented code can be easily extended by adding multiplayer to the game. The tutorial is meant to give you a general idea how Events can be used (and be useful) in program. To see how these ideas can be practically implemented in a real program, see references below. To stay in the Python world, you can have a look at PyQt and its Signals & Slots mechanism. 🔴 SOURCE CODE 👇 ◼️ TIMESTAMPS 🕑 00:00 - Intro 00:42 - Making Snake in PyGame 03:53 - Adding objects, main loop 06:09 - Updating the World 12:33 - Updating Entities 15:52 - Adding multiplayer to the game 18:44 - Outro ◼️ REFERENCES 📚 ◼️ TOPICS 🎓 #ProgrammingTutorial #PyGame #BigPython #EventDriven #OOP #SoftwareArchitecture #Python ◼️ CREDITS 🙏 Icons made by Freepik from