Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by shaun » Wed, 17 Mar 2010 23:16:07 GMT


Sponsored Links
 e are considering the use of Scoreloop (http://www.scoreloop.com/) to
add a social component to our games and apps. Since we have no real
experience in that arena, I'll just leave this link as my
contribution.

On Mar 16, 8:08pm, Kevin Duffey <andjar...@gmail.com> wrote:

--



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Wayne Wenthin » Thu, 18 Mar 2010 01:08:08 GMT


 n my Game I actually display the Hiscore as a webpage.  This allows it to
be shown on my website also. I generate it once an hour since it was taking
way to long to display otherwise. I have since revised my code and I could
update ever 15 minutes.

Ads: If you have a game that users spend enough time in ads can indeed
create some cashflow. Now are you going to live off of it? That's an
unknown. I make a bit on my ads. Its not going to pay my bills but it is
better than nothing.

Free with ads vs. Paid. I went with ads because my game is in progress. I
have had many people say they would pay for it. I personally feel that
since this is a labor of love I don't want the stress of having to deal with
paid application support. I give good support because I want them to stay
in the game and support me that way.

While my game is Mulitplayer its not very real time. Everything is done via
restful services.

On Tue, Mar 16, 2010 at 5:08 PM, Kevin Duffey <andjar...@gmail.com> wrote:

>


Sponsored Links


Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Mario Zechner » Thu, 18 Mar 2010 01:21:09 GMT


  use a simple MySQL database on my server combined with some simple
php scripts that use salted md5 hashes to verify the authenticity of a
submitted score. In the game i only display the top 10 scores for each
level. Communication with the server is done via Http Posts. I do
that via OpenGL, i'm not using any Android GUI components. I don't
have achievements as of now and i'm currently to busy to implement
them. Then again, the game is probably more about finishing a level
than getting a high score or achievements :)

On 17 Mrz., 18:07, Wayne Wenthin <wa...@fuligin.com> wrote:
> >



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Robert Green » Thu, 18 Mar 2010 01:25:37 GMT


 ince no one else has responded I'll talk about what I did, though I
haven't gone cross-platform yet (which is why I didn't respond right
away).

I chose cross-platform technologies just in case I ever wanted to and
I know that they will work for it. What works well for me for my
leaderboards and turn-based multiplayer code is to use Ruby on Rails
with JSON as the encoding. It's supported natively by rails and
Android comes with JSON parsing and encoding. It's such a simple
protocol that one could easily write an encoder/decoder for any
platform, though I don't think you'd have to because I'm sure one
exists for almost every one.

There are many routes to go that will work fine, including having an
XML-based service. I'd stay away from things like Java Object
Serialization. That is not easily portable. I'd also stay away from
technologies like SOAP and WS. They are heavy and you want to keep it
light and simple usually on a phone and small server / high traffic
setup.


My first recommendation is to use Ruby on Rails / REST / JSON for your
basic server.

How it works:
Rails runs either as a plugin to apache via Phusion Passenger or
standalone via mongrel/other server apps.
Clients make requests using REST, which means HTTP Get Post Put and
Delete which query, insert, update and delete respectively.
The requests and responses are encoded in JSON, which is a simple
encoding, human readable and extremely fast to parse.

Advantages:
Any platform can implement a client for it.
It's very light and fast.
All of the necessary tech is inherent in rails and so this provides a
very low-resistance coding path.
Passenger (the apache plugin that runs RoR servers) runs great and is
easy to deploy and uses your standard web server.
You can actually easily run a game core written in Java wrapped with
the RJB (Ruby Java Bridge) - I do this for Wixel

Disadvantages:
Another language to learn (though I don't mind working in it at all,
it's really kinda nice)
Doesn't handle native code well (if you have a game core in C/C++ that
you need to access, it's a little tricky with Apache/Passenger/Rails)
Is only good for scores/leaderboards and turn-based games. You can
only update as much as you can push HTTP requests and process
responses. It's not good for real-time games requiring faster than a
second or two turnaround, though it can handle scores and accounts for
them fine.

If you want a cross-platform real-time game server, that's pretty much
what you need a robust game engine for. Most real-time games have
their own protocol and are inherently cross-platform because of that.
I'll be porting my engine this summer and designing it to be cross-
platform. Issues to overcome when going cross-platform are: Sound
handling, Image loading and processing (can't rely on your OS for that
anymore), Font loading and text drawing, How input is handled, How the
video context is created, Menuing systems, Networking, etc..

Basically you can't depend too much on any one convenience of a
particular OS and you kind of have to design the system so that you've
abstracted out the "connectors", that is, the input and output in the
form of user input in (touch/key/network/etc), sound, music, graphics,
vibrate, lights and network out. Each mobile OS will have a
particular set of hoops to get the connectors in.

With that said, many people would probably rather go with a solution
like Unity w



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Justin Giles » Thu, 18 Mar 2010 01:37:56 GMT


 ust to throw it out there...

There's also Google Apps Engine: https://appengine.google.com

It's java or python based (your choice). The free quotas are rather
generous. I keep my high scores stored there for my apps and for one of the
apps I have over 75000 active installs and I have yet to go over the free
quota. You do get charged if you go over your quota, but the rates, in my
opinion, are reasonable. Same basic idea as the MySQL and Rails
suggestions.

No, I'm not a Google fanboy, but with a free device coming sometime soon, if
Google asked me, I'd sheepishly say yes sir, yes I am a fanboy :).

Justin


On Wed, Mar 17, 2010 at 11:25 AM, Robert Green <rbgrn....@gmail.com> wrote:

>



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Kevin Duffey » Thu, 18 Mar 2010 02:03:43 GMT


 ey all, hoping more will join in on this. I am curious from a few replies
on some things.

First, for services like ScoreLoop, what does it cost, as a game developer
to use? I found an apple only service called OpenFeint that used to charge
but apparently is no longer charging.

As users of services already out there, not sure for Android anyway, but it
seems for iPhone you have to use their SDK to access their service. What is
it like, if anyone has used service SDKs, to use? From the few snippets I've
seen it seems like there is a bit to do to make it all work.

How about security? As a developer, do you have to get some sort of API key?
Is it done over SSL/TLS, or both an API key and SSL/TLS? I am wondering how
invovled the process is to get set up to actually use one of these
services... or for those of you that wrote your own, what do you do to
ensure it's your game calling the server side, and not some hacker or
another game trying to use it for free?

And an off topic question.. I see more and more people talking about getting
a free phone from google? Is there some place you sign up to get this? I'd
love to get a Nexus One to test on... sounds like some people are getting
just that.. a free phone to test on?

Thanks again all. More to come I hope.

On Wed, Mar 17, 2010 at 10:37 AM, Justin Giles <jtgi...@gmail.com> wrote:

>>



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Wayne Wenthin » Thu, 18 Mar 2010 02:07:06 GMT


 ecurity on my game is pretty much handled by the userid that is assigned
and the RoR backend. Unless you are decrypting the stream from the phone
you are pretty much assured that no cheating is going on. And honestly its
just a game. If the JSON is not formatted properly nothing is going to
happen. If I can't find you in my DB nothing is going to happen.

On Wed, Mar 17, 2010 at 11:03 AM, Kevin Duffey <andjar...@gmail.com> wrote:

>>>



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Kevin Duffey » Thu, 18 Mar 2010 02:11:52 GMT


 haun,  I looked at ScoreLoop, like most other services, it seems to be
iphone only at this time. There is some sort of android social api that can
be asked about.. have you looked into that? Does that provide scores, etc?
Or is it just an android/java sdk that provides social aspects for games?

On Wed, Mar 17, 2010 at 8:15 AM, shaun <shashepp...@gmail.com> wrote:

>



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Mario Zechner » Thu, 18 Mar 2010 02:15:53 GMT


 gt; How about security? As a developer, do you have to get some sort of API key?

As stated in my post all data is submitted with an accompanying salted
md5 hash which the server can reconstruct. What you basically do on
the client is construct a string out of your data, salt it by
concatenating it with another string only you know about and then
calculate an md5 hash from that. On the server you also construct a
concatenated string out of the send data and salt it with the same
string you use on the client. If the md5 hashes match the data is
coming from an original client, if not someone is trying to hack your
server. Reengineering the salt string by sniffing the transfered md5
hashes is possible to my knowledge, however you'd need a shitload of
computing power to do so (and i really mean a shitload). Nobody has
the resources to do this and nobody is probably going through the
hassle to crack your game server anyways :)

I don't say that this is the perfect method, but it worked well for me
and a couple of my friends in various projects.


--



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Robert Green » Thu, 18 Mar 2010 02:31:19 GMT


 1 to Apache -> Phusion Passenger -> RoR -> JSON

On Mar 17, 1:08pm, Wayne Wenthin <wa...@fuligin.com> wrote:

--



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Justin Giles » Thu, 18 Mar 2010 02:33:44 GMT


 > And an off topic question.. I see more and more people talking about
Please see the following thread:



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Kevin Duffey » Thu, 18 Mar 2010 04:59:51 GMT


 Hi all,

Robert, I think we spoke on another thread a while back.. forget now. I am a
JEE guy, tried RoR, couldn't stand the language syntax and how slow, for
most things it was. I know I know.. RoR is often cited by java developers as
being much faster to build apps with, etc. I just don't find it to be true,
for me. The language reminds me too much of perl and I never liked that.
Java, C, OO Pascal, even Basic, just seems to make more sense as a language
structurally. I've also tried OBjective-C and find it to be much harder to
work with than C/C++. I don't know why.. I just can't remember all the
little nuances of the language, like the hyphen on lines, etc.






> 



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Kevin Duffey » Thu, 18 Mar 2010 05:27:51 GMT


 ey Mario,

Thanks for the replies. So your salted md5 hash, do you generate one for
each player, or just one for your game, that is sent in with every
request by each game player (via your game code)? So this secret that you
concatenate, you hard code it in both the game code and your server code?
So some string like abcd123, append it, md5 the whole string, then send it?

I have been using SHA-1 for playing around, using the Java SDK api that can
also be used for MD5. Any benefit in using MD5 over SHA-1? I thought
SHA-1 was more secure/harder to crack?

I agree with you.. the chances of anyone sniffing the packets, figuring out
its game data, trying to decipher it, and for what purpose anyway.. is
unlikely.
However, for some reason, companies tend to shy away from anything that
isn't super industrial strength secure. I am also curious because I may want
to
allow the game player the option to use real currency in game to buy game
items. That may require a game player to set up some sort of credit card or
paypal account... not sure yet how this all works, but because of this there
may be a need to be "more secure", such as using TLS. What do you think?


On Wed, Mar 17, 2010 at 11:15 AM, Mario Zechner <badlogicga...@gmail.com>wrote:

>



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by mike » Thu, 18 Mar 2010 05:39:02 GMT


 

Hey Mario, Thanks for the replies. So your salted md5 hash, do you generate one for each player, or just one for your game, that is sent in with every request by each game player (via your game code)? So this secret that you concatenate, you hard code it in both the game code and your server code?
I would hope that people don't do that. It can trivially be reverse engineered.
So some string like abcd123, append it, md5 the whole string, then send it? I have been using SHA-1 for playing around, using the Java SDK api that can also be used for MD5. Any benefit in using MD5 over SHA-1? I thought SHA-1 was more secure/harder to crack?
While these are pretty low stakes, there is simply no reason to use MD5 in this day and age. MD5 has known weaknesses (for about 10 years). SHA1 has recently (in the last couple of years) been shown to have weaknesses, but nothing as severe as MD5. NIST, et al are working on a replacement for SHA1, but lots of people have been using/implementing SHA256 in the interim. Frankly, unless you're doing something like line rate crypto, considerations of performance are immaterial. Use SHA256 if it's available, and SHA1 if it's not. Mike, an author of RFC4871 who knows a thing or two about this subject (unfortunately) --



Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

by Greg Donald » Thu, 18 Mar 2010 05:39:21 GMT


 On Wed, Mar 17, 2010 at 4:05 PM, Jason Proctor



You're certainly entitled to your opinion.

I've been in web development since '96 and I've used Perl, PHP,
Python, and Ruby, all to great lengths:

 http://destiney.com/ 

I think Ruby is by far the best there is in the scripting language
world.  I know of no faster way to build a site than with Rails.  In
genetics research where I work, time and again I've completed entire
sites in a third or half my allotted time.  When I bid side projects
my Ruby/Rails estimates are usually 60% that of my PHP or Python
estimates (I don't do much Perl anymore).  I can do this because Ruby
and Rails allow me to get lots more done in less time since I simply
write much less code.  At this point I would never build a new site in
anything but Rails if I didn't have to.


-- 
Greg Donald
destiney.com | gregdonald.com

--



Other Threads

1. Desire NexTSense Official Sense-FroYo 2.

Ditunggu updatenya oom..

--
Powered by Google with HTC Sense
 > Review batere v2.1b..tahan 17jam..mantab..




720p
ROOT**Market
&
>>>> 

2. Thanks, worked perfectly

Thankyou. Solved the problem. Strange the demo program got this wrong
as well ...

Peter Webb






> > 

3. HTML 5 Camera access

4. LVL returns LICENSED with anonymous accounts...

5. adding a splash screen to an APK

6. LVL - live test

7. SensorManager stop working after sometimes