Campbells Source

Wii Curling

Filed under: Gaming, Prototypes — Michael Campbell @ 12:11 pm
July 27, 2008

In the second year of my Interaction Design BA I worked on a project where the intention was to create installations based on the notion of augmented reality. The instillations were built for show at Rave on air, A student-run event held at Ravensbourne College. In Wii curling there is a long projection on the floor (made with projectors hung from the ceiling) at one end of the pojection a target, and at the other end the stones or kettles wait to be thrown. A camera (also hung from the ceiling) is looking for a bright colour that is stuck on the end of the WiiMote and is using that to move the player’s stone left and right when the player moves thier WiiMote. Then, just like in Wii Bowling, the player holds the trigger pulls back and swings forward, letting go of the trigger (not the remote!). Data about the swing is sent via bluetooth to a computer which is then assessing the data for strength of throw, direction and spin. This determines the initial path of the stone along the ice. Other players would stand holding brooms that have a bright colour on the head and a Wii remote attached to the handle. The location of the brooms would be tracked with cameras and the speed of their sweeping would be measured by the Wii remote. The game would show where sweeping had happened by changing the colour of the ice in that location. The kettle would then move faster or spin through ice that had been recently swept.

video

This video shows me explaining WiiCurling at Rave on air, (I hate seeing and hearing myself on camera).

Augmented Reality gaming

I had heard of a version of pacman that could be played on a group of hand held devices that were networked via bluetooth, the person controlling the pacman would have to venture of his or her screen on to an opponents screen to collect dots. The opponent holding that screen could then run away out of bluetooth range and the pacman would be lost to the opponents screen, out of control. I like this idea of combining the virtual space in the computer and the real space that the players are in and building a game that makes uses of both spaces (augmented reality). The Wii also does this; the movements of the players in the real space (the controller they are holding) relates to events happening in a virtual space. However, the Wii is only aware of relative movement in real space and not of location; the Wii remote can work out how it is being moved but not where it is. Therefore the console does not know where the players are in real space relative to each other or the screen that they are interacting through. I wanted to explore what possibilities there are for a game that combines Wii like games and a spatial element. WiiCurling did explore augmented reality, however, all it did was recreate something in the virtual world that already exists in the real world. The real potential and challenge for augmented reality game design is building a game that takes both the strength of real world gaming (movement in space, physical exertion, etc) and virtual gaming (the internet, long tail economies, etc).

How it was done.

The game was built using a Matrox DualHead2Go that allows you to split one video image over two screens (projectors in this case). The game visuals and logic were built in Flash, and the WiiMote data was received via Max/MSP/Jitter and the aka.WiiRemote object and the location tracking was done with jitter. That Wii data was then sent via the Flashserver object to Flash where it was used in the game.

Multiple websites on Xampp

Filed under: Web design basics — Tags: — Michael Campbell @ 2:52 am

Who is this article for?

This article is for anyone who is using XAMPP to develop websites who isn’t using vhosts to host multiple websites on their machine. Without using vhosts you can only have one domain on XAMPP, if you want multiple websites you have to have them in directories within htdocs ie- http://localhost/website-one/ and http://localhost/website-two/ . This tutorial teaches you to set up vhosts and to trick your computer into thinking that http://www.website-one.com and http://www.website-two live on your computer.

Vhosts

Vhosts or ‘Virtual Hosts’ is a module (addon) to apache that allows you to create a list of websites in a file (the vhost file) that you want hosted on your machine. On my machine the vhost file lives at C:\xampp\apache\conf\extra\httpd-vhosts.conf. We are about to start editing the vhost file so it is sencible to create a back up copy of it that works. Open your vhost file with a text editor, The first thing to do it turn on name-based virtual hosting, you do this by un-commenting (removing the #’s from) the “NameVirtualHost *:80” line. With name-based virtual hosting turned on, apache looks at what is being requested (ie what website name has been asked for) and looks to see if it has a vhost that matches it. Before we add website-one.com and website-two lets set up a vhost for what you would normally see when you go to http://localhost/- the normal localhost XAMPP page. Add the following code to your vhost file…

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "C:\xampp\htdocs" ServerName localhost </VirtualHost>

(be sure to change the paths if your set-up is different to mine) Let also create a vhost for phpmyadmin so that we can go to http://phpmyadmin/ instead of http://localhost/phpmyadmin. Add the following code to your vhost file.

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "C:\xampp\phpmyadmin" ServerName phpmyadmin </VirtualHost>

Now lets add vhosts for our two websites…

<VirtualHost *:80> ServerName website-one.com ServerAdmin webmaster@localhost DocumentRoot "C:\xampp\htdocs\website-one.com" </VirtualHost> <VirtualHost *:80> ServerName website-two.com ServerAdmin webmaster@localhost DocumentRoot "C:\xampp\htdocs\website-two.com" </VirtualHost>

Now you need to create directories that hold the website-one and website-two’s html files. These directories need to be placed where you have said the Document Root is in you vhost. Now you need to restart apache for the changes to take affect. A common problem at this point is that apache wont start up again. This may be because apache can’t understand your vhost file or that the directories that you have declared as document roots don’t exist. Check your syntax and your paths. If that doesn’t work still, restore your back up vhost and try again. If apache has managed to start up again then you are laughing, but we are not finished yet.

Hosts file (tricking your browser)

Now if you were to type website-one.com into your browser it will ask the internet what IP address website-one lives at, the internet with give your browser an IP address and you send a request for website-one.com to the server that is sitting at the end of that IP. You probably don’t want to go the effort of buying a domain and pointing that domain to your website via DNS. Luckily you can overwrite what the internet says about where website-one.com lives and get requests from your computer to website-one.com to go to 127.0.0.1 (your IP). Most operating systems have a file where you can overwrite what the internet tells you about IP addresses, it’s called your hosts file (not to get conffused with a vhost file!). In windows XP it lives at C:\WINDOWS\system32\drivers\etc\host. Open it with a text editor, add the following lines for you normal xampp page and phpmyadmin…

127.0.0.1 localhost 127.0.0.1 phpmyadmin

and then create your websites…

127.0.0.1 website-one.com 127.0.0.1 website-two.com

Save the file and then your done. Restart Apache (is you haven’t already) and try going to your website (type website-one.com into your browser). If it is not working your browser may still be doing what the internet told it to do, your browser is remembering what the internet told it. To fix this you need to clear your cache, restart your browser and you should be fine. (on a mac you may need to open terminal sudo killall lookupd && lookupd -flushcache , I think Mac like to read the hosts file when it starts up and you can only tell it to read it again by doing this). Any other troubleshooting, check the comments.

New Blog

Filed under: Uncategorized — Michael Campbell @ 2:39 am
June 9, 2008

Finally upgraded Wordpress. I had hacked the core code on my previous install so it made sense to do a clean install, sorry, that means a new feed address.

I’ve finished my degree so all of the pages about my projects have gone, I’ll build a little portfolio site when I get the chance.

Powered by WordPress