I'm working on an xbl stat grabber. I have a problem I dont understand how to get the "gamer card"
Heres an example : http://www.youtube.com/watch?v=6HA-uz_v6A0&feature=related
I already have the avatar but I don't get how you can grab the stats and recent games...
You need access to the Xbox Live API, I think you have to apply to Microsoft to get on their 'Community Developer' programme, although it's a bit hazy on the site as to whether they are accepting applications or not.
One kind fellow (who I think is a Microsoft employee) saw that this was a terrible oversight from his employers decided to offer as web service that plugged into the Xbox Live network so you can pull statistics down, you can find info about it and a website here: -
http://duncanmackenzie.net/Blog/put-up-a-rest-api-for-xbox-gamertag-data
It's very comprehensive and should give you all the data you need (Gamerscore, current status, last game played etc)
EDIT: Extra stuff that might help
I'm not too familiar with C# but the process of using the service would be to do the following in your application: -
Construct your URL with a/your gamertag as the argument
Use some URL/Networking API (C#/.NET must have something like this somewhere) to load the URL and retrieve the contents. This should return you a big string containing a bunch of XML
Parse the XML into your application using some sort of XML parsing API (again, I'd imagine C#/.NET has these things built into the framework)
From the looks of the program, the gamercard info looks as if it is just an embedding based upon the gamer tag. You can find info on embedding your Xbox Live gamercard here.
The video author said the Halo stat information is coming courtesy of a site called HaloCharts.com. I don't know if he is embedding the information, perhaps reading an RSS feed, or if he is extracting data from the HTML.
Related
I want to create a very simple online high score table for my recently developed game in Windows 8 (C# and XAML).
What's the easiest and fastet way to do this?
WITHOUT A DOUBT WINDOWS AZURE MOBILE SERVICES, and yes I'm shouting :)
All of the infrastructure you need is provided in the cloud, and you get a client SDK that makes recording the score literally a one-liner. Take a look a my blog post on doing exactly this (along with incorporating push notifications). The post covers an HTML 5/JavaScript game, but I think you'll easily be able to translate to C#/XAML.
Windows Azure Mobile Services is free*, you can get access with the Windows Azure 3-month trial offer, and after that expires you're service remains free (although you will pay for data, in your case probably $5 a month)
I would use HttpClient and simple PHP script that would be reciving scores with post method and second one that would be displaying these scores.
The first thing you need is a server that is up ALL the time and able to handle the traffic. I use Godaddy hosting. Its cheap and great service and easy to ftp to.
Next you need a php page.
The php page should grab GET data out of the URL regarding the score and user info
There are a couple ways you can implement the score recording.
1. You could have the receiving php page alter and sort a master file that contains a userid and score list
2. You could have the receiving php page save a unique txt file for each player id and stick their score in it. Then when your app calls for the scores it can pull all of the txt files and sort them on the phone.
Personally I prefer way one.
Finally you need a domain name that you can point your app too. You will need a directory for sending info and one for receiving.
I glossed over a TON of stuff. An experienced developer could do this in a day. To debug it though it would take some time. Good luck
If you're used to C#, build an ASP.NET MVC web application. You can develop and test this locally without going live. MVC may have a tough learning curve, but it's a great framework, and uses technologies you may already be familiar with as a C# coder, such as Linq. You need a database, and Visual Studio should help you get started with all of this.
You want a post or get controller action, with a url like http://server.com/scores/player1. An HTTP GET on that url could return the view of the scores, whereas a post to that url with parameters of, say, difficulty=easy and score=1100.
Your game client could use either WebClient (simpler) or HttpWebRequest for finer control. Build a class that encapsulates the scoring interaction, with a method that can get all high scores, and another method that sends a new score to the scoring server with args playername and score.
Get that up and going as a demo on your localhost, then maybe think about how to restrict players from posting their own scores, like having the game client authenticate with the server.
use service , or httpclient to update the score
Xbox live services have leader-boards support. Since you have a Win8 game you should look at this video from //build 2012 : Building Cross-Device Xbox Games, they get into useful details around 30 min into the video.
I've been using a class based on Hernan Amiune's library for the Facebook graph API to allow website user's to write to their friends walls from my code. With the recent February changes the Graph API method to do this is no longer available.
Apparently I need to use the Feed Dialogue now, but can I call this from c# code? Does anyone have a sample or an alternative I can use?
In short can I write to someone's wall on behalf of another user using server side code only.
In short can I write to someone's wall on behalf of another user using server side code only?
As of the February 6 breaking changes, you can no longer post to a user's friends' wall via the Graph API. This means you can't write on someone's wall on behalf of another user in any code language or SDK. You either have to use the Feed Dialog or use Mention Tagging or Action Tagging.
From the Facebook Developer Roadmap:
Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag).
Have you looked at Feed Dialogue info which details a nice simple javascript example and even simpler a direct url example, to convert either to utilise C# seems an extremely trivial task.
See A related answer
I'm trying to find a way to give my application a YouTube URL (as copied from the address bar in a browser) and extract the unique video ID from that URL. I want to stay away from regex or any other string manipulation as a solution since not all YouTube URLs are the same and may continue to change.
There has to be some way to use the YouTube API for .NET (specifically C# for my solution) to simply call a method/function, pass the method the URL for the video, and finally the method would return the video ID as a string.
I've been trying to find documentation on this and so far I can only find info on using methods to retrieve data about a video based on already having and providing the video ID - which I do not have at this point.
I recognize which part of the YouTube URLs identify the video, but the users of my application should not have to be concerned with that.
It would be greatly appreciated if anybody could help me find a solution here.
Thanks!
Unfortunately I do not think this will work. But then again, I don´t understand the problem you have with using the URL. The URL in itself is a kind of an ID and the v property of the URL specifies which video it is. It seems you already know this.
Regarding your problems with using an URL:
Not all YouTube URLs are the same
R: No, but it doesn´t matter because using RegEx you would only read the v property (v=-l6P7VFKnW8), alternatively the short be variant
YouTube URLs may continue to change
R: Yes, they may. However it is unlikely that YouTube would change the identifier anytime soon because of the effects it would have on API's and other infrastructure. Besides, if you have a pure and modular generic solution you wouldn´t have to change more than one RegEx to comply with the new Id.
Related: Youtube .NET Data API: Retrieve only videoID?
Related: C# regex to get video id from youtube and vimeo by url
I have a requirement to create a web based application, which is hosted on a intranet server(no internet access). This application will be used to keep track of various status over in the various geographical location, the locations are currently spanned within Asia.
I have read up on google map api, and it seems that it is against their policy to use their map offline. On the other hand, the custom markers is something that I am interested in. I am considering to make use of the marker concept to show the status of the area.
Hence sample example of the status can be denoted by having red as error, green as working properly, and this will be updated every 1 hour.
Any bros have done similar concept and will be willing to guide me? The offline maps is preferred to be free, however if a paid version proves to be useful, it can be considered.
Seems like you could use a combination of MapServer as mapping server and openstreetmap as data source (maps for asia are available, but it depends on the level of zoom, precision and update you are willing to work with) and OpenLayers to load, display and render your markers and data.
Links :
MapServer :http://mapserver.org/index.html
OpenStreetMap : http://www.openstreetmap.org/
OpenLayers : http://openlayers.org/
Notice : you can find .shp versions of openstreetmap for offline viewing and usage, free of charges, here : http://downloads.cloudmade.com/ , and here : http://download.geofabrik.de/osm/
And here is a MapServer Tutorial for C# mapscript (ASP .NET) : http://www.paolocorti.net/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/
Google Maps/Earth will only allow you to store 2Gb of map data locally. The API will not let you store any at all. There is no way to use the maps offline. However you can try downloading images from NASA World Wind: http://worldwind.arc.nasa.gov/java/ it is opensource.
I have a project that has a list of gps coordinates. I would like to find a way to make a simple map of those coordinates (possibly just one at a time). The map should have basic street info.
This part of our project is pretty simple so I don't think it needs to be an exceptionally feature rich product. This also means it shouldn't be really expensive.
What is a good product to achieve this?
edit: This is a desktop app where internet connectivity will probably not be available.
Google Maps is great for this.
If this is a desktop app with internet access you could still host an IE control and show it there.
EDIT: If this is a desktop app without internet access you'll have to buy something like Microsoft Streets & Trips. I don't know if it has reusable controls. You probably have to buy something more expensive to get that. Applications of this nature often fall under the category "GIS". Try searching Google for that.
Sharpmap is open source project written in C# and released under LGPL. To quote first line from page:
SharpMap is an easy-to-use mapping library for use in web and desktop applications.
I'd go with this solution
Map Rendering: SharpMap
Geometry operations: NetTopologySuite
Map data store: shapefiles in your file system or PostGis over PostgreSQL
Map data itself: the easiest way may be extracting from OpenStreetMaps data. Here, for example you can download shapefiles for your desired location
Everyting is open source (more or less, check the licenses) and works fine on windows.
Hope it helps
ESRI has an API. They have javascript, silverlight,wpf, and flash. they may have more. ESRI is pretty much the standard in mapping.