Keeping Up To Date with Numerous Games

For me, seeing changes in games and looking at changes that are upcoming are very important to me. They show ongoing development on a game, and may lead me to pick them up again.

Personally and more recently since I started working on my blogging I had a number of problems with this:

  • I play a lot of games, there are tons of sites and developers to follow
  • Many news sites had information about games I don’t want to know about
  • Existing mediums are too cluttered
  • I wanted something I could control on my own website

In this post I look at the new method I am trialing to keep up to date with news (and then use that to produce my blogs).

Existing Solutions

I use Raptr to track the games I play, I know it has a news feature for games that I play, but these can get bloated with too much repeated posts and non official sources.

Twitter is useful as notifications are instant and chronological, but this is swamped by too many other feeds that I’m following and if I’m not reading Twitter at that very moment it’s relegated to the depth of the scrolled page.

I’ve heard about aggregator’s like Yahoo Pipes and even Google Reader to some degree, but I want to include stuff on my website so I can monitor and manipulate it.

My Solution

Naturally people would point to the RSS feeds for the sites I like, and I have turned that way, I had problems with the different formats of the sites some were Atom and some RSS2.

Thanks to Google I found a nice code snippet from http://atom.geekhood.net/ that allowed me to convert an Atom feed into RSS which enabled me to run both feeds with the same code.

Below is what I currently use:

  • RSS and Atom feeds from my top games I want to follow
  • Arranged in descending order
  • Game Icon for instant source recognition – (anyone have a 32×32 px icon for Dominus?)
  • Link to the article, standard blue links for unread, purple for read – (not many sites do that anymore)

This solution allows me to see the news from the games that I want to see within a windowed time-frame, very useful.

Here is the code I used:

$feeds = array(
 'http://darkageofcamelot.com/rss.xml',
 'http://feeds.warhammeronline.com/warherald/RSSFeed.war?type=current',
 'https://wrathofheroes.warhammeronline.com/rss.xml',
 'http://www.startrekonline.com/frontpage/feed',
 'http://www.dominusthegame.com/rss/',
 'http://www.guildwars2.com/en/rss.xml',
 'http://www.tomspillar.net/includes/feedconvert.php?type=swtor',
 'http://forums.lotro.com/external.php?type=RSS2&forumids=3'
);
// Get all feed entries
$entries = array();
foreach ($feeds as $feed) {
 $xml = simplexml_load_file($feed);
 $entries = array_merge($entries, $xml->xpath('/rss//item'));
}
// Sort feed entries by pubDate (ascending)
usort($entries, function ($x, $y) {
 return strtotime($y->pubDate) - strtotime($x->pubDate);
});
for($x=0;$x < 15;$x++) {
 $item = $entries[$x];
 $title = str_replace(' & ', ' &amp; ', $item->title);
 $link = $item->link;
 $description = $item->desc;
 $date = date('l F d, Y', strtotime($item->pubDate));
 $type = "";
 $img = "";
 if (strpos($link, 'http://www.startrekonline.com') !== false)
 $img = './img/sto.jpg';
 else if (strpos($link, 'https://wrathofheroes.warhammeronline.com') !== false)
 $img = './img/woh.png';
 else if (strpos($link, 'http://herald.warhammeronline.com') !== false)
 $img = './img/war.png';
 else if (strpos($link, 'http://darkageofcamelot.com') !== false)
 $img = './img/daoc.jpg';
 else if (strpos($link, 'http://www.dominusthegame.com') !== false)
 $type = "DOMINUS";
 else if (strpos($link, 'http://www.guildwars2.com') !== false)
 $type = "GW2";
 else if (strpos($link, 'http://www.swtor.com') !== false)
 $img = './img/swtor.jpg';
 else if (strpos($link, 'http://forums.lotro.com') !== false)
 $img = './img/lotro.png';
 
 if ($img != "")
 $type = '<img src="'.$img.'" width="32px" height="32px">';
 else
 {
 $type = '['.$type.']';
 }
 
?>
<div style="padding-bottom:0.5em;">
 <div style="float:left;padding-right:0.5em;"><?php echo $type;?></div>
 <div style="float:left;">
 <strong><a href="<?php echo $link;?>" title="<?php echo $title;?>"><?php echo $title;?></a></strong><br />
 <small><em>Posted on <?php echo $date;?></em></small>
 </div>
 <div style="clear:both;"></div>
</div>
<?php 
 }
 
?>

To convert from Atom to RSS I used:

<?php
$type = $_GET['type'];
$url = "";
switch ($type)
{
 case "swtor":
 {
 $url = "http://www.swtor.com/feed/blog";
 break;
 }
 case "werit":
 {
 $url = "http://www.weritsblog.com/feeds/posts/default";
 break;
 }
 case "bootae":
 {
 $url = "http://feeds2.feedburner.com/bootae";
 break;
 }
}
$chan = new DOMDocument(); $chan->load($url); /* load channel */
$sheet = new DOMDocument(); $sheet->load('atom2rss.xsl'); /* use stylesheet from this page */
$processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStylesheet($sheet);
$result = $processor->transformToXML($chan); /* transform to XML string (there are other options - see PHP manual) */
echo $result;
?>

I hard-code my feed URL’s just as a general security precaution.

– How do you keep up to date with your games news?

Advertisements