Challenge feature in 2-player games

Post here your suggestions for new possible features in SmartFoxServer.

Moderators: Lapo, Bax

User avatar
paco
Posts: 16
Joined: 01 Apr 2005, 19:58
Location: Holland
Contact:

Challenge feature in 2-player games

Postby paco » 16 Jun 2005, 14:02

I'm working out a chess-game. I'll announce it if I ever finish it.

I could really use a challence feature, instead of the "creating a game and waiting for a opponent to decide to accept the challenge"-routine in th etic-tac-toe example.

I'm building a challenge functionality myself now using the privatmessage-function and the onPrivateMessage-event handler.

But some predefined functions that let you challenge some one from the online-userslist would be just perfect.

Keep up the good work,

Paco
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 17 Jun 2005, 10:48

Hi,
nice suggestions.
This one is on top of our priority list. We'll do our best to include this new feature in the next release which should coincide with the launch of SmartFoxServer PRO

We'll also add the "sendObject to single user" as well

:)
Lapo
--
gotoAndPlay()
...addicted to flash games
delany
Posts: 27
Joined: 10 Dec 2007, 00:32

Postby delany » 28 Dec 2007, 14:54

See this was two years ago - but can't find anything about any features for challenging. Am I missing something?

If it's not there yet - given that the challenge interface is very standard and almost always more suitable than the create a room and wait option in the tutorials, this would seem like an essential feature.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Dec 2007, 18:54

Hi,
the sendObject was added in 1.5
The challenge thing was just requested once but then we received a lot more requests for other features so it went a down a bit in the priority list.

Additionally while a simple challenge interface wouldn't be too difficult to add there are various use cases in which more advanced features would be probably required.

A basic interface could work like this:

-> Client A sends request to Client B
-> If Client B accepts within a time range a game room is created and both players are joined

So far so good.
However there are some other aspects to check:

- if Client B is already responding to an "invitation" can he receive other challenges from other players?

- Client A sends a challenge request to Client B and Client C. B responds first, game starts. Client C responds while the game between A and B is running... what happens?

- if Client A and Client B are already playing together can they receive a challenge request?

- if a client is in a game room but he's not playing (maybe the game is waiting one or more players) can he receive challenge requests?

- can a spectator receive a challenge?

These are just a few of the possible settings/features of such a mechanism and it would be great to discuss them in detail to see what developers have in mind when talking about a challenge system.

I think that for each of the above questions there can be multiple answers, depending on the type of game being developed.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
bacuri
Posts: 58
Joined: 24 Sep 2007, 13:42

Postby bacuri » 10 Jan 2008, 15:46

Here's my 2 cents:

- if Client B is already responding to an "invitation" can he receive other challenges from other players?

If B is not playing server should accept the request and forward it to the user, but all that means is that he will receive a onChallenge() event back o the client. It would be up to the client side developer to decide if he would be popping-up multiple invitation windows or not. This way you give freedom to the developer while the event and information are there if he decides to use it.

- Client A sends a challenge request to Client B and Client C. B responds first, game starts. Client C responds while the game between A and B is running... what happens?


The minute A joins a game, C receives a onChallengeResponse ( onChallengeStatus?) event informing that A is in a game. It's up to each developer's implementation to ignore this information or display it in the UI.


- if Client A and Client B are already playing together can they receive a challenge request?


Allowing challenges to users already in a game would be more like an "invitation system" than a "challenge system" in my opinion. For me, if it's a challenge, it assumes the both players to be idle.


- if a client is in a game room but he's not playing (maybe the game is waiting one or more players) can he receive challenge requests?


That's too advanced. However, ideally the challenge system would be implemented in such way that PRO users would still be able to create features like this one by leveraging existing functionality in their serverside extensions.
For instance, if there is a server-side userChallenged event , and exposed methods such as acceptChallenge() , that would allow PRO users to leverage basic challenge functionality while giving them the flexibility they need to customize it to their needs.


- can a spectator receive a challenge?

Here some developers will want it one way and others would prefer another, so the most flexible solution would be to have zone configuration setup for this feature, in the form of a <zone allowSpectatorChallenge="true/false" > in each zone's XML attribute.
stephandk
Posts: 1
Joined: 06 Nov 2008, 08:16
Location: Denmark
Contact:

challenge

Postby stephandk » 06 Nov 2008, 12:47

I can see this post has not been updatet for at long time.

We are looking at the same feature. ie. to challenge another player.

anyone found out if this is possible in SFS
www.mingoville.com - Free English for kids

Now with more than 400.000 registred users
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 08 Nov 2008, 08:04

Yes, although we don't provide a ready-made solution for challenges we do provide the tools (i.e. server side API) to build it.
Lapo

--

gotoAndPlay()

...addicted to flash games
aMUSiC
Posts: 48
Joined: 15 Dec 2007, 17:15

Postby aMUSiC » 28 Jan 2009, 12:56

In the backgammon game I've built (http://www.me.gr/play/tavli), I had to create a challenge system which I call "invitations".

I use an array in my zone level extension to keep invitations and flag them with sender, recipient, game options and timestamp. Invitations can only be sent to players in the lobby (players in a game are exclusively in the game room), and a player who is in the process of sending an invitation or accepting an invitation is "protected" from other invitations.

Invitations expire in 30 seconds, and I have a scheduled task run periodically to remove expired invitations from the array.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 10 Feb 2009, 04:28

Check out my game:
www.ederon.com
It uses SFS in this fashion to do exactly what you wish for.
I used private messages to automate the system in the background.
When you challenge someone it sends a "/challenge" to the desired player that is not shown as a private message to them. Instead it pops a challenge message with "yes or no". When that player says "yes", his client will send you a "/accept" witch will trigger the automated room creation system. This system consists in creating a room with a specific name (challenge_xxxx where xxxx is that player's id) and using the "onRoomAdded" event o SFS to determine rather or not that player should join. All these features are all validated on the client as well to avoid bugs and concurrencies (such as canceling the challenge and then receive the /accept)
SELECT * FROM users WHERE clue > 0
0 rows returned.

Return to “Features Wish List”

Who is online

Users browsing this forum: No registered users and 18 guests