[OPEN SOURCE] Multiplayer 3D RPG Using Colyseus

Hi there,

Obviously, very busy IRL at the moment so not too much time to work on this, but I still managed to get a first draft of the inventory working, so monsters can drop loot, and player can pick up. all picked up items will show in the inventory.

I’m also trying to work on the character editor in preparation to be able to equip items, but it’s not easy. Anyway, I’m slowly getting the hang of it, just need to focus a little more on it.


That character looks fearsome. :fearful: It would just need a mightier sword. :crossed_swords: :crossed_swords: This one looks a bit small and also needs sharpening :grin:


Are you able to perform live armature remapping of the model within your equipment/inventory system? If so, did you write your own program for that?

I have similar needs so I chose rigged items + VAT + One skeleton for all NPC/player.

@mawa, I was drinking a coffee and I nearly choked while reading your message :slight_smile: You got to be careful when being funny like that, it’s dangerous ! :stuck_out_tongue:

Sorry, I didn’t mean to harm you :sweat_smile: May be drink first and read next?! :joy:


@webgrid Nope, items are all rigged currently, but If you ever figure out live armature remapping, let everyone know :slight_smile:

I’m am following @Alexander_Sosnovskiy advice and trying to use VAT animations & one skeleton (following some parts of this playground: Babylon.js Playground).

1 Like

Hi there,

It’s been a while, life & work is taking all my time.

A few updates none the less:

  1. Your inventory is now dynamic (but not saved to DB yet)
  2. Your abilities are now dynamic and not hard coded (but not saved to DB yet)
  3. Drop table updated to 5 different items (apple, pear, health potion, amulet, nothing), with the amulet being the hardest to get and the easiest being nothing :slight_smile:
  4. Added a Ability tab where you can learn and unlearn abilities (by default, you only have basic attack unlocked)
  5. Added a global tooltip that can be easily used to display additional information (inventory/abilities), still has small issues of placement, to be improved.
  6. You can open the inventory by pressing “I”
  7. I’ve reduced the overall Colyseus state, by using the provided filter() function,
    • All players receive position, level, health, mana and few other params of every other player.
    • All extra parameters get sent only to the player it belongs to (like abilities and inventory, as no one else needs to know about that).
    • All this allows to easily update any player on the server and only the relevant client will receive the relevant update.
    • Sounds obvious, but required a fair amount of refactoring to achieve.
    • (fyi, before this change, every player would receive all data from all players)

picking up items

learning/unleaning skills


Keep up the amazing work @oriongu :slight_smile: Always amazed by the progress you made knowing it all started with you pasting your password in the chat lol

and with this scene :slight_smile:

@sebavan Damn, I forgot that password leak :slight_smile: HAHA

Yeah, I indeed did set the bar very high from the start :slight_smile:


Hi there,

I’m trying to attach a sword to a bone of my character but it is acting a little weird? Is my logic flawed? The video shows what i mean very clearly.

// load player mesh
const result = this._loadedAssets["RACE_" + this._entity.race].instantiateModelsToScene();
const playerMesh = result.rootNodes[0];
this._animationGroups = result.animationGroups;
this._skeleton = result.skeletons[0];
// equip weapon
if (this._entity.type === "player") {
  let bone = this._skeleton.bones[34];
  const weapon = this._loadedAssets["ITEM_sword_01"].instantiateModelsToScene();
  const weaponMesh = weapon.rootNodes[0];


As a bonus, had a funny bug earlier on :slight_smile:

He’s in big trouble

I use this one: Bones and Skeletons | Babylon.js Documentation

It seems like when you use setParent() the weapon takes the local vector of the bone or so? Would explain why the sword hovers around at 0,0,0?

1 Like

Mate, that’s exactly what I was looking for :slight_smile: Still a little offset but i’m sure I find a way to fix that. Thanks

Better, he looks so cool with a weapon. Not sure why I’m so happy, it’s just nice to see progress I guess (and possibilities…) :stuck_out_tongue:

  • Sorry, why can’t I run this project locally?

Hi @tianbadibatuasss, Welcome to the community.

There is no reason it should not work locally? We need more information to help you? Did you get an error?

If you do the below, it should work.

  1. yarn install,
  2. yarn server-dev
  3. yarn client-dev
  4. http://localhost:8080/

Yes, I did, but he still made a mistake。。。

Not really a mistake, I have some debug code, so that on local, it fetches a random user instead of creating a new user each time but requires at least 1 user for it to work. I’ve updated the GITHUB code so it should work for you now too. Enjoy :slight_smile:


This is crazy! It’s really great! But when I ran it locally and tried to get into the Dungeon (Level 2), I still couldn’t get in, but I could on t5c.onrender.com. What’s going on here

Thanks, It is a similar issue as previously. Until I improve it, just remove/comment the hightlighted code and everything will work as you want:

For any more help, please send me a private message, so as not to pollute this thread. Thanks