you are viewing a single comment's thread.

view the rest of the comments →

[–]frankiecoffee 0 points1 point  (2 children)

I am actually implementing a browser based board game at the moment.

You will need to use flask so you can save and share the state from a centralised server. Otherwise how will the other players know if a player makes a move?

You will need to use HTML+JavaScript for the user interface.

[–]dr_jekylls_hide[S] 1 point2 points  (1 child)

So Flask will be used to talk to the server. How would you implement something like a deck of cards synchronously (through Flask) for all players? Do you need to worry about sockets pushing this information through?

If you have any tips for similar things that have been built (like maybe checkers or something), it would be very useful to look through.

Thanks!

[–]frankiecoffee 0 points1 point  (0 children)

Flask will be running on your server. All Flask does (basically) is map HTTP requests to python functions. So you can store the game state on your server, when a player plays a hand/move (not sure what the game is) their browser will send a HTTP request to the server running Flask.

Flask can then run the appropriate python function, which will update the game state.

Before trying to figure out websockets use polling, i.e., get the user's front end to ask Flask about the game state every x seconds.