<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How would you do enemies AI on a multiplayer game. If we want that the players fight the same enemy.]]></title><description><![CDATA[<p>One of the challenges when developping a multiplayer game is sync enemies through all clients and make them fight together.  How would you manage this for an average enemy and an average boss ( with attacks ).</p>
<p>My approach is basically giving the first player to start the fight, the Battle leader role. Basically they are going to host the fight for the server. They will be the reference for the server.</p>
<p>Their job will be to send a and b variable to server. The server will then broadcast those values to client. They will pathfind and perform the movement there. So I don't waste bandwith on transfering the position of EACH enemy.</p>
<p>The battle leader will have the role of doing all the enemy AI and attacks. It will send message to server if enemy does special attack and client will try to reproduce it.</p>
<p>I still didn't try this approach though, I will shortly and will update on it.</p>
<p>Meanwhile, I want to know how you would do such a thing.</p>
<p>Thank you</p>
]]></description><link>http://discuss.colyseus.io/topic/861/how-would-you-do-enemies-ai-on-a-multiplayer-game-if-we-want-that-the-players-fight-the-same-enemy</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Mar 2026 14:26:05 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/861.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Dec 2022 19:17:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How would you do enemies AI on a multiplayer game. If we want that the players fight the same enemy. on Invalid Date]]></title><description><![CDATA[<p>One of the challenges when developping a multiplayer game is sync enemies through all clients and make them fight together.  How would you manage this for an average enemy and an average boss ( with attacks ).</p>
<p>My approach is basically giving the first player to start the fight, the Battle leader role. Basically they are going to host the fight for the server. They will be the reference for the server.</p>
<p>Their job will be to send a and b variable to server. The server will then broadcast those values to client. They will pathfind and perform the movement there. So I don't waste bandwith on transfering the position of EACH enemy.</p>
<p>The battle leader will have the role of doing all the enemy AI and attacks. It will send message to server if enemy does special attack and client will try to reproduce it.</p>
<p>I still didn't try this approach though, I will shortly and will update on it.</p>
<p>Meanwhile, I want to know how you would do such a thing.</p>
<p>Thank you</p>
]]></description><link>http://discuss.colyseus.io/post/2273</link><guid isPermaLink="true">http://discuss.colyseus.io/post/2273</guid><dc:creator><![CDATA[Herano]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>