Archive for the ‘Multimedia Applications’ Category

Dj hero and gamepad companion

Saturday, October 31st, 2009

I got dj hero yesterday and though I’m finding the game quite hard on medium it’s still an enjoyable game. More importantly though I’ve managed to hook my ps3 dj hero controller upto my mac and using gamepad companion I’ve been ae to get the turntable controller to work (but it only reacts to the heaviest of pushes) the turntable uses the z axis to work and so has to be programmes to use multiple presses if you want it to do anything in GarageBand. Hopefully there will be an app that uses the controller at some point ( especially if I look at makin one :p). An interested side note is that it registers itself as a guitar hero 5 controller. This could mean that existing guitar hero 5 controller midi drivers may work with the turntable.

  • Share/Bookmark

PSN API (GetInfos)

Thursday, August 27th, 2009

A while back I was googling to see if any bright spark had come up with a way to get the trophy information out of the PS3. I had recently found an old tutorial on how to use xbox 360 achievement data to create a custom gamertag in Flash so I wanted to see if there was a Playstation based project. It turns out there is.

I found this post on the Playstation forums which led me to the GetInfos project. Using the data the project outputs you can get the PSN user’s trophy data, profile avatar, country and recent games they have played. I have a little example with some basic code over at http://gimpneek.com/downloads/psnapi/ Just type in your PS3 username and it will change the background color to RGB(255/number of gold trophies, 255/ number of silver trophies, 255/ number of bronze trophies), it will tell you the different types of trophy and then print the trophies out in a massive block of trophy glory.

I’m still deciding where to take this, A facebook app is an easy idea but I want to try and use it with processing to create some art.

The GetInfo’s project is run by Kilian Waser and the forums for the project are at http://api.geekweb.org/psn/community/?page=projects&item=3

  • Share/Bookmark

Woo First Subscriber :)

Saturday, April 11th, 2009

Just got an email saying someone’s registered to my blog, so a big thanks goes out to Blind Squirrel.

It’s nice to see something in my inbox once in a while that means people are actually finding me on the internet. On another good note I’ve finished the bulk of the Grow Your Own Human art and animation, meaning that I just got the coding and any more (minor) art to do for the site :)

That also means I can start on my Double Project and break out Cinema 4D and Quartz Composer and dive back into the loop again. Now where did I put those speedos

  • Share/Bookmark

Third MMA test

Saturday, March 7th, 2009

I’ve just put up another test, this time I’m letting you edit the xml file, so you can see how it works. To use it just enter a numeric value (preferably under 153 if you want it to stop, or above if you want the whole thing to play). It’ll screw up if you enter text! When you reload the page you will see the tree grow again, but it will stop when it hits the value you entered. I’m hoping to let you change other things as well such as colour of the tree in future tests. Though that might take a while, due to the fact I’ll have to draw it all. Anyways you can access it at http://www.growyourownhuman.com/tests/test4

  • Share/Bookmark

Second MMA test

Friday, March 6th, 2009

Following the last post, I noticed that it didn’t work too well when I increased the number soooooo a new test has been conducted and I know this one for sure works.

This test is using the xml data to make the ‘box’ wider so it looks like like a bar filling the screen. I’m going to be using this to run my plant animation. I also noticed in the last post that Wordpress is retarded and screwed up the PHP code I put it. Not of to a good start.

Anyways this test uses a localised xml file but you could just link it to the one you put up in the last example. So there’s no hit-counter script but at least this example works :)

You can download the files from http://www.growyourownhuman.com/tests/test3/source.zip

The XML file is the same as the last examples, this is the action on the first script

//XMLLLLLLLLLLLLL
// create an xml object
var hits_xml:XML = new XML();
// remove all spaces etc
hits_xml.ignoreWhite = true;
// is the xml file loaded?
hits_xml.onLoad = function(loaded) {
//well if it we want to do stuff dont we
if (loaded) {
//so lets make a new variable called hit, and we want it be a number, but use the value from a node as the number
var hit:Number = Number(hits_xml.childNodes[0].firstChild.firstChild.nodeValue);
//and then display that number in a dynamic text box
_root.number_hits = hit;
}
}
//this loads it
hits_xml.load("hits.xml");

And on the box movieclip (called boxxy) I added these actions

onClipEvent(enterFrame){
if(_root.boxxy._xscale < _root.number_hits){
_root.boxxy._xscale = _root.boxxy._xscale + 10;
}
}

So that's it lol


  • Share/Bookmark

First MMA test

Thursday, March 5th, 2009

Ok my first (proper) test is up, When I did my original test (Test 1) but due to me using a text file used as a hit counter for a website I made for a client. I couldn’t get the number from it, thanks to artifacts making it impossible. BUT!

If You have been visiting the main site, you may see that the file extension has changed from .html to .php . This is because I have attached a hit counter to the front page, every time you visit it the number in the hit-counter’s xml file is increased by 1. The test that I just made uses the xml file to grab the amount of hits the front page has received. This then changes the length of the tree in the test, for some reason the number of hits isn’t displayed on the test I’ve put on the internet though it works on my mac… weird.

Anyways Now for the COOOOOODDDEEEEEEE

Creating the hit-counter
There are 2 parts to this, you need to create a .php file and a .xml file, I’ll go over the .php file now
So create a new .php file (I called mine hitcounter.php) and copy this into it

/*so lets load the xml file */
$doc = new DOMDocument();
$doc->load( 'hits.xml' );
/*lets find the node in the xml file and get the existing value from it */
$hits = $doc->getElementsByTagName( "hits" );
$count = $hits->item(0)->nodeValue;
/* add 1 to the value and then change the value to the new one */
$counter = $count + 1;
$hits->item(0)->nodeValue = "$counter";
/*now save the file and tada it's updated */
echo $doc->saveXML();
$doc->save("hits.xml") ;
?>

The xml file consists of 2 nodes, the root node and the hits node, so create a new xml file and copy this into it.



13

So this has sorted out the hard part of it. Next is adding it to the front page (though you can add it to any page)

Adding the hit-counter to your front page
Create a bog standard html page, make it look pretty and then change the extension to .php .
Now go into your html file and somewhere in the body, add a new div.

include 'hitcounter.php';
?>


If you don’t want anyone to see it, just go into your CSS file and add a new identifier called #counter and set the display to Hidden.

Now for the flashy-ness
I downloaded this awesome tree growing animation from SWF Spot and added some sneaky little code in there which, grabs the number from the xml file and then stunts the tree’s growth based on that number. If you want to change it, just change the number in the xml file.
This is what I added

//XMLLLLLLLLLLLLL
var hits_xml:XML = new XML();
hits_xml.ignoreWhite = true;
hits_xml.onLoad = function(loaded) {
if (loaded) {
var hit:XMLNode = hits_xml.childNodes[0].firstChild.firstChild.nodeValue;
//trace(hits_xml.childNodes[0].firstChild.firstChild.nodeValue);
_root.number_hits = hit;
}
};
hits_xml.load("http://www.yourdomain.com/hits.xml");

The above part can be added anywhere as long as it’s not in a function

onEnterFrame = function () {
//Grow the tree while it is under 1000 branches
if (tree.length //clear the drawn tree in the previous frame
clear();
//Begin the recursive function drawSegment.
//Process the root branch, and start it at the 0,0 position
drawSegment(0,0,0);
}
};

In the above code, I changed the if (tree.length<1000) in the original to my hit variable so it goes on the value in the hit counter.

You can check out my test at http://www.growyourownhuman.com/tests/test2/ and you can download the source files at http://www.growyourownhuman.com/tests/test2/source.zip. The source code was made in CS3
Enjoy!

  • Share/Bookmark

MMA: Design

Saturday, February 28th, 2009

So I was thinking about how I want grow your own human to look, visually and I was flipping through some old sketch books when I came across the old speaker head images I made back in my first year of uni, the design is really flexible, and has the vector / street art charm that I want for growyourownhuman. I’m gonna look at the elements that the inspirational designs share. One aspect seems to be the lack of lines that break up the image, blocks of colours over laying each other, though Pete Fowlers designs seem to use slightly darker shades of the main colour for this. Still it’s early days yet so have to see….

  • Share/Bookmark

Lock and Load

Friday, February 20th, 2009

Today it was the second lesson of MMA and I showed Mark what I’ve managed to get going on growyourownhuman He was happy with my progress. He suggested that I spend the week designing how I want my humans to look (so I’ll be doing that, expect posts). I think I’m going to have to use an MySQL database as the hitcounter because the txt file I’m using as my tests won’t allow me to use the value for height /width/x-pos/y-pos etc. But more about that later…..

  • Share/Bookmark

MMA Week 1

Friday, February 13th, 2009

Ok So I’ve decided to change my idea for my MMA module, as I haven’t recieved any feedback from teh zed factory people I emailed. I’m going to be making a piece of internet art. I’ve just registered GrowYourOwnHuman.com and I hope to have a semi-working website within the next month. My idea is to have a website where the amount of hits it receives reflects the growth of a human baby. As the user visits the website they can vote for how they want it to look, in a way passing down their DNA. When a specific number of hits are reached the baby is then born and the person lucky enough to be the last one to visit gets to name the baby.

The user can then visit a gallery of the babies that have been created. The babies will also have birthdays every month so over the months the child ages. Over the next week I’ll be writing up a design document so I can put all the information in one document for everyone to understand

  • Share/Bookmark

Papervision3D: Bitmap material

Saturday, February 7th, 2009

One of the main problems I’m going to be facing with the website I want to make is textures. The shape of the building can only do so much to make an impression, you also need some colour. Today I managed to work out how to include bitmaps into my scenes, I’m hoping as time goes by I should be able to have bump maps and transparency maps so I can have windows and more detailed models. This is a start at least.


  • Share/Bookmark