Archive for the ‘code’ Category

Creating an iPhone Friendly Website with iWebkit

Sunday, December 20th, 2009

As an ongoing effort to make my website as accessible as possible, I’ve decided to make an iPhone friendly version of my website.

While searching through google I discovered iWebkit. iWebkit is a site template that makes creating iPhone websites a breeze. By dropping the files on your server you can create a website by following the included guide.

This will be the first in a series of posts showing you how to create a killer iPhone site using iWebkit.

Part 1: Installation
iWebkit can be downloaded from the www.iwebkit.net. I suggest that before you do anything you set up a subdomain for your iPhone site (i.e. iphone.gimpneek.com) this can be done in your control panel for your website and makes it easier for users to remember the url.

Once you have the subdomain set up, open the iWebkit folder and copy the contents of the framework folder into the subdomains root folder. When you view the site you will see an empty iPhone style page. If you don’t see this make sure you have copied all the files into the folder on the server.

You can edit this page by adding the various HTML code to the file. First off we’ll be building an ‘Under Construction’ page. This will let anyone viewing the site that we are still working on it and give them a way to view your normal website.

Editing the template

The body of the page is made up of 3 divs: topbar, content and footer.
Topbar contains everything that will be in the header bar, so things like the page title, any navigation elements etc.
Content is where you’ll be adding your content (duh…). This can contain lists, pictures and paragraphs of text.
Footer contains the made with iWebkit text, though you could add copyright information.

Inside the topbar div add the following code:



div id="title">iPhone /div
div id="leftbutton"> a href="http://www.example.com"> Normal Site /a /div

This will add the page’s title and a button on the left that leads to the non-iPhone version of your site. This can be replaced later with a home button.

In the content div add the following code:



ul class="pageitem"
li class="textbox"> This site is currently under construction, please come back later /li
/ul

This will add a text box to the page. You can split up page content by using different ul and li tags.

You don’t need to change the footer just yet. So at the moment your page is just a static website that says the page is under constuction. In the next post I’ll show you how to add a popup that alerts the user that the website is still under construction and navigates them to your normal website.


  • Share/Bookmark

Pong – My first Real Game

Saturday, October 3rd, 2009

As I one day want to become a games programmer I’ve decided to take it upon myself to create some short little games to learn the basics of games mechanics before I step up to programming something worth while.

The first of these games is Pong, a classic and the best way I thought, to start learning games programming techniques. It’s taken me a few days (thanks to work) to finish it and a playable (no sound due to a processing export screw up) version is up and running in my newly made portfolio folder. I had originally had some awesome sound effects along with the game but for some reason I couldn’t export it with the minim intergration (you can download the folder here if you want)

The game is the classic Pong with 3 difficulty modes, the colours pulse from black to white (for fun more than any game play reasons) I have noticed a 1 bug, but its nothing major (when choosing hard it takes the ball one bounce to come upto the correct speed). If you do come across a bug please leave it in the comments.

The source is fully commented if you wish to learn from it. I’ll be uploading the audio file that was supposed to be accompanying the game

Pong Song

  • Share/Bookmark

Vimeo for Wordpress v1.1.9

Monday, September 14th, 2009

I’m gearing up for the 1.2 release of Vimeo for Wordpress now. There’s a few features I’d like to add before I let it into the wild but this latest release adds comments to the videos ( so you can tell what the embed code actually does), It fixes the issue of the colour picker’s box being at the bottom of the page (though the CSS isn’t quite perfect yet) aswell as a few other things.

As usual I’ll put up a few examples of how it all goes plus some screenshots.

So Here’s the first one:

Using the new commenting system it’s easy to see what your videos are and it’s even easier to select them and delete the code

Here’s the second:

When you add a video in the manual entry box there’s no way of the plugin knowing what the video is so it just gives some default code

Comment generated by Vimeo for Wordpress Plugin

Comment generated by Vimeo for Wordpress Plugin

Comment Generated by Vimeo for Wordpress Plugin

Comment Generated by Vimeo for Wordpress Plugin

  • 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

Unity summer of code

Sunday, July 12th, 2009

I saw about 2 days ago that unity were having a summer if code contest. They want indie developers and students to propose projects that will create reusable assets for unity. One of the catergories was social network intergration. This is something I’ve been thinking about for a while ( see the post in which insaid I had a great idea :p) so I built a little test which sends a tweet to Twitter when a character collides with a spaceship. The demo is available at unity test use the arrow keys to walk the character towards the spaceshipt. Then jump on it. This will the send the tweet to http://www.twitter.com/unitytest. If you have unity you can Download the project at http://www.gimpneek.com/unity/twitter/unity_twitter.zip.

I’ll be posting some more stuff on it. And hopefully if my proposal gets accepted I’ll be posting much more :p

  • Share/Bookmark

This is a quick test for the new options Vimeo for Wordpress offers

Friday, July 3rd, 2009

I’ve added some new options to the Vimeo for Wordpress plugin.
The user can now set the width and height of the player, the colour of the player, wether or not the player shows the title, the video owners name, the video owners portrait and if the player let’s people go fullscreen.

Here’s a player that’s been modded

It’s big, no?

  • Share/Bookmark

Testing Vimeo for Wordpress’ Valid XHTML

Friday, July 3rd, 2009

This is top test Valid XHTML with the user drop-down list

This is to test Valid XHTML with the friends drop-down list

This is to test the manual entry for Valid XHTML

  • Share/Bookmark

I’m amazed and my first webmonkey tut

Tuesday, June 30th, 2009

I finally got round to uploading my Vimeo for Wordpress Plugin at 1am this morning and already 66 people have downloaded it. I know this doesn’t seem huge but I’m amazed that in the space of 12 hours 66 people decided to give it a try. Mega happy points there, I’m sure the hype will die down though.
I’ve also just posted up my tutorial on how to make a Facebook App with as much ease as possible over at www.webmonkey.com if anyone wants to go check it out.

  • Share/Bookmark