Conteúdo do Curso
Building Arcade Game
Building Arcade Game
Introduction to PyGame
How to work with Projects
Welcome to the center of our gaming world, made with PyGame, the perfect set of tools for creating video games using Python. PyGame makes it possible to draw pictures, add sounds, and create places that change with every action.
Step into a world where anything can happen, thanks to Python's 'random' feature. This magic power isn't from PyGame, but it adds surprises, making each game different by changing where heroes find treasures and face challenges.
In all this magic, there's a special signal – QUIT. It's more than just a simple command; it's like a safety net from pygame.constants, helping us leave our game adventures safely when it's time to return to the real world.
Our journey uses the arrow keys – K_DOWN, K_UP, K_LEFT, K_RIGHT. Think of them as a map, guiding our heroes away from trouble, moving with just a push
Note
I encourage you to write this project in your own environment; you can do this in a text document with a .py extension or write in an IDE, allowing you to easily launch your own game. Here's an article on setting up VSCode, and if you already have PyCharm or any other IDE installed. Feel free to use it, as they have similar interfaces.
You can just copy&paste all the code that we will write here.
Download prepared pictures with the main characters and background, or generate your own.
Tarefa
- Install
pygame
; - Import
pygame
library; - Import
random
library; - Import
QUIT
,K_DOWN
,K_UP
,K_LEFT
,K_RIGHT
frompygame.constants
.
Obrigado pelo seu feedback!
How to work with Projects
Welcome to the center of our gaming world, made with PyGame, the perfect set of tools for creating video games using Python. PyGame makes it possible to draw pictures, add sounds, and create places that change with every action.
Step into a world where anything can happen, thanks to Python's 'random' feature. This magic power isn't from PyGame, but it adds surprises, making each game different by changing where heroes find treasures and face challenges.
In all this magic, there's a special signal – QUIT. It's more than just a simple command; it's like a safety net from pygame.constants, helping us leave our game adventures safely when it's time to return to the real world.
Our journey uses the arrow keys – K_DOWN, K_UP, K_LEFT, K_RIGHT. Think of them as a map, guiding our heroes away from trouble, moving with just a push
Note
I encourage you to write this project in your own environment; you can do this in a text document with a .py extension or write in an IDE, allowing you to easily launch your own game. Here's an article on setting up VSCode, and if you already have PyCharm or any other IDE installed. Feel free to use it, as they have similar interfaces.
You can just copy&paste all the code that we will write here.
Download prepared pictures with the main characters and background, or generate your own.
Tarefa
- Install
pygame
; - Import
pygame
library; - Import
random
library; - Import
QUIT
,K_DOWN
,K_UP
,K_LEFT
,K_RIGHT
frompygame.constants
.