How would i go from here to make a game using python?
please help. i am trying to figure out more about python and i want to make a game, but i dont know how to use the imported replit and i dont know how to use it to create the game. keep in mind that this is my first ever game so i dont know what i am doing XD. any help will be greatly appreciated. the game i am trying to create is an idle game that will continue to run even while the computer/device is asleep or off, and when you come back to it, it will tell you what all has happened while you have been gone. @HunterShyrock
Use turtle to make easy games. So once you've mastered it, just move on to pygame. Here are some links:
@dominicl645 if you're just starting, its good to know about the basics of python, most likely even necessary. I don't know about importing pygame and replit, but when you're stuck on an error or how to do something simple, searching up may be a fast and quick idea. For example, I was stuck on how to capitalize the first letter of a string and I found out about the function, capitalize(). Make a basic outline, try to code it. If you find any mistakes, try to fix them by yourself, but if you're stuck and need a hint, search it up or ask someone if you can't even find the solution online. Also, start with something small and build up, don't immediately work on this humongous hard project.
@dominicl645 Here's some code that will create a screen. From there you will just need to draw shapes and images onto the screen to make a game.
import pygame pygame.init() width = 800 # the with of the screen height = 800 # the height of the screen screen = pygame.display.set_mode((width, height)) running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # put code bellow here and above the next comment. Here's and example of how to draw a rectangle: pygame.draw.rect(screen, (0, 0, 0), [0, 100, 5, 30]) # this updates the screen pygame.display.update() pygame.quit()