Get ready to drop SVN, here’s GIT!! Well for tortoise users anyways!

TortoiseGIT is out! This is briliant news, as I am a GIT user when it comes to trying out the latest opensource applications.

GIT is superior to SVN, as it is a distributed source control system as opposed to a centralized one. But plenty of windows users stick to SVN because of the usefulness of TortoiseSVN.

When I create projects I usually use the command prompt to do the first update to a folder. Then I can just right click and use TortoiseSVN.

This is briliant news. I think I will try and commit my next project to GitHub, one advantage of GitHub is the ability to have private use repositories for commercial use. I might even contribute to some now.

I was seriously considering switching to Ubuntu for developing (although having to drop windows development in the process) just to have a better use of GIT and SVN through the CLI (command line interface)

In Linux the equivalent of Tortoise SVN is a nautlius plugin

I have use GIT in the CLI and it’s pretty simple though.

Displaying Isometric tiles using Javascript.

What do you think?

well the little peice of magic code that does that is:

var isox = Math.round((this.x - this.y) * h * 0.5) + xoffset;
var isoy = Math.round((this.x + this.y) * w * 0.25) - yoffset;

The * h * 0.5 means that the isometric tile is half as height as the actual image file.

and the * w * 0.25 means the tiles must join each other by a quarter of the image size.

This formula isn’t a stagered coordinate system, its just bog standard x and y coordinates. pretty simple really.

For an exmaple of it in real world code (the screenshot) check here for update of the project

How to read a grayscale image in Python using pypng

what we start with is to include like this:

[code lang="python"]import[/code]

with we wil now open a png reader from a specified path and then just interate through each pixel, with grayscale you just read one color value, we can ignore the other values such as green and blue as all color should be at the same scale. I have notice slight fluctuations in the values, but that just depends on how your image editor saves the file.

here is my code:

[code lang="python"]
reader = png.Reader(os.path.join(os.path.dirname(__file__), 'static', 'earth.png') ) # streams are also accepted
    w, h, pixels, metadata =
    pixel_byte_width =  4 if metadata['has_alpha'] else 3

    fov =  2# fov is how many tiles a unit can see around it
    xleft = max(unit.x - fov, 0)
    xright = min(unit.x + fov + 1, w)
    ytop = max(unit.y - fov, 0)
    ybottom = min(unit.y + fov + 1, h)

    for x in range(xleft, xright):
        for y in range(ytop, ybottom):

            pixel_position = (y * w) + x

            pixel = pixels[
              pixel_position * pixel_byte_width :
              (pixel_position + 1) * pixel_byte_width]

            alt = pixel[1]


My Linux history

I have been a linux user since 1996, this started with Slackware 2.6,
this distribution involved writing xconfig files, lilo configs, I installed kde from source.

Then with Slackware 7 I installed Apache, PHP, MySql, I made bash files, c++ applications and perl scripts.

I then had relatively old hardware compared to the time, so I spent a lot of time reconfiguring the kernel and recompiling it.
I created fvwm configs for my machine which ran very fast compared to other window managers.

From slackware I moved on to Debian, which still involved configuring the xconf file, more recently with debian
I installed applications such a compiz, for 3D window management, I program python scripts using eclipse, or gedit.

I have made Make files, installed the LAMP stack made programs in php using mySQL.

I new use Ubuntu and am a competent CLI user.
I have also installed Gentoo, Sabayon and FreeBSD.

I have looked into Mono for c# development but have a preference for Python and django.

I would prefer to work in an opensource environments than in a Microsoft environment.

I have installed svn, used svn and cvs.

The latest example of my python can be seen at