Daymen
Administrator
5,165 posts
37,117
Seen 23rd June 2024
21st April 2021, 05:06 PM
So you can appreciate just how big of a deal AI/NPC bots are in P3D and why its taking a while to finish this update, allow me to explain in simplest terms the challenge of making bots on p3d
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
CEO of Lorefiix
Master
2,037 posts
4,757
Seen 17th November 2024
21st April 2021, 05:29 PM
Damen wrote on 21st April 2021, 05:06 PM:
So you can appreciate just how big of a deal AI/NPC bots are in P3D and why its taking a while to finish this update, allow me to explain in simplest terms the challenge of making bots on p3d
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
So to save time, people just save code for AI, and paste it to another game. Saves a lot of time. So mr Damen of the spike 500th transformers pepsi max. Next time you make a game that requires npcs/ai. Just take the code from da other game to the current one. (You probably were gonna do that anyways)
Seems as if you have been blessed with the knowledge of code, and it scares me ngl
Quote:
Lol and fart
Daymen
Administrator
5,165 posts
37,117
Seen 23rd June 2024
22nd April 2021, 02:25 AM
harry15514 wrote on 21st April 2021, 05:29 PM:
Quote:
Damen wrote on 21st April 2021, 05:06 PM:
So you can appreciate just how big of a deal AI/NPC bots are in P3D and why its taking a while to finish this update, allow me to explain in simplest terms the challenge of making bots on p3d
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
So you can appreciate just how big of a deal AI/NPC bots are in P3D and why its taking a while to finish this update, allow me to explain in simplest terms the challenge of making bots on p3d
When making bots on LeoRPG 1 and 2, its difficult enough to get them to find paths around obstacles, know when to stop, how to attack etc
but then add multiplayer, and you've got the challenge of syncing all of that logic over everyone's screen
One person's computer may find a path thats different to another person, but the bots always need to be at the same place for everyone for it to work
To do this, you have to let the server decide which path to take. That involves taking the best path from everyone's calculations and then re-sending that to everyone
But its not over yet. Everyones PC runs P3D at a different FPS. So bots for one person might finish a path quicker than another person.
So to ensure everything is synced, you need to actually simulate the path on the server, sending waypoint updates to everyone and then interpolating the NPC to each server-waypoint to keep everything synced up
Then of course you have to think about attacking with different weapons. That is never going to work unless you get the server to decide when to attack and how soon.
Then, NPCs need to have a separate animation controller because the one for real players won't work as its wired to your input controls (keyboard and mouse)
So you have to make a new animation controller which also needs to sync up with what the bot is doing at any given moment
But the good news is, I have managed it and it'll be coming out in the next couple of days with new items, new rooms and a seriously cool lore feature
So to save time, people just save code for AI, and paste it to another game. Saves a lot of time. So mr Damen of the spike 500th transformers pepsi max. Next time you make a game that requires npcs/ai. Just take the code from da other game to the current one. (You probably were gonna do that anyways)
Seems as if you have been blessed with the knowledge of code, and it scares me ngl
I would do that if the old code wasn't so bad- I was still learning.
2,542 posts
3,622
Seen 30th August 2023
Daymen
Administrator
5,165 posts
37,117
Seen 23rd June 2024
26th April 2021, 01:31 AM
weend2014 wrote on 25th April 2021, 05:47 PM:
That seems very strenuous and difficult, but your hard work will not go unnoticed, I look forward to the new update!
Thanks, its out now!