TechAssembly / ruven

Game for the Github Game Off 2018 - Themed HYBRID!
7 stars 4 forks source link

NPCs - nav mesh, pathfinding, models, animations #25

Open orenkoren opened 5 years ago

gioragutt commented 5 years ago

Here's a good point - NPCs are shared across players, their state is in the server-side, how do you do that in Unity?

You should start by working on the actual client side stuff, like the models, animations and etc, and probably what will happen is that the NPCs will be in the server side.

Do keep in mind - like player animation - the animation state should be something that is inferable from the state sent by the server, so that it can be synced across clients

orenkoren commented 5 years ago

So with the free time I have we'll probably have npcs that patrol around the map, like the player, they will send their location to the server. i'm not sure if I'll be able to get around to doing more because implementing things like health and drops will require saving states in the server which is cancer

gioragutt commented 5 years ago

But fact is that if every client will send NPC state there will either be overlapping NPC data between clients, or that there will be an NPC for each player.

If you want to implement the AI for NPCs, how about you check how to do that on the server side with some popular npm packages?

orenkoren commented 5 years ago

Pushed commit to oren_npcs containing everything the client needs to start work on the server. i'm leaving this to someone in the server side.