Turn on thread page Beta
    • Thread Starter

    I am thinking of making a game with Blender game engine for my project since I can use python in it. Is it possible to do multiplayer with python and bge?

    (Original post by CameronWalker)
    I am thinking of making a game with Blender game engine for my project since I can use python in it. Is it possible to do multiplayer with python and bge?
    I don't know, but try asking this on stackoverflow. You may get better help and answers

    Almost certainly - it's highly unlikely that there would be anything in Blender game engine, nor any other library or framework which would actively prevent you from working with network messages to/from other hosts or a server.

    It looks like the Blender game engine helps you build all kinds of real-time 3D apps/games, but Networking is an entirely separate problem and separate concern to this.

    I can't tell whether the Blender game engine has any of its own networking or client/server libraries - a quick google suggests that no such thing exists, but that other people have solved the problem by writing their own, so it seems like you'd need to do the same.

    If you end up working with your own messaging system, the fact you're working with a realtime simulation means you'll likely need to consider running that in a separate thread (handling network sockets directly on a real-time game or simulation loop thread is usually a very bad idea!), so you'd also need to consider synchronisation between the realtime game/app, and any received network messages - You could consider using the queue class for this https://docs.python.org/3/library/queue.html

    If you want to save yourself some work and learn a neat networking library, then you could take a look at ZeroMQ - it'll probably be easier than trying to fuss around with raw sockets. (Client/Server example using the Python "zmq" library - http://zguide.zeromq.org/py:all#The-...Server-Pattern ) - you'll need to install the zmq package to use it.

    And for a simple way of creating messages to send/receive, have a look at pickle: https://docs.python.org/3/library/pickle.html

    I'd suggest creating an entirely separate prototype app to play around with ZeroMQ (or raw sockets if that's what you'd prefer to use) and Pickle before trying to mix it up with your game.
Submit reply
Turn on thread page Beta
Updated: March 13, 2018
The home of Results and Clearing


people online now


students helped last year

University open days

  1. University of Buckingham
    Postgraduate Open Evening Postgraduate
    Thu, 23 Aug '18
  2. University of Glasgow
    All Subjects Undergraduate
    Tue, 28 Aug '18
  3. University of Aberdeen
    Undergraduate Open Day Undergraduate
    Tue, 28 Aug '18
How are you feeling about GCSE results day?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.