Posted 23 August 2010 - 02:11 AM
I have recently been working with Multi player games, and have a few questions -
However, let me first say(before you write me off as a total nubbin) I have lots of experience in regular coding, but very little in Multi player.
Mplay or 39dll?
I have almost no knowledge of Mplay, but enough in 39dll to understand the basic Pong example that comes with it. Which would be better for a 2-4 LAN TDS game w/ AI?
I modified the basic Pong example that comes with the .dll and made it so you can move left and right, as well as shoot balls. Moving left and right works fine, but on the client side, it will only display 1 of the many balls. (I only have the host able to shoot them for debugging, I wanted to see if it works before implementing it for both players)
Is there any message I need to send to update for the client what objects are in the room?
For the 2-4 player LAN TDS w/ AI, would I need a server application and a client application, or just a single application, where one player acts as a host. Which would be more stable? If I were to do a single application, would I be able to aim via mouse, or would complications arrive there?
Any help someone could offer would be greatly appreciated.
Posted 23 August 2010 - 02:41 AM
Posted 23 August 2010 - 03:54 AM
When you create an object on one client, you have to send a message in byte maybe 200 and send the x and y. and basically use that to create a new ball... now when updating positions you send it under a different byte. For a client server, it's possible but the person hosting the server and also playing can experience lag from taking / giving all the information. Everything you say is easily doable its just saying "hmm... how we gonna do this" thats ever gonna arise as a problem.
Let me see if I'm understanding you right -
In the create event of an object- a bullet in this case- It should send a message to all other players of its x and y co-ordinates.
Thank you for the relatively fast reply.
Posted 23 August 2010 - 04:05 AM
I don't know how much you understand about multiplayer online games but it is all basically messages and your client exe interpreting those messages.
Your other players have no clue about what is happening in your game room until you tell them.
Your client's message -> Server sends message -> all other clients get the message.
For instance you must send your coordinates and ID so that other people know where you are and know it is you and not somebody else.
But you also must be smart about how you send messages because you don't want to send a bunch of useless messages. EX : Only send your X / Y when they change not every X steps.
If you need any help you can ask.
Edited by Myname, 23 August 2010 - 04:07 AM.
Posted 23 August 2010 - 04:59 AM
EDIT: Played around with it some more. Creating bullets is a snap, but they only appear on which ever screen (client/server) created them. What information do I need send with each message? What about in the create action?
Edited by greenkid479, 23 August 2010 - 07:15 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users