I decided to pull the web page in just so I didn't have to format it multiple times. All the paging, etc, is built-in to the webpage so I don't have to worry about doing that inside Android. Anyway, if I were to pull the information from a database on my server I'd still have some lag time to pull the information in and process it. Really, when pulling in the info into a webview, in my case, it's not much of a hit on performance. I have my stuff hosted on appengine.google.com. The only lag that happens is if the high scores page hasn't been hit in a while and thus, the appengine doesn't have the page preloaded. In that case there is a few seconds of lag, otherwise it's almost instantaneous. Low overhead as well. On average I get about 1-2k high score page views a day and it uses very little resources. That combined with the 10s of thousands of high score updates I get a day, I have yet to go over (or even come close) to my free quota limits.
Justin On Wed, Mar 24, 2010 at 12:48 PM, Kevin Duffey <[email protected]> wrote: > Hey Nikolay.. didn't realize you were the author of Bebbled. Great game. I > play that one a lot too. I need your source tho.. I am stuck on a level and > I want to modify it so I can beat it. :D > > As for sending game moves..that's interesting, but I agree with Justin that > it seems quite overly complex/clunky for most games, to handle a high score. > With encryption and SSL, why not just go that route? I don't know if you are > selling Bebbled..I have a free version, but it's such a good game I can't > imagine you're not making decent money from it. Is it the cost of the > certificate and such that you decided to avoid using SSL, for example? I am > not trying to be nosy.. I am trying to understand what/why you did what you > did. I've not heard of anyone sending game moves and storing all of that to > avoid a cheating high score. I would have thought with sha-1 salted hash or > something, or SSL, you could avoid any cheating going on. As someone else > posted, the chances of someone really trying to cheat are probably so > limited.. I mean you're not giving out money for high scores or any sort of > reward. > > As for social aspects, I've not looked, but I thought Facebook, twitter, > and such had REST based APIs, where you basically get some developer key, > and then can call the APIs to connect to them. Maybe I am wrong on this.. > but I've seen a few posts about this fb-connect library, and wondering why, > if there is a REST-like interface, you need a kit for it? Maybe there isn't > a rest-like interface. I thought there was tho. > > Justin, the web view you mention, why not just make a call to the server to > pull the high score data down, and format it directly into the game with a > view? I am curious why you went that route? I think you said you have a > website where players can check high scores, so you're reusing it.. but even > so, I mean.. in my mind, if you're good enough with Android to make a game, > making a server call to get some high scores and display it in a view would > be easy to do. Just curious why you chose this method instead of what I am > asking? > > OAuth.. it's quite interesting.. I've found it a bit difficult to figure > out how to use it tho. I want to use it for services on the server side.. it > seems I have to provide several keys or something to the client using the > service with oauth. While it seems to be the new industry heavyweight for > authentication and everyone is adopting it, I get confused with the > two-legged and three-legged methods for service calls. I know the > three-legged is great if I want my friend to access my stuff that otherwise > they could not. But when I put up a web service and want to allow a client > to access it, seems the two-legged approach is fine..yet I forget now but > read that three-legged is better for this.. but it seems more complex to > explain to clients on how to use it as well. Ugh! > > > > On Tue, Mar 23, 2010 at 10:55 AM, Nikolay Ananiev <[email protected]>wrote: > >> Well, it's more expensive to use the web view, because all the html that >> you transmit over the network is redundant and the server traffic cost goes >> up. >> What I don't want to do is to pay to support a free game. That's why I >> made my own binary protocol, which is very efficient - loads the data very >> fast and the bandwidth cost is very low. >> For example, last month I had only 4GB of traffic, which costs me $0.61 >> with amazon aws. >> >> Implementing the social features in Bebbled was not hard. The hard part >> was to make the current facebook-connect library ( >> http://code.google.com/p/fbconnect-android/) work. It's not an official >> one and it's a direct port of the iPhone version. It has many bugs and >> issues with threading, but I managed somehow to make it work for me. I even >> returned some patches to the maintainer, but he hasn't responded yet. >> >> As for twitter, I didn't find a "Sign in with Twitter" library for >> android. There's even no such library for iPhone. I created this from >> scratch using a great OAuth client implementation ( >> http://code.google.com/p/oauth-signpost/). I'm thinking to release this >> code as an opensource project as soon as I have the time. >> >> >> On Tue, Mar 23, 2010 at 3:01 PM, Justin Giles <[email protected]> wrote: >> >>> Nikolay, >>> >>> First of all, kudos to a great game! It's one of the few that I go back >>> to over and over again. >>> >>> Back to your post: >>> Great ideas here! Your online scores idea is great for decreasing the >>> amount of cheating to almost 0. However it seems like it has a lot of >>> overhead to recreate someones game. Maybe not. I guess it just depends on >>> how much logic you have to go through to recreate the game. And, in a lot >>> of games, this approach wouldn't work very well, or could become clunky. >>> But, for you game it seems to be working great. >>> >>> In regards to not showing the online scores in game, why not use a >>> webview on your activity to pull in a "mobile" formatted webpage with the >>> scores? That's how I pull in the online scores for my app and, sure, it >>> takes a few seconds to load the webview into an activity, but it's something >>> like 1 second for an activity to load versus 3-5 seconds for the activity >>> with a webview to load. You also bypass having to dump out to the browser >>> to do this. >>> >>> In regards to the social aspects you recently implemented (facebook, >>> etc.)...was that much work to do? I've been thinking about adding these >>> types of features into my app as well. I'm only at the exploratory phase >>> currently though. I'm not entirely sure what all I'll be getting into >>> there. >>> >>> Justin >>> >>> On Tue, Mar 23, 2010 at 2:39 AM, Nikolay Ananiev <[email protected]>wrote: >>> >>>> On Wed, Mar 17, 2010 at 2:08 AM, Kevin Duffey <[email protected]>wrote: >>>> >>>>> Hey all, >>>>> >>>>> I am curious how the various groups of game developers, primarily >>>>> mobile (android in this case) and cross-platform (android/iPhone/facebook) >>>>> handle storing high scores, achievements, and such as well as how multi >>>>> player is done. >>>>> >>>> >>>> How does your game(s) access high scores, update the list, remove them >>>>> if need be? The same would apply for achievements, and to a lesser degree, >>>>> leader boards. >>>>> >>>> >>>> Are you using a service out there that you pay for... if so how much >>>>> does it cost.. and do they provide some sort of java/objective-c SDK that >>>>> you can just plug in to your code? >>>>> >>>>> How do you dispaly high scores, leader boards, achievements, etc in >>>>> your game? Do you provide your own web site with the same info, perhaps >>>>> jazzed up a bit more or with more detail than your mobile game (due to >>>>> limited screen realestate for mobile devices)? Do you provide a link to a >>>>> web site in your game if they want to see things like high scores, >>>>> achievements and leader boards? >>>>> >>>>> >>>> >>>> >>>> My game has a custom view to show the high scores in the game. I didn't >>>> like the web browser approach, because it gets the player out of the game, >>>> completely changes the UI he is used to and the loading time is terrible. >>>> The user experience is really bad this way. I have two high scores in the >>>> game - local and online. The local high scores are stored in a SQLite >>>> database and the remote are in PostgresSQL. I also show the high scores on >>>> the website and on a Facebook application. The difference between the 3 >>>> types: The in-game high scores do not support searching (I just don't have >>>> the visual space to put a search input field, which I want). The website >>>> ranking supports searching, but otherwise is the same like the in-game one. >>>> The Facebook one is interesting. If you log-in the game using facebook >>>> connect, your facebook id is saved and this allows me to show a specific >>>> ranking based on you and your facebook friends, show their pictures, link >>>> to >>>> their profiles and so on. >>>> >>>> >>>> How do I send the scores to the server? I don't. That's how I prevent >>>> cheating. What I do is to send the player moves to the server and the >>>> server >>>> replays the game using the player moves. Checks if every move is according >>>> to the game rules and validates the game. If the game is valid, the server >>>> just extracts the scores out of its state and saves them. There are no high >>>> scores send over the network. >>>> >>>> >>>> >>>> I would also like to know what sort of things are most important for >>>>> your games. High scores are so yesterday, so to speak. The latest craze in >>>>> most games seems to be achievements and the ability to obtain extra items >>>>> for your games, either by buying them, or earning them through >>>>> achievements, >>>>> etc. So what are some things you game developers would want to make use of >>>>> in your game to add more appeal to your game, to draw in players for >>>>> longer, >>>>> especially long enough to pass the 48 hour refund time so that you can >>>>> actually earn some money from your hard work. I look at games on Facebook >>>>> like Farmville that are doing so well they are hiring more developers at >>>>> good pay to work on it. I also look at games like World of Warcraft, >>>>> which I >>>>> play and got sucked into for a while, due to getting to that next level or >>>>> getting that next awesome epic gear piece... those sorts of things seem to >>>>> be what draws in players to otherwise simple games. A number of mobile >>>>> games >>>>> that seem to do very well often seem to be fairly simple games but offer >>>>> that right mix of "I just got to get to that next...". I am curious what >>>>> some of you developers have found work for games either those that you >>>>> played, or are working on (or have written) that draw in players. This >>>>> leads >>>>> to the next paragraph.. making a living on game development ultimately >>>>> requires that your game does well and that people pay for it in some >>>>> manner >>>>> and not refund it. Hence why I am trying to understand what it is that >>>>> those >>>>> otherwise simple games seem to do that draw in the masses. >>>>> >>>>> >>>> >>>> I'm currently working on a real-time multiplayer. You will be able to >>>> play against other players from around the world. I will add an option for >>>> bluetooth challenges later. I'd like to add achievements, but that would be >>>> after the multiplayer. >>>> >>>> >>>> >>>>> Which brings about another topic.. how do games like Farmville make so >>>>> much money being free games, that they can have a company behind it? I >>>>> can't >>>>> believe ads on the stie alone make up for all their revenue. I've been >>>>> considering looking at ads in the game as opposed to charging for it, and >>>>> that seems like players might keep a game longer than if they pay for it >>>>> and >>>>> then refund it within 48 hours if they don't absolutely love the game... >>>>> although I am not entirely sure how much it annoys players to have a small >>>>> portion of the screen saved for ads as opposed to just buying it. >>>>> >>>>> >>>> >>>> Farmville makes little money from ads compared to the money they make >>>> from selling virtual goods. Last thing I remember was that they released a >>>> new flower and made $800,000 in a single day. And I personally hate ads. My >>>> game doesn't have ads and it's free. >>>> >>>> >>>> >>>>> Lastly, multi-player. I am curious how games work multi-player. The >>>>> only way I can think of is the client (game) has to update a server of >>>>> some >>>>> data, a move, location of a sprite, etc, and at the same time has to poll >>>>> the server often enough to update the game screen to keep things working. >>>>> The first part of this, the game side, seems easy enough.. at least to >>>>> some >>>>> degree.. when your player makes a move, you send a server request to some >>>>> server with the data, be it their new location, a weapon they selected, >>>>> etc. >>>>> The second part of this is the client polling the server often enough, >>>>> fast >>>>> enough, to keep things smoothly on the screen of all players. So how have >>>>> some of you handled this and yet keep the game playing smooth as well? >>>>> Probably more important is, the server side. Not necessarily the code bit >>>>> of >>>>> it, but how do you handle if your game takes off and you get 10s of >>>>> thousands of players playing it... what sort of server side technology is >>>>> used to handle that many requests, that fast, fast enough to allow all >>>>> those >>>>> game clients to provide a smooth game experience while keeping the >>>>> multi-player working solid as well? >>>>> >>>>> Thank you. I look forward to learning more about how these things are >>>>> done in games. >>>>> >>>>> >>>> >>>> Server polling is always a BAD idea for games, especially for real-time >>>> games. You have to go lower in the newtwork stack and directly use sockets. >>>> If you use low-level sockets you can keep the connection to the server >>>> opened all the time and this way you can push information and the server >>>> can >>>> push information back to you and there is no need for polling. That's how >>>> multiplayer gaming usually works. >>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Android Developers" group. >>>> To post to this group, send email to >>>> [email protected] >>>> To unsubscribe from this group, send email to >>>> [email protected]<android-developers%[email protected]> >>>> For more options, visit this group at >>>> http://groups.google.com/group/android-developers?hl=en >>>> >>>> To unsubscribe from this group, send email to android-developers+ >>>> unsubscribegooglegroups.com or reply to this email with the words >>>> "REMOVE ME" as the subject. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected]<android-developers%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >>> To unsubscribe from this group, send email to android-developers+ >>> unsubscribegooglegroups.com or reply to this email with the words >>> "REMOVE ME" as the subject. >>> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> >> To unsubscribe from this group, send email to android-developers+ >> unsubscribegooglegroups.com or reply to this email with the words "REMOVE >> ME" as the subject. >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > > To unsubscribe from this group, send email to android-developers+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

