AI in hosted games

Started by
12 comments, last by hplus0603 3 years, 11 months ago

I think the real question you need to solve first is “how does authority work when players are in different areas/zones/maps” ? Everything else will probably come from that.

You may also want to separate out “server” versus “host.” If I'm a player hosting a “server” on my local machine, that may very well also be the “client process” that I'm playing in, and thus it's both a “rendering client process” and a “server” (both topologically and authoritatively.) The alternative is to run two processes on the hosting player's machine, one for topologically being the server, and one for doing the client/presenting.

If you run multiple processes on the hosting client's machine, you may as well run more than two – one per area/map/whatever there's a player in. And one small process that is the one listening to the network, and routing packets to/from the various clients,

If you want to use root motion as the movement authority for simulated entities, you can write some script that extracts only the motion part of the animation, and use that on the server, if you feel that loading the full skeletal animation uses too much memory or whatever.

enum Bool { True, False, FileNotFound };
Advertisement

@hplus0603

hplus0603 said:
I think the real question you need to solve first is “how does authority work when players are in different areas/zones/maps” ? Everything else will probably come from that.

Well I think it's best kept as a server authoritative, it will be easier to implement (no need for recovery mechanism when a clients disconnect or move between maps.

hplus0603 said:
ou may also want to separate out “server” versus “host.” If I'm a player hosting a “server” on my local machine, that may very well also be the “client process” that I'm playing in, and thus it's both a “rendering client process” and a “server” (both topologically and authoritatively.) The alternative is to run two processes on the hosting player's machine, one for topologically being the server, and one for doing the client/presenting.

Sorry for the terminology confusion: the game itself is built towards 1 process, that has 2 states for a host player, 1 for the client and 1 for the server, the former is updated just like any remote client state does - by network.

hplus0603 said:
If you run multiple processes on the hosting client's machine, you may as well run more than two – one per area/map/whatever there's a player in. And one small process that is the one listening to the network, and routing packets to/from the various clients,

That's a good point, I need to estimate how long would it take - nevertheless good point.

hplus0603 said:
If you want to use root motion as the movement authority for simulated entities, you can write some script that extracts only the motion part of the animation, and use that on the server, if you feel that loading the full skeletal animation uses too much memory or whatever.

I wonder if you are familiar with any unity related examples on this subject.

Thanks for all the help

Sadly, I have no experience extracting root motions from Unity animations.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement