[project1dev] networking pirate dice woes

  • From: Kent Petersen <kentkmp@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Sat, 13 Feb 2010 02:05:14 -0800

Tonight is the first time I really spent any time on the network code and
let me tell you I am confused as hell. If I follow along the lobby code I
can make enough sense of it but when it comes time for me to recreate it I
can't get shit to work right. I can get it to log in to a server by copying
the "Join chat server" section of the lobby code but I don't really
understand what to do from there.

Here are some questions off the top of my head

in the "Join chat server" section I think I would want to change
GameServer_GetServerList("Chat") to GameServer_GetServerList("Pirate Dice")
I think this would cause the game to join the game server Pirate Dice. Am I
right?

is the function SendChat the only point in the code where the player can
send information to the server? I don't really get the success= part?

I also don't really understand the OnNetworkMessage part. I think it has
something to do with sending messages to the server and out to the players
but I don't see how it does it. I understand that the bottom portion of
OnNetworkMessage is updating the chatroom. Pirate Dice should probably have
an in game chat.




I want to start Pirate Dice. Have a button for join network game. This will
look through for a list of servers and then create one if there is nothing
available. Like the lobby, I believe. Pirate Dice will then begin as it does
now.

Somehow I want the players name and ID to be assigned to the player value.
For example Player1 will say Atrix.

Somehow I want the players game choices to get sent to the server and back
to the players. The information that should be sent would, the choice they
made (raise, bluff, call), what they have in their hand (pair, three of a
kind), and any money information (amount raised, raising to the called
amount)



Between work and school I just don't have a lot of time to invest right now.
So this is mostly for discussion and to get my brain thinking. I love
working on this stuff I do it for fun and relaxation these days. I might be
able to squeeze some time in on the weekends or if I finally get ahead on
homework. The workload will definitely drop as I get the hang of my job and
as I finish off my internet classes.
Any help is greatly appreciated.

Other related posts: