Hi, can anyone assist me with an assisgnment I'm working on....it entails coding a basic NPC with the associated networking on C++
-
Hi and welcome to devnet,
For which game do you need that NPC ?
-
So you basically need to implement the AI part of the game.
The networking part is completely unrelated to that. It is just a mean for players to join the game. The AI shall not care whether it's playing against local or remote players.
-
That's a bit the goal of a NPC, it's independent of the player and will react based on what they do.
-
That's a bit the goal of a NPC, it's independent of the player and will react based on what they do.
-
You might consider making a player object. Then make an npc object that derives from the player object. So it appears like a player to game itself.
-
How do you coordinate them locally ?
-
This does not answer my question.
That said, why UDP ?
-
Start with the chat example: https://doc.qt.io/qt-5/examples-network.html
-
Do you already have the logic of the game working ?
Without that, adding a network layer does not make any sense.