Jan132010

Halo 3 & the Joke That is Bungie Studios

bungie-halo Firstly, gaming is not something i take seriously, however i do like getting the achievements on the XBox 360. Now, achievements are a great way to get people to keep playing a game after they have usually finished doing everything else the game has to offer, Halo 3 being one of the games with the most gamer score up for grabs and the most achievements.

As you may or may not know, the Achievement descriptions can sometimes be a little bit blunt and only contain a short description of what you have to do to obtain this achievement.

A couple of days ago, Me, a friend, and a few of our family members decided to have a few games on Halo 3, we created a party of 8 and joined in a social matchmaking game. All is well, the lobby we was in has a maximum of 16 players, yet we didn’t get matched up with anyone (pay attention to this) . So, there is only us 8 in the game, fair enough, its a social lobby, nothing in there effects any ones rank and so on.

So while were playing, a few of us with live accounts unlocked some achievements… fantastic… or not, because shortly after we were presented with a continuous message popping up telling us our accounts and XBox 360 consoles had been banned from earning experience for 2 weeks. Annoying as hell as we had not done anything wrong.

I created a topic over at Bungie’s forums, and after being greeted by the usually halo 10 year olds with there “hard talk” and “l33t” status, a bit of information finally came out.

Firstly, the system auto bans people who seem to be doing “too well” or benefiting “too much” from a game. Another reason given is that if there are “dead sticks” for example, people not moving, you will get banned.

Now, according to Bungie, me, my friend, a bunch of kids and my friends wife should all be aware of this. They say we should KNOW these rules. My point to them was, how the hell would we know? The impression i got is that everyone is born a Halo geek, and we are all taught the basics of Halo game play when we enter this world.

So all that aside, people with some knowledge and actual intelligence start to comment in the topic i made expressing their opinions, and a few valid points where made. Why would Bungie ban us for playing a family game and doing nothing wrong and effecting nobody, when there are Network manipulators out there, “boosters” and hackers / modders actually changing how the game works.

Answers? no, the topic got closed because “the trolls have come out” (their words) some people speak up, they end the topic and cut of discussion. Way to go Bungie!

They also decided to hide behind the “its in the XBox terms of service” (which apparently everybody with an XBox reads) saying it states you cannot cheat to get achievements. I’m sorry… but where did we cheat? The mythic achievements state that you should do a certain task (for example 5 shotgun kills) on a mythic map, in either ranked or social playlist.

We did this, we was in a social game and we got them legit. No where does it state that you cannot have a game containing all your own friends AND, remember what i said before about not being matched up with anyone else, well, if they didn’t want the achievements to be obtained this way 1. Why make them obtainable in a social playlist, 2. why did we not get matched up with anyone, there was 8 of us in a size 16 playlist with over 6,000 people playing in there.

Now, were not to bothered about not being able to earn experience, we play for fun, not to be respected by a bunch of kids who live for Halo, to be honest, we don’t give a damn. I do care about morals though, which Bungie seem to be lacking.

The fun doesn’t end here though, we decided to play again today, social 8 player again as the kids enjoyed it last time. Again we didn’t get matched up with anyone, and after a few games, guess what? We have a whole bunch of new messages popping up saying our accounts and consoles have now been banned from matchmaking altogether! which means we can no longer play Halo 3 online.

I don’t swear a lot on my blog, but FUCK YOU BUNGIE, seriously, banning us and a bunch of kids for playing a social game, seriously, what the fuck. Bungie seriously need to re think there auto banning, because it takes the piss, if they don’t want us to play like that, or don’t want people to go the toilet in the middle of a game, they should boot players out of the game who don’t move for so long, or quite simply MATCH OTHER PLAYERS UP.

No, that’s not the case though, Bungie would rather ban innocent people playing their game because they themselves lack the intelligence to make a system that fucking works properly.

Fuck the hackers and manipulators and people cheating in ranked matches effecting other people, totally ban a bunch of innocent kids having fun and harming no one.

I’m seriously starting to think those “l33t” 10 year olds from the forums i was talking about earlier actually run Bungie Studios because as far as I’m concerned, we didn’t cheat, we played a feature that is openly available to every single person, there was no detailed information on how to get these mythic achievements and i don’t know of ANY other game who bans you from playing it because you got an achievement in a different way to how the developers intended. If you ask me, if the achievements are not meant to be obtained this way, its a bug in the game, which leaves only Bungie to blame.

Anyway, rant over, i finished the game, i have all the achievements, i have no reason to play it again and i WILL be getting my money back for the game. Only reason we played it was for a bit of fun, the kids at Bungie though have taken the fun out of it. Its a video game and that’s all these is to it, they seem to think its some big important religious icon or some crap.

Oh and a bit of advice for anyone else who has any complaints they want to put forward to Bungie… don’t bother, they don’t care, chances are they will find a way to ignore you, cut your topic off or whatever and hide behind some technical crap from the XBox live terms of service which no one reads anyway.

Here’s the whole topic if you want to check it out http://www.bungie.net/Forums/posts.aspx?postID=40340052

Until next time people

VN:F [1.9.3_1094]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)
Mar272009

Bouncy Xbox LIVE Gamertar GD code explained

If you don’t already know Bouncy Xbox Live is a new script from BouncyServers which allows your community to add there Xbox Live gamertag to your forum so that your community can easily find and play games with other members.

One of the cool features which was included with Bouncy Xbox Live was the Gamertar. This was basically a small dynamic avatar image which was generated on the fly using a background image and the members Xbox Live avatar. This meant that because it was generated on the fly, the Gamertar would always display the gamers latest avatar style such as hair, clothes and facial features.

To the left you can see my current gamertar, this will automatically change if and when i update my Xbox live avatar. This uses the default Bouncy Xbox Live Gamertar background with a grey border and a golden glow.

Onto the technical stuff.

The gamertar is generated using 2 PHP functions and the GD image library.

The first function is called create_gamertar()

function create_gamertar ()
{
//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this->ipsclass->input['tag'];
$gamertag = ereg_replace("[[:space:]]+", "%20", $gamertag);
//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng("{$this->ipsclass->vars['img_url']}/bxbl_images/gavbg.png");
$img_b = "http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png";
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}
//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this->imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);
//---------------
// Output Images
//---------------
header("Content-Type: image/png");
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);
}

pretty straight forward function so lets go over each step

First of all

//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this->ipsclass->input['tag'];
$gamertag = ereg_replace("[[:space:]]+", "%20", $gamertag);

as mentioned in the quote, this fetches and cleans the gamertag, this has to be done firstly because gamertag’s can contain spaces between characters, and secondly because sometimes i like to obey the standards. So this function first of all saves the members gamertag in the $gamertag variable and then converts any spaces to %20 so it would turn “Anthony Kinson” into “Anthony%20Kinson”.

The next piece of code…

//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng("{$this->ipsclass->vars['img_url']}/bxbl_images/gavbg.png");
$img_b = "http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png";
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}

OK, so nice brief explanation. img_a grabs the Gamertars background image i previously mentioned from the forums skin directory (this allows a different background for each installed skin) and img_b retrieves the members avatar using the previously formatted gamertag.

After this the avatars width and height are edited, this allows us to shrink the avatar so it fits in the Gamertar. The next block of code sets the new dimensions maintaining the aspect ratio.

//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

The above code then resample’s the image whilst maintaining aspect ratio and pixel transparency within the png. This lead to a problem and the creation of the second function imagecopymerge_alpha(). As it goes, when you merge 2 images using GD in PHP specifically PNG images, the transparency is lost, resulting in a solid black background being applied to the avatar image, the problem with this is that it just creates a cropped avatar with a black background and the gamertar background is not visible.

//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this->imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);

This is where the above bit of code comes into play. This bit of code then sends our avatar to the imagecopymerge_alpha() function with all the data needed.

So, here is the imagecopymerge_alpha() function…

function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct){
if(!isset($pct))
{
return false;
}
$pct /= 100;
//---------------------------
// Get Image Width And Height
//---------------------------
$w = imagesx( $src_im );
$h = imagesy( $src_im );
//-------------------------
// Turn Alpha Blending Off
//-------------------------
imagealphablending( $src_im, false );
//-----------------------------------------
// Find The Most Opaque Pixel In The Image
//-----------------------------------------
$minalpha = 127;
for( $x = 0; $x < $w; $x++ )
for( $y = 0; $y < $h; $y++ )
{
$alpha = ( imagecolorat( $src_im, $x, $y ) >> 24 ) & 0xFF;
if( $alpha < $minalpha )
{
$minalpha = $alpha;
}
}
//----------------------------------------------------
// Loop Through Image Pixels And Modify Alpha For Each
//----------------------------------------------------
for( $x = 0; $x < $w; $x++ )
{
for( $y = 0; $y < $h; $y++ )
{
//-----------------------------------------------------
// Get Current Alpha Value (Represents The Transparency)
//-----------------------------------------------------
$colorxy = imagecolorat( $src_im, $x, $y );
$alpha = ( $colorxy >> 24 ) & 0xFF;
//--------------------
// Calculate New Alpha
//--------------------
if( $minalpha !== 127 )
{
$alpha = 127 + 127 * $pct * ( $alpha - 127 ) / ( 127 - $minalpha );
}
else
{
$alpha += 127 * $pct;
}
//-----------------------------------
// Get The Colour Index With New Alpha
//-----------------------------------
$alphacolorxy = imagecolorallocatealpha( $src_im, ( $colorxy >> 16 ) & 0xFF, ( $colorxy >> 8 ) & 0xFF, $colorxy & 0xFF, $alpha );
//---------------------------------------
// Set Pixel With The New Colour + Opacity
//---------------------------------------
if( !imagesetpixel( $src_im, $x, $y, $alphacolorxy ) )
{
return false;
}
}
}
//---------------
// The Image Copy
//---------------
imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
}

There is no point in me going over each detail of this function, it pretty mush stays the same however you use it. As you can see from the code quotes it basically finds the most opaque pixel and then calculates the new alpha blending. After which it is returned back to the create_gamertar() function. and is output through the following final piece of code

//---------------
// Output Images
//---------------
header("Content-Type: image/png");
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);

Above again is pretty simple. It just sets the output content type, in this case, its a PMG image.

This code can be pretty much be used stand alone, of course though, you will need to create some sort of switch or post info so for example the URL http://yoursite.com/gamertar.php?gamertag=Anthony%20Kinson would set the gamertag to be used as Anthony Kinson something maybe like $gamertag = $_POST[‘gamertag’];

its completely up to you how you go about it, but these are the basic principles to how the gamertar is created.

VN:F [1.9.3_1094]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)