in reply to Daily Actions
You could store, for each user, a date when they last received new turns. If they try to use a turn when they don't have one, check the date. If they're due to get new turns, add them to the turn count and update the date.
You could also store the dates of all of the user's last turns taken. When the user tries to use a turn, delete all the records that are over a day old. If there are still too many turns used, disallow the turn. This gives a slightly different turn allowance, though. It's not x turns every day but x turns in any day-long period.
Update to expand on that second idea a bit (since roboticus likes it): I recall years ago a couple of friends in a turn-based game would make a killing by waiting until the end of the "day" to take all their turns, then wait for the new turns to arrive shortly after, and take all their turns again. By doing this, they could double their effect in a short time. A "turns in time period" approach would defeat that strategy. I don't know anything about Spidey's game, so it may be the case that this "last minute, first minute" approach doesn't really gain the player any advantage.
The down side comes for a user who tries to play at the same time every day. Let's say the player arrives at noon, takes all turns, and returns the next day. The player has to wait for a minute after noon to play again. Every day, the time when play is allowed moves later. This also means that I can't play one afternoon and then play again the next morning.
Perhaps a better solution is a mix of some kind.
The main problem I have with the first approach (all turns arrive at a fixed time every day) is that it might not work well for people in other time zones. If I were playing a game where turns arrive at noon, I'd have to play either in the morning or in the afternoon every day.
Anyway, I'm rambling a lot more than I meant to (and not even with code!).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Daily Actions
by roboticus (Chancellor) on May 17, 2007 at 15:41 UTC |