Expand my Community achievements bar.

SOLVED

Quota Exceeded

Avatar

Level 3

Hi

I am on the brink of completing an interactive game of pong but my quota ran out. I noticed that I can upgrade to a commercial developer account for $5 a month. Is this the only cost or would I be paying additional per message costs as outlined in the commercial pricing. If not, how much extra usage to I get on a commercial developer account.

The pong game is really cool but uses up lots of messages because it communicates every x, y coordinate moved by each players bat and the ball as well as the two scores. So all in all lots of x,y coordinates are going through to 4 Shared Properties and this is chewing through the quota.

Is there a cheaper pricing model to handle this realtime communication? Has anyone developed a similar realtime movement application - I am really interested?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

Why not send one packet with current X, Y and the direction the paddle is moving in (add speed if you have variable paddle speeds).   Then only send another packet when the paddle stops or changes direction.  Otherwise send nothing at all.  I have a little tank iphone game and that's the kind of approach I'm taking for multiplayer.   I think that's a pretty common approach in online multiplayer games, send messages when something interesting happens, like ball hits a paddle or a paddle starts moving.   Then periodically send heartbeat messages with score, status, x, y, etc, just to keep things synced. 

In this case I think you want to do a coin flip to make one player the "server" and one the client, then the server has the final word on things like player 1 just missed the ball.  A bit more complicated but should drastically cut down the ammount of messages you have to send.   Just a thought don't mean to butt in.

-Eric

View solution in original post

10 Replies

Avatar

Former Community Member

Hi justoliver,

The $5 fee is a one-time initial setup fee -- after which, it's pay-as-you-go based on the combination of the 3 dimensions described here.  Also note that only messages in are counted. Messages out are excluded.

As for different pricing models, we are investigating bulk pricing options, but that is still in the works.  Would you be willing to share your economic model with us?  What's your anticipated usage, number of users, etc.? We'd like to understand how you plan on monetizing your applications and how our pricing models can be flexible enough to meet your needs.

If you'd rather share this information privately, just send me a private message.

Thanks,

Fang

Avatar

Level 3

Hi Fang

Thanks for the quick response.

I have not yet decided on an economic model, however I hope to be at the stage where I can offer paid services. Currently my website is free (you will notice that AFCS services have been suspended - http://www.happydaygames.com.au). It has a single-player Sudoku game and a multiplayer Chess game (using AFCS) and is on the verge of getting the 'Interactive Ping-Pong'. I have a feeling that the 'Interactive Ping-Pong' game will be popular - it may be worth paying for in the eyes of the public but there are certain limitations for me at this stage:

The 'Interactive Ping-Pong' game chews up usage during development (I used about $4 worth of quota yesterday - I think I played about 4 or 5 times). If it does this during development it may bombard AFCS with communication when it has live users


As an example:

If I have ten users playing the game 4/5 times a day, the AFCS costs would be $40+ per day and I charged them $5 per user per month for a subscription - the $50 obtained from subscriptions would only cover the costs of roughly 1 day each month, leaving me with a debt of roughly $1100 per month just for those 10 players. If I suddenly had 100 players playing 4/5 times a day, I would be left with a debt of $11,000 making the game extremely unprofitable. This is probably an optimistic estimation because if the users really like the game they will be playing more than 4/5 times a day which would cause the losses to skyrocket exponentially.

Just looking at your pricing plans: It seems that my application acts more like a 'live stream' since it is sending many sequential messages to the server much like a stream. I am sure it would be tricky but it would be really beneficial if there would be some way of translating my 'Interactive Ping-Pong' usage to a similar plan as the streaming option

I am really excited to get the game up and running and think it will give a fun and good example of a real time game on AFCS. I am confident it will work if the player has a reasonable broadband connection, from the tests I have done.

Avatar

Former Community Member

Hi Oliver,

IMO, it really seems as though you're chewing through more quota than I'd

expect. $4 for 4 or 5 games? That's 40000 messages, or 10000 per game. Seems

waaaay high to me. How often are you sending messages? Do you end up sending

a lot of redundant updates (updates that don't change values)? Are you

sending your x and y coordinates through separate sharedProperties? You

could be sending {x,y} pairs instead, cutting your messages in half.

Let's dig into this a little deeper - my feeling is that we could optimize

your messaging to avoid consuming so much.

nigel

Avatar

Level 3

Thanks Nigel

Thats sounds great - I am really commited to trying to get this to work efficiently on AFCS.

You are right - I could send objects instead of Shared Properties per coordinate:

Just to give you an overview of my setup ( where SP = Shared Property ):

Player One: SP (y-coordinate)

Player Two: SP (y-coordinate)

Ball: SP(x-cordinate), SP(y-cordinate)

Scores: SP(Player One), SP(Player Two)

So I can see that I can reduce the ball to be one object. I can't see anywhere else to reduce the payload as the rest are independant.

- I am sending through 'Player One' and 'Player Two' y cordinates whenever the player moves there bat up or down.

- I am sending x,y cordinates for the ball whenever it moves.

- The height of my application is 300 pixels, the width is 600 pixels

So to me it seems quite possible that I could be sending through 10000 messages per game since each time the player moves their bat down the screen, 300 messages will be sent regardless. And the same with the ball, at least 600 messages will be sent each time it traverses the screen.

I could reduce the size of the playing field to half leaving perhaps 5000 messages per game. I could also increase the distance between sending coordinates to some level but this would create a 'less smooth' response.

Any suggestions are welcome - thanks.

Avatar

Correct answer by
Level 4

Why not send one packet with current X, Y and the direction the paddle is moving in (add speed if you have variable paddle speeds).   Then only send another packet when the paddle stops or changes direction.  Otherwise send nothing at all.  I have a little tank iphone game and that's the kind of approach I'm taking for multiplayer.   I think that's a pretty common approach in online multiplayer games, send messages when something interesting happens, like ball hits a paddle or a paddle starts moving.   Then periodically send heartbeat messages with score, status, x, y, etc, just to keep things synced. 

In this case I think you want to do a coin flip to make one player the "server" and one the client, then the server has the final word on things like player 1 just missed the ball.  A bit more complicated but should drastically cut down the ammount of messages you have to send.   Just a thought don't mean to butt in.

-Eric

Avatar

Level 3

Thanks - Eric

Those sounds like viable ways to reduce the number of packets and maintain a synched game. It would be a little more complicated to implement but it definitely seems like an option.

btw - I noticed that iPhone dosen't support flashplayer. How did you get around this?

Avatar

Level 3

Hi Nigel

I am making some headway with the game. I am only sending x,y cordinates not when something happens eg the ball hits a bat. The only drawback is that the other player can't see the opponent's movements - but hey there have to be tradeoffs when there is limited budget

And I am using a shared object to store x,y cordinates for the ball. It seems that the only way to update properties of an object is to use setProperty for each individual property and this I assume fires of a message on setProperty (if this is the case there is not much difference in using a SharedObject or two SharedProperty's).

On top of that setting each x and y property of the SharedObject is resulting in some random latency. Is there a way to set all properties at once much like one would for an Object? This would help hugely in the speed of sharing information as well as be helpful in reducing costs.

Thanks

Avatar

Level 3

Hi Eric

Your suggestions were the way to go. There are a few minor drawbacks - the player can't watch the opponent as they move their paddle (but that's the trade-off).

The 'Interactive Pingo Pong (Pingo)' game is now live and available for play on http://www.happydaygames.com.au

I just hope that the free quota lasts for a few people to have a try. I have already used up $10 for development this week - the payload is much better though.

Thanks

Avatar

Level 3

I have developed an alternative which is more cost effective.

I have developed a version of my 'Pingo' game using AJAX comet, FABridge and the external interface.

In this version I am still using the lobby as a way for users to challenge each other and to chat with each other, however there is less overhead since I dont need to create rooms for every game that is created. The only potential limitation for comet is server load as I am using a long-polling PHP implementation of comet as described on http://www.zeitoun.net/articles/comet_and_php/start

Please try the new version at http://www.happydaygames.com.au/pingo-comet-lobby. It would be great if you ould compare the two games and perhaps even leave a comment on my developer website at http://happydaygames.com.au/trumpetmouth/portfolio-flex

Avatar

Employee

If you know when/where you want to send your updates you could simple create a node and send a MessageItem with a Point object in it.

If you want to stick with the ShareObject, because it manages all of that for you I think you should be able to pass a Point as the data to be shared instead of two Numbers for the coordinates.

In both case don't forget to do a RegisterClass(Point) in your initialization code so that the Point can be correctly serialized/deserialized.