[OPEN SOURCE] Multiplayer 3D RPG Using Colyseus

I just wanted to chime in and thank you for sharing your hard work and the motivation it’s providing. These things are tough to solo and I’m loving your progress and the community’s feedback. It’s been really helpful to get me back into a project I had started a while ago and abandoned. It has a similar tech stack: Babylon (of course), Colyseus, behavior driven AI (using a modified version of Behavior3js and the editor), isometric (orthogonal) view, Babylon GUI, MySQL (sqlite for local dev), etc. Seeing your progress in those area is pushing me to try and keep up :slight_smile: Thanks!

1 Like

Hi Guys,

Just a quick update on the project: I’ve wasted ALOT of time on trying to restructure the server (test/yuka branch) in order to simplify and decouple the different parts (Colyseus, Yuka, Game manager, etc) and after a few different attempts and alot of work, I’ve not managed to get a solution that is as simple as having the Colyseus Schema as the main object of my game entities.

I’ve tried a few different ways:

  • Having Yuka game entity as a base, and Colyseus schema as a child under it, that works but leads to more complexity and duplication and forcing me to create a sync function that runs on every iteration
  • Having a custom game entity as a base, and Colyseus schema as a child but that leads to the same issues as above,
  • Having a custom game entity and Colyseus at the same level and synchronize them using a specific id but that create its own complexity.

So I’ve reverted to using Colyseus schema as my base game entity, in order to be able to do for ex: this.mana = 100; and it will sync automatically to clients.

Simpler is better :slight_smile: ,

Not sure if I’m making any sense, and just wanted to share the struggle.

2 Likes

I encountered something similar. I ended up with having the Colyseus schema object as a member (“has a”) of the Entity class and using the “listen()” to keep synced with what the server view was (proxy). I think of it like a network interface. It also allows for smoothly lerping the mesh position on the client to the server’s position without having to be spammed every tick with an update.

But yes, that means I have a listen() hook for every member of the schema to keep them aligned. This feels like a job for a template/generator, but my typescript-fu isn’t strong enough to crank one out. It’s days like this that I miss Haxe…

1 Like

Congratulations on the recent merge!

1 Like

@Keslinger Appreciate the positive feedback, that’s the whole spirit of this project. Thanks for sharing how did it, it’s an interesting approach but I’m all done refactoring currently. :wink: Good luck on your project, and don’t hesitae to share it :slight_smile:

@Pandee_Panpan Thanks mate! Currently working a different types of AI behaviour (in a area, ina radius, on a path, idling)

@oriongu have you been watching realm crafting as well? @Dad72 has created something you may be wanting to look at because dad72 has been making a lot of progress it seems.

1 Like

Hi there,

I’m loving my new AI structure (fsm using enter, execute, exit for each state), nothing fancy but I’m getting the hang of it slowly.

Example showing ai patrolling an area (idling each so often)

Example showing AI patrolling a path (idling each so often)

AI will still attack you if you get close but will return to nominated behaviour if you run away :slight_smile:

2 Likes

Hi,

Quick update,

{
  type: "static",
  behaviour: "idle",
  aggressive: false,
  canAttack: false,
  description: "Will stay idle, perfect for a vendor, or quest giver",
  points: [new Vector3(0, 0, -13)],
  radius: 0,
  amount: 1,
  race: "male_adventurer",
  name: "Priest",
},

Full json structure here: https://github.com/oriongunning/t5c/blob/main/src/shared/Data/LocationsDB.ts

1 Like

Working on equipment an had this funny moment :slight_smile: It should be a feature !

Started working on the first draft of equipment functionality (synchronized to all clients), it should be a breeze to hook up to the inventory.

This feels so easy compared the AI behaviour I was working on before hand :0

Anyway, use the number 6 top digit on keyboard to test the equip and unequip weapon :stuck_out_tongue:

1 Like

How to cut it, it doesn’t work when you press any key

Not entirely sure what you asking,

  • You can move by clicking left on your mouse and dragging towards the direction you want to move, like Diablo.
  • To cast abilities, open the abilities panel by using the relevant button on the top right menu, click the learn ability button and then you can use the ability by using the right digit on the keyboard or just left clicking on it in the ability bar
  • To use the sword, just select an enemy and then click the first ability

Does that make sense?

I want to slash other people, but I don’t know which button to press to release the skill
Are you using babylon.js game development, can you communicate
Are you Chinese, let’s communicate in Chinese

That’s it big milestone today, we can finally pickup items and equip them !!!

It’s still has plenty of small bugs but the core is in place :slight_smile:

1 Like

Started doing some research on how to deal with the Y axis, and I think I found a great way to do it via the navmesh

So cool!!! :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning:

]

Fighting the AI on the bridge!



New level! Yes, I’m a terrible level designer :slight_smile:

1 Like

I’m so proud of having added the Y axis, it’s been bothering me a long time.

Another screenshot for the fun :stuck_out_tongue:

1 Like

Improved the overal item structure, and added new item: The gray shield! I really need to brush up my 3d skills.

I just need to find how to swap materials on meshes and I’m done with items :slight_smile:

2 Likes

What the hell is this! So creepy! :slight_smile:

Edit: I am trying to integrate VAT instances…