Online Multiplayer Game in Repl using Pygame and Flask
I am wanting to make an online .io-style game using Python. I will be writing it on repl. I have been looking for a tutorial for a game that uses both Pygame and Flask for a game like this, but have not been able to find anything.
I am somewhat experienced in Pygame, but am completely new to Flask and server-client programs.
Can someone please point me to a good tutorial for this?
Host a free server with pythonanywhere.com
i made this website in a few days using flask: http://cwesterink23.pythonanywhere.com
I am not sure how integrate pygame into the website but here is a link: https://www.pythonanywhere.com
On this website you can get a free 'pythonanywhere.com' domain name and upload python and html files using flask as your web framework.
I made this website with flask in a couple days: http://cwesterink23.pythonanywhere.com/
(ik its bad, i am new to flask and html)
well, you could do this in flask only!
https://codeburst.io/building-your-first-chat-application-using-flask-in-7-minutes-f98de4adfa5d
Here's a little chat application, but it will be similar with game-making too!
Here's a link that will help you:
https://stackoverflow.com/questions/63898998/how-to-integrate-pygame-and-flask
@RYANTADIPARTHI it looks like nobody has responded to that question yet.
@Kosmic well, other than that. I don't know any tutorials using pygame AND flaks. But if you want JUST flask, I've got millions.
@RYANTADIPARTHI I just want to use pygame because it is the only graphics-engine for python that I know of. If you know of a different one that would be equally good/better, that would be fine
@Kosmic ok, so there's something called turtle, just like pygame, but you can make games, and designs, and animations and all.
Here are a few links:
https://realpython.com/beginners-guide-python-turtle/
https://www.geeksforgeeks.org/turtle-programming-python/
But if you want just pygame, then I'll give a few tutorials for that too.
@RYANTADIPARTHI Awesome! Do you have any tutorials that use both turtle and flask?
I honestly just need tutorials to make a .io-styled game using flask and a graphics engine
@Kosmic sure, i'll give you some. But if you want can you mark my answer? Thanks!
@Kosmic Also one more thing is, i don't think you can use flask to make a game. Cause that's all about making websites. But you can make the game using turtle.
@Kosmic are you there?
@RYANTADIPARTHI I am responding to other answers
@Kosmic oh, ok, have you see mine?
@Kosmic I found this tutorial, it uses pygame for the frontend and it teaches you how to make it from start to finish:
https://www.youtube.com/watch?v=McoDjOCb2Zo
@realTronsi I looked at that one already, and it doesn't show how to send it out to the world and host it online.
@Kosmic bruh hosting is a completely different storing. You will need to buy a hosting package (or use repl), and also buy a domain from domain providers such as namecheap.com or get a free domain at freenom.com, and link it up so that it is hosted online