Gamepad's Multiplayer Game Engine & 3D Editor

Hi my name is Jpg! I am a musician, 3d modeler, artist and programmer who has been working on multiplayer games for a couple years now. I haven’t finished my games yet… but I have decided to showcase a multiplayer game engine that I am working on, that uses Babylon.JS and the networking layer & frameworks I made for my games.

The concept is people can create snippets of Babylon code to make a game. The snippets can be attached to entities in the scene (kind of like Godot). Then each person in the room can work on different parts of the game in isolated scenes.

Some features…

- Adding game entities in real time:
entities

- AI code editor:
code

I was also playing around with a potential 3D editor made in Babylon.
Spent an afternoon building this as a proof of concept (after trying PicoCAD):

I love making 3D models, but Blender is too complicated, it took me weeks to learn how to do something that should honestly be as easy as MSPaint… At the moment I’m torn between doing a low-poly 3d modeler or a metaball 3D modeler.

As for a release date… :sweat_smile: I would love to work on these projects full-time, but for now I just work on them on the side, so I can’t give an ETA.

Just felt like sharing!

6 Likes

This is a great selection of work! Please continue sharing your progress!

Regarding 3D modeling, did you evaluate SDF editing? Use SDF to describe volumes then add an iso surface generation like Dual Contouring or Marching cubes.

I’ve listed a bunch of resources here : GitHub - CedricGuillemet/SDF: Collection of resources (papers, links, discussions, shadertoys,...) related to Signed Distance Field

2 Likes

At first I tried using the MergeMeshes method described in the docs:

But when I exported it as OBJ the meshes were overlapping each other.

I then tried CSG2, but I didn’t like the automatic topology, BUT I still feel it would be great fit for a metaball sculpting tool.

Example of what metaballs are like in Blender:
ezgif-305b4b5fea6cd7

A tool like this should have:

  1. Adding metaballs symmetrically
  2. Sculpting
  3. Automatic-UVs
  4. Color palette and brushes

I would 100% use a tool like this, as it would speed up my character creation process.
One of my characters for reference!

As for what I ended up doing… I decided to use an array of vertices that I create the mesh from, then I render the quads as triangles. I am essentially moving the positions of the points to manipulate the mesh.

Sample code:

function createCube() {

    // Create cube
    positions = [
        -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1,
        -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1
    ];

    quads = [
        [0, 1, 2, 3], [4, 5, 6, 7], [0, 1, 5, 4],
        [2, 3, 7, 6], [0, 3, 7, 4], [1, 2, 6, 5]
    ];

    indices = [];
    quads.forEach(q => {
        indices.push(q[0], q[1], q[2], q[0], q[2], q[3]);
    });

    const vd = new BABYLON.VertexData();
    vd.positions = positions;
    vd.indices = indices;

    mesh = new BABYLON.Mesh("mesh", scene);
    vd.applyToMesh(mesh);
    mesh.material = new BABYLON.StandardMaterial("mat", scene);
    mesh.material.backFaceCulling = false;
    
}

I only went this route because I was inspired by picocad: picoCAD by Johan Peitz
But I think the metaball sculpting tool would be more handy than a lowpoly cad-like tool.

Also I never heard about SDF editing, thank you for sharing!! I will definitely give it a look!

Your character style would fit with MagicaVoxel editor

1 Like

Great work, I love to see it! Also that particle tool is amazing!

1 Like

I’ve tried MagicaVoxel before, but I never seen the CSG version of it. Didn’t even know there were two versions of the app!

I like the idea of a CSG 3D modeler, but this one seems hard to use. Imo a 3D modeler should be so easy, that a complete beginner could pick it up in a few seconds.

Maybe I could make one that has a remesh/retopology script that automatically cleans up the topology too? I’ve seen some AI scripts that could do this.

For the sculpting, there was a demo someone made that I might implement alongside CSG: https://playground.babylonjs.com/#8QGENL#47

I have time this weekend to play around with the concept.

Pretty job!

1 Like