#Faking multiplayer

1 messages · Page 1 of 1 (latest)

quick void
#

I want to build a thing like among us but its um with a different theme and no multiplayer, only .io one (if you don't know, it's just a whole bunch of pathfinding to a bunch of spots in random distanse so every .io game like slither.io has actions like collect dots so they pathfind to dots, or kill someone, so they pathfind to their head). I need to make then not dumb so they dont kill in front of everyone and have only a bit of a strategy.

Stuff to fake in multiplayer for imposter: faking tasks, killing (but smart), running away from the body.
Stuff to fake in multiplayer for innocent: tasks. Not much of a deal huh

somber siren
#

Sounds like you need to look at StateMachines, so taking the 'not' among us like idea. Each player (bot) in the game would have a specific objective, drone (task worker), killer, create a statemachine, apply the statemachine to each of the bots (and player), ensuring one is the killer.

Killer state would be

Idle (starting state)
MovingToTask
FakingTask (goes to a task completes 10% - 40% of task then leaves)
SearchVictim (ensuring that no one is around (or maybe only a few))
KillVictim
Flee (return to faking task)
CallForMeeting (Faking that they saw someone kill a bot?)

Bot States

Idle
MovingToTask
DoingTask
LookingForKiller
DyingToKiller
CallingForMeeting

That's a starter how the meetings happen is probably another state machine, you would need a full narrative at this point, so each bot would have collected some information from previous statemachines at some point and would try to work out who the killer is.

Interesting concept

unborn palm
#

It could also be interesting if each bot had a "personality"

So, for killers, some are more aggressive (the min amt of players in vicinity for a player to be killed is higher) while some are more cautious (tasks are faked more often, only kills when there's no players in vicinity)

For non killers, maybe have some that move in pairs, some that are bad at tasks or some that are good at them.

I think for the personalities,it'd be best if you analyzed different people and how they tend to play then break it down into very simple terms.

You could also change the amount of "memory" each player has. So an example would be every time an NPC "sees" another,it tracks the player,where they were seen and what they were doing.

To change the amount of memory, you would keep a max amount of events the bot could have and erase the oldest ones when it gets past a certain amount.

You could also randomly add in inconsistencies by switching around some stuff (maybe the true event was "red doing tasks in the cafeteria" but instead you store "blue doing tasks in cafeteria")

I feel like using state machines and those two broad ideas,you could create a lot of variation in playstyles and keep it fresh.

left cloud
#

Or maybe you can take a look at GOAP (goal oriented action programming), where basically the AI will decide what are the best steps to take in order to reach the predefined goals, and what is the most important/urgent of those goals to accomplish

#

For example, an impostors goals could be killing, faking tasks, not getting detected, and so on. You can program the AI to normally want to kill other players, but if there's risk of getting seen (presence of others other than the victim) then the priority of the goal of not getting detected is higher, and faking tasks could kick in at that time. Running away from the bodies could also be part of not wanting to be found

As a small note, if you're using C#, there's a library for Unity called ReGoap, but I have made it platform agnostic and uploaded it to NuGet if you want to give it a try