I still have to come up with a good title..

..and a good header too (and yea, it's a template.. bababa..)
  • Subscribe
  • HOME
  • Lucas
  • Showcase
  • Cool Stuff
  • Eco
  • Gaming
  • Ad Campaigns
  • Work in Progress
  • Work
  • Things to do before to die

Halo Reach API, a crash course!

admin | April 16, 2011


Halo Reach API

Every day is potentially a coding day! ..But today there was a South Park marathon on tv, so some sofa coding in da kitchenz was a must.
Perfect occasion to start checking out the Halo Reach API, which allows developers to retrieve information about games and players from the Halo universe.
So yea, just for knowledge sharing sake, here a couple of links that supported me in the creation of that small dynamic banner in the sidebar, which automatically loads my current armor and rank using the Bungie.NET API.

First of all, HaloReachAPI.net has a great crash course, which will get you up and running in no time. It also contains what seemed to me to be the most detailed documentation out there.

In order to access the API you will need a valid API key. This key is unique, and can be easily obtained by any Bungie Pro subscriber registered on the Bungie.net forum. You can then use the key to make calls to the API, and juggling with the available methods you will eventually find out a way to obtain the info you were looking for.
In my case I needed the following two things:

  • Armor picture. Every player in the Halo universe can customize its armor. Ranking up grants access to unlockable equipment, keeping players constantly on the run to Inheritor. I will never reach that rank, but I do love the idea of a customizable armor, and it is very perceivable how this adds incredibly to the identity of an otherwise anonymous model. Your armor becomes your face, and sometimes even recognizing the helmet of that “MLG Pr0 Snip3z” guy entering a room can infuse terror on the lines of bootcamp-fresh noobs. Lol! :D
  • Rank. Everyone loves outranking members of the adversary team ! Prematch lobby psychological warfare i guess.. Some people fights for them, some farm them, and others eventually get them. I’m in the first and third category. So yea, pretty proud of my Brigadier badge.. :D

Allright, here how to obtain that info in PHP! First of all you’l need to make a call to the API:

$apiKey = ‘ultraSecretAPIKey‘;
$playerGamertag = ‘an evil morlok‘;
$url = ‘http://www.bungie.net/api/reach/reachapijson.svc/player/details/nostats/‘ . rawurlencode($apiKey) . ‘/’ . rawurlencode($playerGamertag);

Remember to substitute apiKey with your actual (secret) API key, and playerGamertag with the player whose info you’re trying to retrieve. According to the method that you are trying to call, the url will look slightly different. In this case I’m executing the GetPlayerDetailsWithNoStats method, which requires such a structure.

$output = file_get_contents($url);
$obj = json_decode($output);
if(!is_object($obj)) die(”Error parsing JSON response\n”);
if(!$obj->Player) die(”Player not found…”);

Here we execute the query to the API, convert it into a PHP object and validate it. If everything succeeds obj will contain whatever the method we called returned us.
And there you have it! You can finally very easily interact with the obj object and retrieve all the fields contained in it. In our case:

  • Armor: printf(”<img src=\”http://bungie.net%s\” />”, $obj->PlayerModelUrl);
  • Rank: printf(”<img src=\”http://www.bungie.net/images/reachStats/grades/med/%s.png\” />”,$obj->CurrentRankIndex);

..Enjoy!

  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
2 Comments »
Categories
Gaming, Work
Tags
api, halo, php, reach
Comments rss Comments rss
Trackback Trackback

Random acts of senseless nonsense

admin | September 3, 2010

  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
No Comments »
Categories
Work
Tags
wtf
Comments rss Comments rss
Trackback Trackback

How to waste a lunchbreak

admin | August 29, 2010

Yeah baby!

..you WILL buy that fotobog!


..this job would be so much more cool if we had just a bit more creative freedom.. :twisted:

  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
2 Comments »
Categories
Work
Comments rss Comments rss
Trackback Trackback

Search Engine Optimization 101

admin | August 25, 2010


I’ve been asked by a fellow coworker to give an eye to a site, and help optimizing it as to reach global search engine presence (or domination, if you allow me).

Tricky area, the website is about an hotel in a very turistic zone of italy, and even the name of the firm has to stand ground against competitors.
The main idea when I was contacted was to improve the ranking of the pages, increasing the chances of visitors clicking through, falling in love with the site, purchasing a long lasting idyllic holyday, and finally paying sweet dinero with which to feed the capitalistic inner greed of everybody involved with which to make everybody live a life freed by economic worries, contemplating the beauty of the Italian beaches while sipping a coconut flavored drink in the shadows of a palm tree (the famous palm trees that surround the zone of Venice).

I compiled a list of basic free techniques and good practices that could help these guys doing so. Nothing original, a nice crop and chop from different authors, with different experiences.
Even if I don’t expect it to be a sort of “magic checklist”, I find them useful info, and for sure there will be some webdeveloper out there that will make good use of it.

So, here we go!

Read the rest of this entry »

  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
3 Comments »
Categories
Work
Tags
search engine optimization, SEO, webdesign
Comments rss Comments rss
Trackback Trackback

Wooldees.com

admin | August 18, 2010

wooldees_com


Another Lukasz/Lucas collaboration! Wooldees.com

This is gonna be the portfolio of a fellow compañero.
Designed by himself, and implemented by myself, in a 6-hours performance of speedcoding and caffeine-driven-drum’n'bass-flavoured day of work.

The site is thought as a fast and clear way to show what this is all about, his works. No literal mambo jambo, no history of his childhood. Read the rest of this entry »

  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
No Comments »
Categories
Showcase, Work
Tags
portfolio, webdesign, wooldees.com
Comments rss Comments rss
Trackback Trackback

Bieguni.com

admin | August 14, 2010

Bieguni.com

I just stumbled upon a website that we made a while ago with a compañero:

Designed by Lukasz Wolniak, implemented by Lucas Gabriel.. a Lukasz-Lucas collaboration! :D

Visit Bieguni.com


  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
No Comments »
Categories
Showcase, Work
Tags
bieguni.com, multimedia, portfolio, webdesign
Comments rss Comments rss
Trackback Trackback

I FUCKING HATE TRANSLATORS

admin | August 11, 2010


WHAT THE FUCK IS THAT?! :evil:


  • Digg this
  • Recommend on Facebook
  • Share via MySpace
  • Tweet this
Comments
No Comments »
Categories
Work
Tags
translators, Work, wtf
Comments rss Comments rss
Trackback Trackback

Tag Cloud

3dsm adidas advergame campaign advergame advertising age distribution Alternate Reality Game ARG bababa demographics fail game game engine game platform gaming trends graphics greenpeace guerrilla marketing halo halo reach kitchen of wonders Lucas nestle oilspill overfisher planning portfolio preview problem statement prototype quote reach religion resource seashepherd sea shepherd second sprint steve irwin surveys unity unity3d video viral webdesign westra wtf

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Categories

  • Lucas
  • Showcase
  • Cool stuff
  • Eco
  • Gaming
  • Ad Campaigns
  • Work in progress
  • Work
  • Things-to-do-before-to-die

Find

@nti copyright - information for action - copy and distribute!