Latest |Kites |Pictures |Programming |Life
Programming
Hacking code together. Is it art? Is it science? Can it be quantified? Are comments really essential? Who knows, I sure as hell don't.
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
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
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
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
monads in php
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
Another little project
Viewing page 1 of 21.
Next page.
Server Grind [0.0511 seconds]