Making a multiplayer game

The system looks decent, issue is: if he didn’t upload his scripts (Client.py for Blender, and main.py for the server part) then there’s not much you can do from it.

oh so he had scripts that he didnt show on the video
I’m very inexperienced dont judge me

@wkk when you said “the server part” are you saying he uses a different program for the server?

Check the video to see if he has other attachments somewhere. Very likely, I would think.

In any case, a multi-player game has to have some kind of multi-player game state server that all of the player instances are talking to. When “you” do something, or “he” does something, the server has to be informed, and it has to inform the other player(s).

Now, there’s already a lot of logic out there to do this in Python – PyGame, PodSixNet, and so on. So, don’t think that you would be starting anything “absolutely from scratch.” As with everything else, you build on the shoulders of giants. Someone else is always walking ahead of you.

Actum Ne Agas: “Do Not Do A Thing Already Done.”

Yes.

Well in this case it seems like there isn’t anything done for the BGE :slight_smile:

thx, if you do this is it ALWAYS required a script or can a seperate program do most the work and you just finish it up with logic bricks and modules

or the other way around and the logic bricks and modules do most of the work and the other program finishes it up

You will need at least one script in your Blender game, because the engine doesn’t do any networking by default, so some Python script will need to take care of it.

Based on how these script(s) are designed, it would require you to then just use bricks and game properties like you saw in the video, what exactly really depends on how it was designed :slight_smile:

Then the server would be some program that will run independently from the game, a different process.
In the case of the video, the server process was a pure Python program (no BGE involved for the server).

Thank you, is there already made servers that I can download or do they all have to be made

I think you’ll have to search hard, but without really knowing what you are looking for it can be difficult to know what to filter out, or even how to run some of the solutions that might exists.

But even if you did find some server, then the issue is having your BGE game interact with it, that will require some Python script, and from experience you always need something adapted by hand for the BGE :slight_smile:

Long story short: I don’t know.

On my end, I am making my own server, but I don’t think it is generic enough for everyone.

Thank you
by any chance are you wkk.py on discord?

I see it in ur username and thats someone im talking to on discord

Yes :slight_smile:

lol thats hilarious

@Qesca i like yr curiosity in creating a Multiplayer Compatible Game, though it is a long way to go from here. it’ll atleast take you 8+ Years to master maintaining Multiplayer consistently in BGE and the problem is u need to gain experience through trial and Error and increasing and expanding yr knowledge on networking in BGE.

Its a really demanding path to go about my advise to you if you’re new to Game Development is that focus on the singleplayer Experience 1st. (Master it and then Expand and branch out in to exotic territories such as networking for games and expanding on the Online aspects of Game Networking. (Multiplayer)

Which is why at this point all my Games are singleplayer focused and feature split-screen option. (Personally i prefer split-screen its so reminiscent and nostalgic of the PS2 days of gaming which were my favorite days)

I wish you all the luck and never give up on an idea!

Fred/K.S

That’s the time it roughly took me, doesn’t mean someone cannot do it quicker :stuck_out_tongue:

1 Like

Well it took me roughly about 9 years almost 10 years now with BGE just to learn how to make games. (All i can say is that its my experience thats allowing me to make progress the way i already am)

Fred/K.S

Hi @Qesca :slight_smile:

I’m have been coding Multiplayer Games in a lot of different programming languages since I’m 10, and good news, I feel like Python is the “easiest” for this. So on the one way I would say “Yes ! Don’t worry, that’s not such a big deal !” and on the other way, I agree with others on the fact that if you don’t know Python, it would be quite difficult.

So, I think you have two solutions :

  1. You prefer simplicity, and you can do a split screen, and you will come back on Python coding later.
  2. You REALLY want this multiplayer game, and you are ready to go deep into some code.

If you choose 1. I guess you will be able to do it by yourself :slight_smile:
If you choose 2. Here are some advices on what to do, because it’s hard to know where to start :

  • I. Learn Python basics. You can use website like OpenClassRoom to learn how it works. I mean pure Python, without Blender. You would come back to blender later. Try to achieve some very simple console games, etc…
  • II. Follow a Tutorial on Python sockets. It’s quite simple, it’s just a way of sending some data from a computer to another, via network. There are a lot of tutorials on internet about coding a simple “tchat” game in Python. Again, no Blender here, just a console, and you learn who to send “Hello there” from a computer to another.
  • III. As soon as you are able to send some text like “Hello” ans get it back on another machine, try to send some more complicated data, like ints (1,12,13), floats(12.4, 456.654), and finally lists ([12,13,14], etc…)
  • III. Try your previous code in Blender. I mean only trying to send some basics data from a Blender running, getting it back on another Blender on another machine. It’s important if you really want to achieve a multiplayer game, to be able to “Forget” your game for a while, and do some basics things first. Forget about moving some player by network if you don’t success first into sending some data like numbers or strings.

When you are done with being able to send some data from one Blender to another… Here you can start thinking about a network game. Here are some basics, which are True for almost any multiplayer game :

  • In tutorials about tchats or basic networking, you will notice you always deal with a “server” and a “client”. Clients send some messages to server, server send them back to all clients.
  • For gaming it’s exactly the same. But if it’s a FPS game instead of a tchat, Client will send there keyboard hits, server will make them move and send back their positions.

And by the way, that’s the reason why coding a game for two players or 10 players is quite exactly the same code. Because you will need a script to be the “Server” and Players will need there script to be the “Client”. Starting from there, having 1 guy or 10 guys in your game will make no difference.


Any way :smiley:
I could continue but I think it’s already enough informations for you. Here the things you have to consider before going deep into the subject.

See you ++
Tricotou

2 Likes

Ok guys thanks now I’ll just try to finish the game in the standards except for multiplayer.
If you guys could give me suggestions for the game as you guys have been doing this for years it would mean a lot to me,
you dont have to I know you probably have better things to do than review an eleven year olds game
Thanks for your help!

If anyone does want to give me constructive criticism on my game, heres the link:
https://drive.google.com/file/d/10RIt1NJhreDE_OCpzjfxVoP_ZdSGzgeh/view?usp=sharing

The blend is missing some textures.
File->External Data->Pack All Into Blend to include textures with the blendfile.

I did, the cargo crate in the backround isnt working, when I pack them it syas they cant be found even tho when I play the game it appears