[OPEN SOURCE] Multiplayer 3D RPG Using Colyseus

You can find an even simpler model like Roblox r6 (6 bones) like this one Roblox R6 [Rigged] - Download Free 3D model by youK197_YT [fd308c3] - Sketchfab

1 Like

Hi @oriongu
How did you manage to create entity selection mark? This green mark on the ground :smiley:
I was trying to do this with spotlight but without satisfying effects and as I saw Yours it’s perfect :smiley:

@Maiu hehe, it is a simple plane with a texture that I offset a little, just make sure to disable the lighting on the material, something like the below.

// entity selected circle
var texture = new Texture('entity_selected', url);
texture.hasAlpha = true;
var material = new StandardMaterial("entity_selected");
material.diffuseTexture = texture;
material.useAlphaFromDiffuseTexture = true;
material.disableLighting = true; // dont let lighting affect the mesh
material.emissiveColor = Color3.White(); // material to be fully "lit"
1 Like

2 Likes

Hi All,

Animation issues

Great news! As I was working on a system to better customizing my characters, I ran into those “animations / weapons not being attached correctly to my characters” issue again and just could not make any sense of it.

Luckily, to take a break, I decided to rework my client spawning system, and after a first draft, I realized all of my animation issues are completely gone now!!! It looks very much like I have a loading order issue since the start.

I’m going to fully rework the spawning system to better wait for each system to be ready.

Character customization

Lately, I’ve been building a method to customize my characters using a single blender model, it’s slow progress though, mostly because there is many different moving parts (blender, photoshop, json, babylon.js). I’m building it with the intention of it being as dynamic and modular as possible. This probably will not be useful for any other project as equipping shields/swords/etc are done via code.

Here is a sneak peek anyway, showcasing the same model with 3 different settings, there is still alot more work to get it fully functional, but I’ve got a clear way forward :slight_smile:

6 Likes

Damn, it’s so satisfying to actually progress.

So I’m nearly getting to the point where I can really customized my characters!

I have 2 types of items (I’m sure none of this is new to you guys, but sharing is caring :slight_smile: ):

  • dynamic items that I attached via code to the relevant bone (weapon, hat, shields, etc…)
  • embedded items which are rigged item in blender (head & armor currently), this is mandatory as a skirt for example needs to move with the legs (not possible with dynamic items)

So I now have one single VAT running that is used by all my “humanoid” characters. The way I set it up will allow me to easily add additional items.

Currently, I can mix and match the following very easily:

  • 20 materials,
  • 6 heads,
  • 3 dynamic items (weapon/shield/helm)
  • 2 embedded items (base chest/robe chest)

Next step is being able to customize the material for the “embedded” items, currently I apply one material to the full mesh (including the embedded items).

Performance is still good (50-60fps / 40 draw calls approx)

Here are a few shots:

PS: demo not updated yet.

4 Likes

Demo updated: https://t5c.onrender.com/

Use the right click to equip and unequip the robe :grin:

1 Like

Yes! I found a better way to integrate embedded items like armor/robes! Now it’s very easy for each to have a different material.

Also to my knowledge, there is zero animation issues or desync left! It’s all running like a well oiled machine :slight_smile:

Best buddies now we have the same armor :slight_smile:

3 Likes

This looks so cute

1 Like

Thanks Deltakosh!

I think we have enough variety now :slight_smile:

1 Like

Hero shot! :slight_smile:

Stress testing (1000 npcs + 400 items)

5 Likes

:heart_eyes:
It’s great, this is a solid crowd :smiley: Definitely it’s enough to make sth very cool.
I hope I’ll be able to achieve such performance. For now I’m struggling with fps without having pretty much anything on the map :stuck_out_tongue:

1 Like

Thanks :slight_smile: . Yes, the Babylon.js part is working smoothly now, and it’s the networking part that is limiting me now. I need to implement some sort or “area of interest” system like you did instead of automatic synchronization to everyone (even if they are far from you). (Colyseus dev is currently working on this including better data sharing option)

For performance, VAT & instances are the way to go, It took me way too long to implement correctly but that’s okay, sometimes you have to go through the learning journey.

2 Likes