Posted By
|
Message
|
The MPP
Registered 06/11/2017 15:06:39
Points 1388
|
2nd June, 2018 at 02/06/2018 10:16:00 -
I don't need to know how to make online enemies or anything. I just want to know how to make it so that a peer shoot other objects.
Hello. Have a good day.
|
TheGoldMiner88
Registered 18/05/2018 11:35:50
Points 14
|
4th June, 2018 at 04/06/2018 11:59:54 -
i think i might know what you need to do.
But just tell me, what do you mean with peer?
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
4th June, 2018 at 04/06/2018 15:47:39 -
Hi The MPP.
This is what is so great about online multiplayer games, YOU get to decide how it works!
You're going to need to design a protocol for communicating player updates between peers.
Lacewing is essentially just a relay server protocol if you don't put game logic on the server, but that's ok for simple online games.
So what you need to do is decide how shooting will be communicated to the other peers and have them respond to that message.
So you could have a channel for sending player movement/shooting updates, like channel 2 or something, and then send the x and y position of the local player, their direction, and if they're shooting or not. When a message comes in on channel 2 your other peers will know that's for shooting, and have that player shoot on their screens.
It can get more complicated than that, but that depends on how well you want the game to run and what features you want to support.
n/a
|
The MPP
Registered 06/11/2017 15:06:39
Points 1388
|
4th June, 2018 at 04/06/2018 21:02:37 -
Originally Posted by UrbanMonk Hi The MPP.
This is what is so great about online multiplayer games, YOU get to decide how it works!
You're going to need to design a protocol for communicating player updates between peers.
Lacewing is essentially just a relay server protocol if you don't put game logic on the server, but that's ok for simple online games.
So what you need to do is decide how shooting will be communicated to the other peers and have them respond to that message.
So you could have a channel for sending player movement/shooting updates, like channel 2 or something, and then send the x and y position of the local player, their direction, and if they're shooting or not. When a message comes in on channel 2 your other peers will know that's for shooting, and have that player shoot on their screens.
It can get more complicated than that, but that depends on how well you want the game to run and what features you want to support.
Thanks, UrbanMonk. I really appreciate that you're trying to help me! I'll give your advice a try.
Hello. Have a good day.
|
|
|