NPCs and players across a network in the same scene.

I am using badumna to make a multiplayer learning project. However, even if you know nothing about badumna please keep reading, becasue my issue is undoubtably a conseptual one.

Here is why I am confused.

1 A player cannot have npcs running from their computer, so the server that powers te npcs must be a different project.

2 I cannot figure out from the tutorial hoe to connect different projects todether, but they obviously do.
3 If they are in seperate projects, then how does one update the terrains in both projects at the same time? Is there any way to “link” them?


Have I missed something?

Edit: To Clarify: I think that the movements of the npcs are governed by a seperate server. If that is the case, then how would I have npcs and players in the same scene, without spawning npcs whenever a player opens the scene?

It is all part of one project. Of course you can have many different "zones" which can equate to scenes in Unity, as well as multiple "shards", but it is still all one project.

NPC's are added to your scene just like in any other non-networked scene. The "multi-player" code layer simply keeps things synchronized so that if players are within a certain distance from each other what they see the same things.

Baduma is interesting because of its use of P2P technology``, but in all honesty it isn't ready for "prime-time" yet. I would suggest "photon" or SFS pro which are very well documented, but which ever middleware you choose I would first read as much as you can about multi-player networking theory and technology.

You don't need to have different projects to support NPC. You can have one project and two different scenes. This will make it easier to maintain consistent terrain information across the scenes. Shard is a physically separate instance of your scene. If you wanted to separate users based on the country (or any other parameter) you can have them connect to different shards. Each shard has the exact same information in terms of the terrain, assets, etc but different players. Hope that helps, Peshwa Prince