starting off with a 4 player card game

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

starting off with a 4 player card game

Postby capdetrons » 09 Mar 2014, 12:44

Hi,

I am sure this will sound like a dumb question to many in here, but I was wondering how to get started with a card game and just realized the use of room variables could be of help as well as using an extension for the game. Is that possible?

The game starts by allowing the starting player to choose a trump or let his partner do so. I have done that using the extension and I'm thinking whether showing the first player's move in the rest of the clients would be easier to pass as a room variable instead of sending a message to the extension which would only receive the turn pass.

can anyone recommend a good starting book or tutorial for card games? The one I'm trying to program has a slight ressemblance with the french Bellote or Bridge...
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: starting off with a 4 player card game

Postby Bax » 11 Mar 2014, 15:45

imho, the game start signal should be given by the server. It is always the best approach to have an authoritative server controlling the game state and validating the requests coming from clients.
Paolo Bax
The SmartFoxServer Team
capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

Re: starting off with a 4 player card game

Postby capdetrons » 11 Mar 2014, 22:55

Hi, thanks,

I imagined that. I wasn't sure how to post my question. The server keeps the shuffled deck of cards and deals with the values sent and coming in from the clients as well as the turns, but would placing the cards for each turn be easier or quicker using room variables instead of sending the complete move information to the server? I know I need to test and test a lot, especially not knowing much about OOP, but knowing if it's possible and worth merging room variables and extension requests would really help me.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: starting off with a 4 player card game

Postby Bax » 12 Mar 2014, 17:58

From the SFS point of view, it is just the same. Setting a Room Variable or using a custom Extension message doesn't make much difference.
Paolo Bax
The SmartFoxServer Team
capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

Re: starting off with a 4 player card game

Postby capdetrons » 16 Mar 2014, 09:58

Thanks, I needed to be sure.

One question about the licenses. My machine's IP changed recently without me knowing about it. What does the company do when that happens? I saw it is required when you purchase a license.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: starting off with a 4 player card game

Postby Bax » 17 Mar 2014, 08:53

capdetrons wrote:My machine's IP changed recently without me knowing about it. What does the company do when that happens? I saw it is required when you purchase a license.

You have to send us an email requesting an IP change.
Paolo Bax
The SmartFoxServer Team
capdetrons
Posts: 72
Joined: 24 Aug 2013, 09:15
Location: Barcelona
Contact:

Re: starting off with a 4 player card game

Postby capdetrons » 17 Mar 2014, 12:27

Thank you

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 79 guests