Destructible buildings mechanics multiplayer demo

This is a crude outline of a mechanic that I thought would be fun to explore as I am building real time mesh creation for my other game.

Main features:

  1. Shoot through walls with beams
  2. Let you friends drop to the abyss

How to play:
Open the bge_client/blend and press p to play.
The game will create the maps from a random seed from the server,
so it will lag the first 10-20 sec.

How multiplayer works:
It will try to connect to the server on the ip on the serversettings.py file.
If that fails, it will search for a server on your machine.
If that also fails, it will create a server on your machine.
So on the same computer to test multiplayer just open the game twice.
To connect to other computers server edit the serversettings, and probably pray.
(works on local networks, can’t test otherwise as of dorm internet restrictions)

Two players (red boxes):

General shooting:

If someones beefy computer can handle more:
In the scene there is worldGen object with properties map_size and chunkSize.
map size 5 means 5*5 chunks, chunkSize is the room size in this case.

If anyone is interested in this kind, let me know,
as I otherwise don’t really plan to finish it up with my current motivation.
Just wanted to get a demo out to see how it rolls.

Attachments

disolveBuilding.zip (822 KB)

Hello VegetableJuiceF!

Great concept! Looks very promissing. It would be nice to see it working single player too :slight_smile:

Unfortunately I failed to make it work. At the moment I have just a brown box that rotates, and mousemove for the camera (I can see my red foot).

Forgive me my ignorance but when you say “just open the game twice” do you mean what exactly? Two Blender instances? :?

I think I’m not good enough to understand all your components.

I will see what the terminal is returning later on :wink:

Running Blender 2.73a on Ubuntu 12.04.

Yours,

Ortiz

Can you calculate load occaionally over time like red faction gorrilla and make a structure fall if it gets too damaged?(pieces go rigid body, hit the ground then disperse over a amount of time that wont cripple physics?)

@ChicOrtiz
To open the game twice open the blend twice to have two blender instances.
Single player should work just by opening one game, as i said, it will create a server automatically.

Maybe my server scripts ( sockets ) are not compatible with Ubuntu… :spin:

What does the console say?
Does it show in the game the debug properties: data load, id and a ip(host)?

The point was, that it was supposed to be as easy as to press p to play.

@BluePrintRandom
I could, but do you know that don’t go well together? lag and fps…
Structural physics is in a sense pathfinding, where every atom/block is a node.
The load can be spread, but then the reaction would happen too late to feel consistent with a fast paced shooter.

Hi Vegetable JuiceR!

Here is a print of my terminal.

In this case I had to finish the engine fast, otherwise it would be replete of “phys init failed” :wink:

Ortiz


<b>Blender Game Engine Started
Debug blender path: ./Blender 2.73a
Debug local path: /home/chico/Desktop/Down/disolveBuilding/


Local mesh creation server willbe opened


found bundled python: /home/chico/Desktop/THE FILE/binaries/blender-2.73a-linux-glibc211-x86_64/2.73/python
found bundled python: /home/chico/Desktop/THE FILE/binaries/blender-2.73a-linux-glibc211-x86_64/2.73/python
found bundled python: /home/chico/Desktop/THE FILE/binaries/blender-2.73a-linux-glibc211-x86_64/2.73/python
read blend: /home/chico/Desktop/Down/disolveBuilding/worker.blend
Traceback (most recent call last):
  File "/home/chico/Desktop/Down/disolveBuilding/mapCreationLogic/operator_worker_client.py", line 11, in &lt;module&gt;
    from mapCreationLogic import worker_client
ImportError: No module named 'mapCreationLogic'

Blender quit
read blend: /home/chico/Desktop/Down/disolveBuilding/worker.blend
read blend: /home/chico/Desktop/Down/disolveBuilding/worker.blend


    Server START


waiting for connection…
Traceback (most recent call last):
  File "/home/chico/Desktop/Down/disolveBuilding/mapCreationLogic/operator_worker_client.py", line 11, in &lt;module&gt;
    from mapCreationLogic import worker_client
ImportError: No module named 'mapCreationLogic'

Blender quit
phys init failed
test if game server up 193.40.244.204 False
test if game server up on this computer 127.0.1.1 False
open server
Added cam Camera
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
found bundled python: /home/chico/Desktop/THE FILE/binaries/blender-2.73a-linux-glibc211-x86_64/2.73/python
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
phys init failed
read blend: /home/chico/Desktop/Down/disolveBuilding/worker.blend
phys init failed
phys init failed
Traceback (most recent call last):
  File "/home/chico/Desktop/Down/disolveBuilding/multiplayerLogic/multiplayerServer.py", line 10, in &lt;module&gt;
    sys.path.append ( path.replace("\\"+path.split("\\")[-2],"")) 
IndexError: list index out of range
phys init failed
phys init failed
phys init failed
phys init failed

Blender quit
phys init failed
phys init failed
phys init failed
phys init failed
Blender Game Engine Finished
None : Client killed.</b>

I would only be interested in this multiplayer demo if there was dynamic terrain loading.And i could really make a game out of it with low poly characters for npcs and players.Not like mine craft characters.

Yeah… I kind of agree with Lostscience I think that dynamic terrain loading could be cool but can kill the performance… :I

Maybe if you focus on sigleplayer, making new chunks appear elsewhere, while the game goes on… :slight_smile: