This content has been marked as final. Show 5 replies
if I follow what youre saying it soundslike Step 1 is where the hold up is, but I'm not sure what you mean by a 'pattern'. How are you assigning numbers to each ticket?
Are you assuming that it will be too slow or have you actually experienced
this? If you are experiencing a slow response you may need to post some of
your code for anyone to offer a suggestion. Director can loop through very
large lists quickly doing comparisons in almost no time if you have coded it
correctly (on a reasonably modern processor of course).
"cerdas" <email@example.com> wrote in message
> hello, im development a bingo game multiuser but i have a trouble, how i
> get the winners? i do the follow:
> 1. for each ticket i make a list with all the possible combinations
> with the pattern.
> 2. with each called number i take out from the combinatinos list the
> 3. when some list lengh is 0 means somebody wins.
> It works perfect! but takes too much resources, because some patters can
> more that 1 combination, and players can get a lot of tickets, then is too
> data to process, some idea about how make it better?
ok let me explain me better:
bingo patterns are the combinations for example 4 corners, any line... etc.
for each ticket i use 24 random numbers betwen 1 and 75.
Then for each ticket i extract the a winner list, for example to 4 corners:
repeat with a=1 to tickets.count
for example if you get 1 ticket your winner_comb = ["B11", "b15", "011", "o15"]
that may means something like : [3, 7, 73, 65] i send that list to the server that process the tickets, the server side runs a random list between 1 and 75 (the bingo caller), then i go to the previous list ([3, 7, 73, 65] ) and if the number exist on the list i just delete it, when the list haves 0 records means that the owner of the ticket wins, the trouble is that for each ticket is 1 list, if 1 player buy 50 tickets means 50 list, and if you have 100 players playing then you have 5000 list... i run it on test mode with 10 players and is good, but with 40 players the server crash (to slow to process the list) but i cannot figure out other way to process the ticket.
ty for your help and time!!
So is the server provessing everything for all the players? Can you have the players computer processing just their tickets - distributing the computing required?
ty johnAq i move the tickets validation to the client side, now it runs very good... if somebody wanna see it go to www.bingoisus.com