How do i make a game

Question:

I am a beginner and don’t know how to make a game.
Repl link:

https://replit.com/@DaneFischbach/Pygame-1```
code snippet

2 Likes

Thank you for your help, can i make a game on Replit?

2 Likes

Sure! You can use Python to make a game in Pygame, or you can use JavaScript to make a game in Kaboom!

2 Likes

How do you do that, sorry.

Find a Pygame tutorial on YouTube.

2 Likes

Here are some basic steps for game design:

  • Choose a language: I would first suggest that you pick a language and learn it well. There are many tutorials and replit even has a 100 days of code for python.
  • Design the game: Next you are going to want to figure out what the game actually is, and all the elements you need. (eg. pong style game needs a ball and paddles and it should bounce and score a point when past the opponent’s paddle)
  • Build a user interface: Now you create the ui which includes buttons and game pieces. (for pong it would be a ball and two paddles)
  • Create the game loop: Then for most games you need a game loop to repeatedly update everything. (for pong you want to move the ball, and move the paddles and check for a bounce or a lose point) Game loops in pygame for example, can detect events such as mouse moving or key pressing, then you update the objects, then you redraw them to the screen.

(Note: these aren’t exact instructions because half the fun of making your game is figuring out the specifics of how it works, so have fun and try to reason through some of the problems yourself if you can)

9 Likes

I would suggest taking the flappy brick tutorial replit has in it’s learn page https://replit.com/learn

4 Likes

It’s Not an easy task to make a new game first you should lear about the coading.

4 Likes

I would suggest switching this order, UI is a part of the game loop, it’s rendering.

5 Likes

Here is the Flappy Bird game turorial by Replit

These 2 links are the tutorials on how to make a snake game
Note: IDE might differs in the tutorials.
I hope it works id it works please mark it as Solution
Thank you

1 Like

I think he meant to draw your sprites before making the game loop.

That’s a step I mostly skip lol, I’m bad at making my own sprites lol :laughing:

1 Like

The way I make games is to first know how to code in the language I’m using (I’d recommend using Python to start it is simple and can do a lot). I do that by looking at tutorials and making simple projects of my own. Then I come up with a game idea, I look up if anyone has done something similar to make the process easier. If not I work through the game, if something doesn’t go right I look up how to do it. I hope this helps :slight_smile: !

1 Like

Thanks for sharing it with us :slight_smile:

To be honest, if all you want to do is a game i suggest to look at GameMaker. Use their graphical language, get some game design experience and then move to their programming language, after that true coding in a language of choice.
I say that, because making games starts from designing a game and to learn that while learning programming is quite difficult.