Latest |Kites |Pictures |Programming |Life
?
[filed under Programming]DIY Board Game

I've been thinking about making a little board game for me and my 2.5 year old boy to play. My thoughts so far are:

A dice would mean that one of us could jump too far ahead to make it interesting. Plus Archie can't count very well. So maybe writting '2' on one side of a coin and '3' on the other would do.

Designing the board to make it interesting. Knowing that you either move 2 or 3 squares would make jumping 'dangerous holes' of length 2 fun.

Lots of paths through the board.

Have to go down one path to pick up an item to complete the game. E.g. you have to go through the woods to pick up a sword, then back through the woods and into the cave to slay the dragon.

Make it co-operative, some bits require both players to help each other over. One play stands on a switch to lower a bridge while the other player crosses it.

Players can swap moves if they want. Trade moves, items.

Quests to make money and power up the players.

Need to cut out interesting pictures of dragons, trees and landscape to make the board fun to look at.

Part of the story could involve meeting a friendly wizard who casts a secret spell on the player. Then when they get stuck or something happens and they lose interest the spell will activate to help the character and make the game easier.

Multiple endings or loose rules. Talk to the end bad guy. Negotiate a different ending?

Some links to investigate: board game design forum, a blank board game kit.

22nd of September, 2011@10:50:34 PM
permanent link to article
[filed under Programming]deadsulky clothing

Just finished a new shopping website for kids and teen clothing, accessories, cool speakers, cool funky headphones, bracelets (chunky candy bangles)

It's also got some amazing hand printed tshirts by a local artist. Clothing with attitude.

23rd of July, 2011@1:16:15 AM
permanent link to article
[filed under Programming]Zend Framework Element Form Image Edit Upload

I wanted to show an image uploader (using Zend_Form_Element_File) but when the user was editing the image (replacing it) it showed the current image in the form.

For some reason ZF devs won't let you change the view helper for a Zend_Form_Element_File, so subclassing it and changing the view helper don't work. There is a half baked example of this here (extend zend form file element), note that he is extending Zend_Form_Element, not Zend_Form_Element_File because (I assume) of the bug reported here (Zend_Form_Element_File doesn't make use of $helper member) BOO!

So anyway, in the end I just did this:

<?php

class Boo_Form_Element_ImageUpload extends Zend_Form_Element_File {
    public $options;
  
    public function __construct($image_name, $attributes, $image_path) {
        $this->options = $image_path;
        
        parent::__construct($image_name, $attributes);
        
        //
        // By default the description is rendered last, but we want to use
        // it to show the <img> when the user is editing it, so we rearrange
        // the order in which the things are rendered
        //
        $this->clearDecorators();
        $this
            ->addDecorator('Description', array('tag' => 'div', 'class' => 'description image-preview', 'escape' => false))
            ->addDecorator('File')
            ->addDecorator('Errors')
            ->addDecorator('HtmlTag', array('tag' => 'dd'))
            ->addDecorator('Label', array('tag' => 'dt'));
        
        if ($image_path)
            $this->setDescription('Current image:<br><img src="'.$image_path.'">');
    }
}
and you can add it to a form just like a normal form element:
$file = new Boo_Form_Element_ImageUpload('file', array(), 'http://my-site.local/images/placeholder.jpg');
$file->setOptions(array(
        'required'    => true,
        'label'        => 'Upload a picture'
    ))
    ->setDestination(realpath(APPLICATION_PATH . self::DIR_TMP))
    ->addValidators(array(
        array('Count', true, 1),
        array('Extension', true, array('jpg,jpeg,gif,png')),
        array('Size', true, self::MAX_FILE_SIZE)
    ));
            
$this->addElement($file);

Hope that helps someone else :)

 

10th of June, 2011@3:34:12 PM
add a comment, permanent link to article
[filed under Programming]motorola flipout gameboid

I didn't find much on the net about the motorola flipout with gameboid. It works fine. The little 4 way pad at the bottom of the keyboard works as left right up and down and all the diaganols. The 4 way has a little ridge that becomes hard on the thumb after 20 minutes or so, but other than that the keys work well.

I also got Marvin (the ZX Spectrum emulator) working with the keyboard. Works great. R-Type doesn't work for some reason, it asks you to start and stop the tape which seems to confuse the emulator.

14th of May, 2011@8:11:09 PM
2 comments, permanent link to article
[filed under Programming]monads in php
[filed under Programming]Availability Booking Calendar

Availability Booking Calendar, is a calendar in php for your website. A professional online booking system for holiday cottages, campsites, holiday flats.

9th of February, 2011@11:21:51 PM
permanent link to article
[filed under Programming]Another little project
[filed under Programming]1 and 1 1&1 1and1 adventures

1&1 shared hosting, .htaccess Zend Framework.

Here is my .htaccess file to get ZF up and running:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

#php_value magic_quotes_gpc off
#php_flag magic_quotes_gpc off

#SetEnv APPLICATION_ENV development

#
# check SUB-DOMAIN
#
SetEnvIf Host ^demo\. APPLICATION_ENV=demo

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^demo\.
RewriteRule robots.txt demo.robots.txt [NC,L]
#
RewriteRule robots.txt list.robots.txt [NC,L]
# if the file exists - serve it
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^.*$ - [NC,L]

RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
Options -MultiViews

Note that php_value and php_flag DO NOT WORK they give 500 server errors (no idea why) but you can set these flags via a php.ini file saved in the same directory as the .htaccess.

I have a subdomain (demo) that points at the same ZF project, but it passes in the demo flag to tell it not to worry about some things. It also passes a different robots.txt out for the demo site.

php_value php_flag 500 server error htaccess.

25th of January, 2011@11:44:19 PM
add a comment, permanent link to article
[filed under Programming]cloudnext VPS hosting review

Don't waste your money. I was with them from June 2010 to Jan 2011 at a cost of around £90 - £100. I couldn't even putty into the VPS. My website never worked, sometimes the PHP info page timed out.

I opened several tickets with them but eventually they just gave up trying to offer support. Utterly pathetic.

teethgrinder is hosted with 123-reg.co.uk and has 17,250,000 page views.

4th of January, 2011@11:47:01 PM
1 comments, permanent link to article
[filed under life]Tesco VX1 Party Phone review

OK phone, cheap and cheerful. Just calls and text msgs. Which is fine for me :)

When texting PRESS # to turn off predictive text!

For more hints and tips see the VX-1 MINI MOBILE PHONE FAQ

9th of June, 2010@5:01:16 PM
add a comment, permanent link to article
Server Grind [0.1441 seconds]