Re: yet another request for a simple example =)


[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]

Posted by adam on May 04, 2006 at 22:36:30:

In Reply to: Re: yet another request for a simple example =) posted by practicing01 on May 03, 2006 at 11:44:55:

: im using allegro, but any will do =). thx for the reply

at the moment i dont have enough time to write out the game so ill tell you some of the more important parts of it (networking wise), you'll need to make a struct that holds the information that needs to be transmitted between the clients. eg, x,y of paddle, x,y of ball, score, ... what i did for a different game was made a struct with a char and an array of chars, the char told the client/server what command/info was being sent and the array held the specifics like (x,y) cooridinates. you will also need to decide on a way for both clients to be seeing the same thing, eg one client acts as a server updating the ball location and sending the new coordinates to the other client. the server would also do all hit detection, scoring, ... from there all you need to learn is how to connect read and write, which are made quite simple by HawkNL


Follow Ups:


Post a Followup

Name:
E-Mail:

Subject:

Comments:



[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]