Source Control

As a small team of two people it may seem a bit over complicated to introduce the practicalities of source control. Or may be what I mean is “revision control“.

I think this is the best time to do it though, because you can learn how it works, how it doesn’t work how you may think and what can go wrong. For example, for the current project we’re both working on an ActionScript v3 project in FlashDevelop, utilising BitBucket. The first stumbling block we happened upon was that, the two don’t directly integrate. It involves the use of at least three to four other applications which, handily, are compacted together into tools such as TortoiseHg and PuTTY – the former contains some hybrid of Mercurial/Git to some extent.

So after discovering that the SourceControl in FlashDevelop doesn’t appear to work beyond ‘Commit’ for the files that have changed (synchronising, especially on the fly doesn’t appear to work from the guides we have found) that having more than one person share the ‘main’ or ‘trunk’ of your project source is just not a good way to go about it:

What a mess

Simply put, partly because I lack the ability to describe what’s going on short of the Wikipedia article on source control, it turns into a mess as shown by what I will call the ‘tree’ (or headed Graph) on the left hand side.

Suffice to say, we’ve decided that to help separate development it may actually be better for us to have a main project which either one or no persons work on it directly, but they ‘fork’ it (effectively making a copy) and then commit and push to their own, with ‘builds’ of files they’ve changed, pushed to the main ‘trunk’ (or main project as I stated) which then means, there’s only merges done that make sense and people can happily mess up their own copy, while re-cloning or pulling from the trunk as required.

It’s taken a bit to get our head around, I try to think of it as a main river splitting off into streams, or a tree trunk into branches (probably the common analogy).

Game Development Progress

For a good, long while I’ve wanted to develop. When I was young, I wanted to create – I would sit there, feeling bored, staring at my Commodore Amiga 1200 without the internet, with little guidance and money and not knowing what or how to do things to actually produce something.

I had access to BASIC on the ZX Spectrum 48k and the Amiga, but aside from coding Pontoon and ‘POKE’ing some code into Manic Miner / Jet Set Willy but I didn’t get much further with it than that.

When I studied at University, I met some fine fellows who were on a Games Development course (and Games Design). Which re-sparked my interest in creating something, aside from doing the HND in Computing (Software Development) which almost scratched the itch, meeting these friends meant years afterwards of the words “let’s make a mod!” (mainly aimed at the game Neverwinter Nights) which, like the other intentions of creating and producing something substantial, unfortunately amounted to little.

However, I’ve tried to push on, between groups I’ve started to prototype some small scale work and today, with the work of three of us, we made it rain in Adobe Flash using ActionScript v3.

Rain

It took one persons familiarity with the API Flixel , my understanding, finding and reading of reference documentation along with the IDE and a person who has good programming knowledge to get it working and acting, like rain.

To this project myself and the other two casually dedicate only an hour a week to the development of it and other projects, but in three weeks (three hours) of work. This feels like an achievement and with that we’re so far satisfied.

SD Card Writing with the Minimus32

Part of a project that I am working on to measure the temperature and log it, involves writing to an SD Card (reading from it is not so important). So as part of this I purchased some items from the Proto-Pic website, one of which was an SD Card breakout board which came with, as a new person to this, I felt, next to no direct guidelines or instructions on how to wire it up. Sure, there’s schematics and the SanDisk pin-outs. However, nothing particularly clear as to what, connects, to what.

Paul Brook has on his wiki, the pin-outs for the Minimus32 which clearly shows the SPI (that’s effectively how to communicate over serial) but translating this to the break-out board was troublesome. However, after trial and error and running out of memory, I discovered the following works:

SCK /10 -> CLK

SS  /9  -> D3

MOSI/12 -> CMD

MISO/13 -> D0

The first problem I had to overcome was the fact that the Minimus32 has 1k of RAM to work with, some of which is used up by variables, ,code running, etc. This was exasperated by the fact that the library I was using to talk to the SD Card, attempting to use FAT32, was quite bulky.

Thankfully, there is an alternative, FAT16 based library that claims to take up much less memory. The difference? This means that really, I can’t write gigabytes of data to an SD Card. When all I’m doing is logging temperatures, I don’t need that much data.

This FAT16 library requires a bit of hacking to get to work with the Minimus32, it requires a profile for the AVR_AtMega32u2 else it cannot identify the chipset, this is so that it can set the aforementioned PINs properly (I think it’s in SDCard.h in the library, which you put in the sketchbook/libraries/Fat16 folder) and be able to communicate with the SD Card.

In fact, it was this library, which because it was smaller and wrote out to the Serial (monitor-able using the Arduino IDE or HyperTerm or equivalent) gave me an error code which let me work out which cable I had connected incorrectly. (I had the CMD and CD connections crossed on the break-out board).

Damn I was joyous.