Making a multiplayer game

just the way game engines are, the default is to run as an isolated instance. read: single player.

all you need to do is enable the addon “export game engine runtime” (not the publisher). then once you have a working game, go to File, Export, Game engine runtime. Tip: be sure you export into an empty folder, otherwise it will be a mess.

be sure that copy python and copy dll is ON the first time you export. any time after, you dont need those if you just want to update an existing game.

i should mention @WKnight02 's attempt at making an online fps zombie shooter. this guy makes me look like nOOb. :sweat_smile:

1 Like

i think that should invite to the blender discord where there is a bge and help-bge sections. there is also an upbge channel which @BluePrintRandom can get you an invite.

upbge is a variant of bge with more modern features and advancements. even if you dont want to use upbge yet, im sure they would welcome you.

thank you so much, I have already used the game engine runtime method, but I didnt know how to use it efficiently! Thanks!

last night I exported it yet all my textures turned pink?? Is there a solution for that?

Is it possible for a template of an online server and then I can append my game into it?

It is possible to do, but truth is there might be no such resource at all.

I was able to find the following projects:

But I don’t know if any of these links will actually help.

In theory, it would be possible to create some generic Python Component or some “Master Logic Controller” on the client side, and have some kind of server somehow tracking entities.

Why is it not done? Because it is painfully hard. By hard I mean that it requires a lot of trial and errors in order to have something working correctly, but it is doable! (I wouldn’t do it though)

So I see some options from there:

  1. Forget about multiplayer in Blender (easiest).
  2. Learn how to program, and work all your way up to writing a multiplayer system (very long, years?)
  3. Keep waiting for someone to make such an add-on (really unlikely, people with that skill-set are doing other things).
  4. Find another way to make games, that would better integrate multiplayer (I don’t know of any engines doing that, I cannot help here sorry).

If you want to laugh, I started on the Blender Game Engine something like 8~ish years ago, a bit on-and-off depending on the years… But it is only now that I can try writing everything required to have a multiplayer game. I guess I must be patient, although I would rather say stupid.

So, I don’t know what you’ll set your mind up to now, but I hope it is clearer for you now :slight_smile:

Either make sure that everything is packed inside the blend file, or that the file paths pointing to the textures are still correct relative to the published executable.

thank you very much, Now i know I wont be doing that anytime soon

thanks! If someone on this wants to look over my file how to I give it to them? do i just drag and drop it in the text box?

Yes, but this isn’t Discord, you can take your time and try things on your side before posting, lol

Look at the buttons in the UI or whatnot, there’s an Upload button.

I’ll leave that to someone else :stuck_out_tongue:

make sure all your textures are in the folder with your blend. the exe is like the blend.

file, external data, make all paths relative. that will make bge look in a similar place for resources.


I just watched this video and It looked too convincing to be true…
He did it all with logic bricks in like five minutes with modules
At the end I saw he had this other thing which was the server so if you guys know what he did at the end with the server tab and who was in the server (if its not outdated) then please tell me cause I have no clue

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

@WKnight02 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).