Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I am in the final stages of developing an indie C# mobile game that I will deploy to iPhones and Androids using Mono. I wish to add push notifications and a Facebook leader board feature into the game, such that the user will be presented with a list of all his/her friends that are playing the game and their weekly scores in the main screen.

I have ZERO experience with web development/networking/databases. I recently started researching the field and formed a basic understanding. Facebook has SDKs in PHP, JavaScript, obj-c and java, tho reading the documentation examples still feels cryptic to me since it involves web/server tech. After researching some more, I understood that my options for server side are basically PHP or ASP.Net. It seems that ASP.Net is more favorable in my case since I am already proficient with C# (but there is no SDK from Facebook... I am not sure if this implies that I cant interact with Facebook using ASP.Net). On the down side some have mentioned higher costs for ASP.Net, tho I havent looked further into that aspect yet. I also understood that JavaScript is client side technology.

I started going through tutorials of ASP.Net, I was thinking that ASP.Net is a purely server side management language, but it started feeling more like WPF as those tutorials started getting into very lengthy discussions about creating website interfaces and styles. I am not interested in that, I just want to have a web server which my app can somehow communicate with and get friends/scores. Am I learning the right technologies for my goal? should I be learning something else?

I am posting this in hopes that someone who knows this field well can see through my problem and help guide me, otherwise I could spend months studying something that might not be the right solution to my goal. Thanks.

share|improve this question

put on hold as too broad by MichaelT, Scant Roger, gnat yesterday

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

You can use OpenFeint from Unity3D. However I'm not sure if you want to use Unity, or if you can access OpenFeint without Unity. – bobobobo Sep 11 '12 at 18:45
any updates or progress reports? – Malachi Oct 23 '12 at 18:27
ya, I am hosting my SQL database as a restful service over the web. And will communicate with Facebook without any SDK, but directly use HTTP get and so on. – TrueGrime Oct 23 '12 at 19:36

3 Answers 3

One consideration is to query Facebook directly from the game or mobile phone instead of standing up a server. This will provide the best performance because these requests go directly from the user's browser or the game to Facebook, without any intermediary.

You can simultaneously or alternately query another (your own) server. Web API may be a natural choice for creating a lightweight API and is available in MVC 4.

In either case, you will want to create a facebook application and review the Facebook C# SDK. While this SDK is not an official Facebook release, it is undergoing active development and has received over 1.7 million page views and 120,000 downloads. Be sure to look at the Facebook.MonoTouch example.

Also, you can presently get limited free cloud hosting for .NET at Appharbor.

(See more on facebook apps)

share|improve this answer
Thanks for so many useful bits in ur answer. As for your first paragraph, I need a server because I want to store highest weekly scores, manage a leader board, ranks, push notifications and so on. As for the C# FB SDK, their platforms dont seem to include the iPhone or Android, so I guess I can only interact with them from a web server. Honestly right now I still dont have a real understanding of the whole process. I am only guessing that the login must occur thru the phone, and then an ID would be sent to my server and it'll send back relevent info... not sure – TrueGrime May 17 '12 at 22:50

I too am also Creating a Game using XNA. I created Classes in C# to Create, Write to, and Read From an XML File for my High Scores list. my High scores list is only 10 deep though. you could do it that way, it would be more compatible with different platforms that way, as long as you create a schema for your XML Document.

or you could use a SQL Server Database to hold the High scores or a MySQL Database depending on the server that you choose. if you are writing in C# I would recommend SQL Server, but if you go with PHP then MySQL.

you want to be looking at .NET applications and not ASP.NET applications. ASP Stands for Active Server Pages, which is mostly associated with Web sites or Web Applications. and you are creating a program for a specific OS and not a web application. you will need a connection to a server and/or databse to either 'Serve' the high scores via XML or Via SQL Database.

I am a bit Confused why you would use Microsoft products to program for Apple and Android Devices.

Android apps are normally Created using Java, which is very similar to C#. I believe that Apple apps are also created using Java, I haven't ever programmed apps for the iPhone.

you should also port your game to the new Windows phone while you are at it because you are already halfway there using ASP.NET and if you are one of the games that is on the new Windows phone when it hits stores you could be rich.

I hope this helps a little bit, I felt like I was kind of Rambling a bit.

share|improve this answer

For making a game in c# for multiple platforms Unity3D is most popular now a days. And for integrating Facebook leaderboard or any type of leaderboard, saving user scores fetch scores, it is more efficient to direct communicate with a cloud service instead of making your own server, database etc. This will be more effective for your game performance.

Have a look on this blog post, which contains the simple step by step process for creating a Unity Facebook Leaderboard App.

share|improve this answer
This post reads more like a link promotion for a blog than an answer. Can you please put the information here, with the blog post at best being used as a source to quote from (sparingly)? Also see the help center section on self-promotion; without disclosure I am going to assume that you wrote that blog post or have a stake in its promotion. – Martijn Pieters Feb 13 at 11:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.