#Multiplayer Solution

1 messages · Page 1 of 1 (latest)

dense elk
#

is it a good solution for a multiplayer game to use a python server with flask or fastapi?

marsh basin
#

If your game can run just with REST you can just send out http requests to add multiplayer

#

Otherwise, i'd reconsider whether you want to add multiplayer because it's really difficult to do

dense elk
#

yeah i use http request and a pyhton server for muliplayer currently

marsh basin
#

If you don't need realtime updates i think that's fine

#

e.g. if it's turn based

dense elk
#

its currently just movement , nothing else i want to sync

#

the delay is "fine "

marsh basin
#

That sounds a lot like real time updates

#

It's ok if you just want to experiment, but again, real-time multiplayer is very difficult

#

A python server won't be good enough

dense elk
#

hm

dense elk
#

do you know how a real time multipalyer game would work?

marsh basin
#

Yesn't. If you're under a few years of experience I'd recommend you try a few non multiplayer games before you try a multiplayer one

#

That being said, you could start with a tutorial like this one https://www.youtube.com/watch?v=n8D3vEx7NAE

How to make a simple online multiplayer FPS game in Godot 4 and play with friends over the internet. Big thank you to @ditzyninja for his Godot 4 networking content!
Git Repo: https://github.com/devloglogan/MultiplayerFPSTutorial

0:00 Intro

=== Blender Modeling ===
0:34 Environment Model
3:48 Pistol Model

=== Godot 4 Project Setup ===
6:56 Im...

▶ Play video
dense elk
#

ok thnakls

dense elk
#

now made it with raw packets the delay is normal for my internet

unkempt remnant
#

also writing a python server on packed based comms will be fine if you limit players per server instance

dense elk
#

so its not localhost

unkempt remnant
#

ok so you're running the server in some kind of vps, just keep in mind you still need to consider available bandwidth and number of players, also players in different locations can have different network speed too

dense elk
#

gonna make a simple fps and then check if its good playable

unkempt remnant
#

if you want to use python go for it, you can always port the server in c/cpp/rust when you need a raw power

#

just avoid slow tcp packets for fps

dense elk
#

will for example rust be much faster?

unkempt remnant
#

chat can be on tcp, but player status can be a mix of both

unkempt remnant
dense elk
#

i guess i have to learn a new programming language again , but thanks

unkempt remnant
#

not necessary, try to write a good game using python if you want to, just learn about udp and tcp packets

#

when needed, you can port the server to any native language to boost processing performance

#

in multiplayer you also need compensate lags, which includes some clever tricks around interpolation, delta calculation, rollback, future prediction etc.

#

and for fps it will be important

dense elk
#

yes gonna look into that

dense elk
#

made it with rust on localhost

#

put the rust server on and vps and the ping is still around 40ms