Ask coding questions

← Back to all posts
How would i go from here to make a game using python?
Dominicl645 (429)

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

Comments
hotnewtop
Dominicl645 (429)

any help would be greatly appreciated. helpers will get credited when i use this for a project and i will upvote them as well. @Coder100 @Highwayman

Leroy01010 (419)

first think of an idea
next draft it down
next if too hard ask for people to help (like me)
finnaly build your idea
(last step: check for any cheats and fix 'em before posting)
Thats how i do it.
@dominicl645

ThisUserTaken (237)

@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.

Muffinlavania (1513)

@ThisUserTaken Btw, to capitalize the first letter in a string its .title() like 'hi'.title()='Hi'

Coder100 (16925)

pygame would be good, but a terminal game works too

Coder100 (16925)

this is pygame and a terminal application is what you already have, @dominicl645

Whacko (319)

@Coder100 Using import pygame is better.

Dominicl645 (429)

so i imported pygame and now it said "Hello from the pygame community. https://www.pygame.org/contribute.html what do i do from here? @Coder100

Whacko (319)

@dominicl645 Yeah it's better cuz Pygame is missing a few codes.

Whacko (319)

@dominicl645 Also, there's no module named python3. You already are using Python3

Dominicl645 (429)

well...what do i do from there? i have never used pygame ever so i need helps. @JavaMaster1

Dominicl645 (429)

just figured that out lmao. @JavaMaster1

Dominicl645 (429)

dumb thing is, i am trying to use my regular python to create the idle game. any suggestions on what i should do to achive that goal? @JavaMaster1

Whacko (319)

@dominicl645 Well, I don't use Pygame, I enjoy the HTML canvas, but for getting started in Python, I recommend a survival game or an RPG.

Dominicl645 (429)

oh...ok. ig i can give that a try. @JavaMaster1

Whacko (319)

@dominicl645 And ask me for help any time.

Whacko (319)

@dominicl645 If there's ever an issue in your code, invite me to the repl and I'll be happy to fix it!

Dominicl645 (429)

ok. i just upvoted every comment on this subject i could. so all of your comments got upvoted. @JavaMaster1

Whacko (319)

@dominicl645 But I think Coder100 answered your question. You should select his as the answer.

Dominicl645 (429)

i wish i could choose 2 correct answers. @JavaMaster1

Whacko (319)

@dominicl645 Then you select the best answer. Which one helped you the most?

Whacko (319)

@dominicl645 So, which one is better?

Coder100 (16925)

wait why are you not using a pygame repl @dominicl645

Whacko (319)

@Coder100 I'm teaching @dominicl645 how to use the HTML canvas to make stuff.

TurtleAndrew (197)

@Coder100 Yes, pygame is a great on for making games.

TurtleAndrew (197)

@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()
Muffinlavania (1513)

Well if you want something like this Use python(with turtle)! This is super simple, nothing complicated like pygame(even though its not all that bad i think_

Muffinlavania (1513)

@Highwayman I know right why did he mention you
I looked through the whole comment section trying to find your name

Dominicl645 (429)

i mentioned it cause it got his attention. @Muffinlavania @Highwayman

hello1964 (26)

You could use pygame. I made this really helpful template that makes using pygame a breeze.
https://repl.it/talk/templates/Python-Game-Template/54766

qwertyuiop1111 (10)

Hey! I am looking to work on a game, and I am looking for someone to help. You were reccomended to me by @DigiLab . Please tell me if you are willing to work with me on a Python game. Thanks,

@qwertyuiop1111