Favicon Browser game

07:24PM Apr 23, 2009 in category Hello World by Alexander Pirsig

Wie cool ist das den eben war ich auf der Suche wie man Favicons über html einbindet als ich das hier auf wikipedia gelesen habe.

Mittlerweile existieren bereits Spiele, die komplett im Favicon des Browsers realisiert werden. Die Pionierleistung erbrachte der französische Webentwickler und Designer Mathieu Henri. Das kleine Remake des Arcadespiels Defender ist in JavaScript geschrieben.[1] Der Code erzeugt jeden Frame des Spiels in der Favicongröße (16×16 Pixel). Anschließend wird er in ein PNG konvertiert.

Ein komplettes Spiel als Favicon in einem Browser ;) ... L0L das ist ja mal cool.... spielt es einfach mal selber auf http://www.p01.org/releases/DEFENDER_of_the_favicon/

Kommentare[0] Tags: browsergame javascript game favicon

Quick Guide to use FirePHP + FireBug Console

09:30PM Apr 16, 2009 in category PHP by Alexander Pirsig

This is a quick guide to use FirePHP + Firebug to write debug output to firebug console. FirePHP is a Log-Appender for firebug console. With this piece of code you write php debug output directly to firebug console.

The requirements

So let's get started for beginning you need four things: After you've installed firephp and firebug in firefox, you have a "small bug icon" in the lower right corner that looks like this.

Netconsole settings

Next we're go to the test site and activate firephp. So type in http://labs.pirsig.net/firephp/firetest.php click on the Firebug icon. Next click on the Net-Tab and activate the "console" and "net" checkbox.

Net-Console Output

Next Click on "Console" and reload the site you should see some debug output in firebug console.

Testside PHP-Code

Enclosed is the php code for the testside
// Include FirePHP OOP Class
require_once("FirePHP.class.php");

// Define a Global DEBUG flag
// This should probly go to a central place
DEFINE(DEBUG,true);

// Get a instance the true automaticly create's
// an instance and makes sure there is only one
// registered (singleton)
$fb = FirePHP::getInstance(true);

// Array's with firephp configuration
//
// maxObjectDepth      Maximum depth to traverse objects.
// maxArrayDepth       Maximum depth to traverse arrays.
// useNativeJsonEncode Set to FALSE to use JSON encoder included
//                     with FirePHPCore instead of json_encode().
// includeLineNumbers  Include File and Line information in message.
// Defaults:
$options = array('maxObjectDepth' => 10,
                 'maxArrayDepth' => 20,
                 'useNativeJsonEncode' => true,
                 'includeLineNumbers' => true);

$fb->setOptions($options);

// Define to control global debug input output
$fb->setEnabled(DEBUG);

// Displays different kind of log output
$fb->log('Hello log');
$fb->info('Hello info');
$fb->warn('Hello warning');
$fb->error('Hello error');

echo "Normal site output";

Related sites

Kommentare[0] Tags: labs firephp javascript console debug php firebug error-handling