Tuesday 20 March 2012

When September comes,

I am a little concerned most of the ICT / IT teachers I have talked to have little or no clue as to what changes are planned for the curriculum later this year. There has been a lot of talk about programming (great), creative computing (woohoo) and some talk about embedding computing in to every lesson (could be good). Computers have for the most part invaded almost every aspect of our lives, which is both good and bad so why not use it to teach, if it helps. I only teach creative computing; animating, coding, game design, music and so on, I do not teach you how to do things like word processors or presentations and certainly not spreadsheets or databases. I am only interested in creativity. Sure you can write a great novel in a word processor, but that's something different all together. I know that I will be busy in September, trying to help as many local teachers as I can, I think this is really important to do so, to get the next generation ready to make incredible things.

I have been asked by several conferences to help teach some of these skills to teachers, and that is fine. Even though I do have to earn a living myself and it is hard when you are self-employed, I realise I can't teach all the kids myself.

I was asked about 10 things to do/avoid so here is five of each. These are to do with programming /game development. These are my own personal views and are not intended as a guide.

Do

1) Do have a go yourself first, play the games, read the magazines, research the culture, nothing wrong with an adult playing a video game. I met a teacher recently who didn't know what a "sprite" was. I told her, I need to have a lesson with you first if not, your gonna lose their confidence. We did, it was fine, but it might have been a disaster.

2) Do code, it is great. Personally I enjoy solving coding problems better than some games. Bringing something new to life, I feel is better than blowing something up.

3) Do try alternatives, some programming languages just fit better with different people, try Processing, Scratch and Small Basic. They are all free and great to start with. There are hundreds of others, eventually you learn how to learn languages and can swap between several in one day.

4) Do talk to your technician. Your IT technician is your friend, there seems to be a lot of tension between teachers and IT techs, I even went to help at a conference to help ease these tensions. My hunch is the techs are bored sorting out paper jams and other menial tasks, talk to them about coding and watch their eyes light up, they probably know quite a bit and probably love to help. I have a brilliant one at the school I work at regularly and I certainly couldn't do everything I do without his help.

5) Do encourage them (the students) to be creative (and silly), some of the best learning come from the silliest code, it was brilliant to make a random word generator or to put Rick Astleys head on a bad guy in a maze game, they had to learn to code if they wanted to join in and be silly, and they did.


Don'ts

1) Don't buy anything. Until you and the kids have tried it first. I am so tired of seeing teachers and techs bullied at conferences in to buying substandard crap that no one else would. Be assertive get a demo, or take me along.

2) Do use what you have, differently. Got a projector have a different student display his work on a wall in a hallway for others to see, it could be code or a drawing, or my favorite a virtual fish tank with fish made by students. Got a BBC Micro or Commodore 64 bring it in talk about the history, get students to time how long it takes to load up a game. Ok that was another Do.

3) Do Re-create games, you don't have to create entirely new things to learn from, it is always good to re-create classic games. You do this with books and films, video games are art and they need to be discussed in the same way.

4) Do encourage students to talk about games, chances are they will, do context analysis on the cover art, the cut scenes, the storylines.

5) Do use free software, it means the students are more likely to go home and carry on the work themselves. There are tons of awesome free software programs out there

I hope these help.

Below is the source code for a simple maze game, it would take me around two to three hours to teach it to a teacher and fully explain how it works, you''ll need Processing to load it. Processing is free, comes with loads of examples, can run off a memory stick, technicians like that and it has a huge online community of artists and coders who use it professionally. I have annotated as best I can to help out beginners.

//THE MAP OF THE SCREEN
//99 SOLID BLOCK
//97 EXIT
//o NOTHING

int SCREENGRID [] [] =
{
{
99, 99, 99, 99, 99, 99, 99, 99, 99, 99
}
,
{
99, 0, 99, 97, 0, 99, 0, 0, 0, 99
}
,
{
99, 0, 99, 99, 0, 0, 0, 99, 0, 99
}
,
{
99, 0, 99, 99, 99, 99, 99, 99, 0, 99
}
,
{
99, 0, 0, 99, 0, 0, 0, 99, 0, 99
}
,
{
99, 99, 0, 99, 0, 99, 0, 99, 0, 99
}
,
{
99, 99, 0, 0, 0, 99, 0, 0, 0, 99
}
,
{
99, 99, 99, 99, 99, 99, 99, 99, 99, 99
}
,
};

//CHARACTER X AND Y LOCATION
int CHARX = 1;
int CHARY = 1;

//THIS RUNS AT THE START OF THE PROGRAM
void setup()
{
//10 BY 8
size (320, 320 );
CHARX=1;
CHARY=1;
}


//THIS RUNS IN A LOOP
void draw()
{
background (125);

//DRAWS ITEMS ON THE GRID
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 10; x++) {

//IF IT'S A SOLID BLOCK DRAW IT
if (SCREENGRID[y][x]==99) {
fill(255);
rect (x*32, y*32, 32, 32);
}

//IF IT'S AN EXIT DRAW IT
if (SCREENGRID[y][x]==97) {
fill(0, 0, 255);
rect (x*32, y*32, 32, 32);
}
}
}

//IF THE GOOD GUY IS ON TOP OF EXIT RESTART GAME
if (SCREENGRID[CHARY][CHARX]==97) {
setup();
}

//DRAW GOOD GUY AT ITS CURRENT LOCATION
fill(255, 0, 0);
rect (CHARX*32, CHARY*32, 32, 32);
}


//IF A KEY IS PRESS AND THEN RELEASED IT IS CHECKED
void keyReleased() {
if (key == CODED) {
if (keyCode == UP) {
if (SCREENGRID[CHARY-1][CHARX]!=99) {
CHARY--; // MOVE UP
}
}

if (keyCode == DOWN) {
if (SCREENGRID[CHARY+1][CHARX]!=99) {
CHARY++; // MOVE DOWN
}
}

if (keyCode == LEFT) {
if (SCREENGRID[CHARY][CHARX-1]!=99) {
CHARX--;// MOVE LEFT
}
}

if (keyCode == RIGHT) {
if (SCREENGRID[CHARY][CHARX+1]!=99) {
CHARX++;// MOVE RIGHT
}
}
}
}

Sunday 18 March 2012

Simple Yet Effective

Having this computer has today allowed me to be semi-social and build a level editor for "Cross Side", allowing me to try out levels before hard coding them into the game. Making a level editor makes level design easier and in turn may allow me to make better and possibly more levels. So I am very pleased with that. Although the editor can't handle all the objects that are in the game, it certainly will help with the basic layout.

Saturday 17 March 2012

Poly Wants A Chronic

I think is fair to say I am Polychronic, I can swap between several tasks over the course of the day, although I do make plans they are usually only rough guides or reminders of the work I am not really interested in doing. Tonight I have been researching for a paper I a writing and although this is no complex task for a computer to do, i.e. surfing the net for papers for the literature review, just as I was about to shut down the computer I realised I had about 15 .pdfs open in Preview, Open Office Writer, Firefox (20+ tabs), Thunderbird, Twitter App, Stickies, Finder (several windows). This would have been impossible on the old netbook, but because this machine could, I wrote a 1000+ words in 3 hours without having to reset my computer or close loads of things. So there.

Friday 16 March 2012

Just for the Record(s)

Having a MacBook has allowed me to dip in and out of the code for "Cross side" quickly repairing the records table for the game, allowing me to focus on the other work in my day. I am very pleased, knowing that the records table is done as when it comes to May I can purely focus on the level design.
So I am pleased, short but sweet.

Wednesday 14 March 2012

"Red Token" Tangible Music Interface


Here is a simple tangible musical interface programmed in Processing, using a webcam and some gaming chips. The sounds are made from samples I made on a BBC Micro, you can get them from my website at here. I have always been a fan of of "I eat beats" and "Beat Machine" and many more interfaces that can be found here and even though this is very similar to a lot of them, it was a good experience and good fun to make. Loads of people make chocolate cake and it's still pretty good. It was nice to go from simply detecting colour the other night to doing something with that colour in only a few hours in total. "Red Token" was a simple proof of concept for a much larger project that will be developed over time. Today my Mac has been justified.

It Read Red

So now this code can can also detect the colour Red across differentiating light quality, when it sees Red, it says "RED" in whatever box it is in. I am getting close to the final idea and will hopefully be able to let you know what it does besides confirm that Red is Red and it is Red is where I put the Red items. So yeah, good stuff.

Tuesday 13 March 2012

And Then It Got Really Good

So a night of coding, this only a few hours later from my last blog. I have now managed to detect which colours are being picked up by the webcam , break them down into RGB and then label them. I am not gonna give anything away here, but there is clearly a grid on the screen. I am so pleased that I can do this kind of thing as it opens up a whole new world for me. I will blog and provide source code for the project once it is done. Very excited.

Pixelh8 goes pixelated

Inspired by James Alliban's incredible visual work I have decided to start tinkering with the visual side of Processing more, but from scratch. Instead of tweaking existing code I have begun to write it after working my way through the tutorials. I have never really been interested in the visual side of things but now I have a powerful enough computer I have begun exploring it. Tweaking code is always a good way to learn, but you get a real sense of achievement when you are able to bring your own idea to life, no matter how simple it is. Annotated source code below.



//PIXELATE
//By Pixelh8

//Imports capture library
import processing.video.*;
//Calls the captured image myCapture
Capture myCapture;

void setup()
{
//Size of output screen
size(200, 200);
//Name, size and fps of capture screen
myCapture = new Capture(this, 200, 200, 30);
}

void captureEvent(Capture myCapture) {
//Captures the image
myCapture.read();
}

void draw() {
//Displays image so it can be scanned
image(myCapture, 0, 0);
//Check value of pixels and draws 10X10 rectangles in those colours
DETECT();
}

void DETECT()
{
for (int y = 0; y < 20; y++){
for (int x = 0; x < 20; x++){
//Tests colour of pixels
color c = myCapture.get(x*10,y*10);
//Sets colour to the colour of the pixel
fill(c); stroke(c);
//Draws the rectangles that colour
rect(x*10,y*10,10,10);
}
}

}

Sunday 11 March 2012

Best of Both Worlds

So today I did something strange, I gave a 128GB space to Windows 7 Professional on my MacBook Pro. It suddenly dawned on me, that because I can run Boot Camp, by buying a Mac your actually buying two computers it is wonderful. I can now potentially develop for Windows Phone 7 and XBOX 360, iPhone, iPad all from one machine. It also means I can transfer all the PC software I own over to the new machine. So I can today justify the new machine by saying I didn't just buy a Mac, I bought two computers for the price of one.

I think however I will primarily be using Lion as it does most things I need it to do, using Windows 7 for the Microsoft specific projects, it also means I can teach those things on this computer too.

I must however to remember to keep a backup of things as if I am using this laptop for everything, it puts a lot of eggs in to one basket.

Saturday 10 March 2012

A Midnight Snack

Just after writing yesterdays blog, just after midnight, I loaded up Xcode again (wow twice in one week) and I started level planning. It was easy to do, I didn't have to swap cables to my monitor and load up the Mac mini, I just clicked Xcode and away I went. I think I will progress through this faster than previously thought, I made three levels in 15 minutes.

Friday 9 March 2012

IRL

So today I got to use the laptop to teach with, it was very useful, I was able to have about fifty million programs running at once without it breaking a sweat, breaking down or just not responding. Teaching needs to be flexible and be able to respond to questions with answers quickly to maintain the student's attention, I was able to do this today. A student of mine finished his TIC TAC TOE game and was able to move on to hardware, via the Arduino the Mac was able to have everything sorted to teach him in around 20 minutes. For me it was the "I don't need to worry, because my computer is more than capable of doing that, so I can definitely teach that today" feeling of confidence. Therefore although this blog is short as I covered most of this here , the laptop today is certainly justified.

Thursday 8 March 2012

You Can't Get There From Here

I think it is fair to say I am happy with my new laptop. I was meant to go out tonight but in all fairness I was too tired to travel again after teaching all day. Fortunately the new laptop has allowed me to sit on the couch, be sociable and start coding "Cross-side" again.
I have had a demo on my iPhone for ages now I just need to design the levels, the game engine is completely done. "Cross-side" is a spin-off from "OCARBOT" set in the same world but a very different puzzle game altogether.

It is ridiculous I have finished the engine for "OCARBOT" for the XBOX360 and "Cross-side" for the iPhone/iPad I just haven't "finished" it. They are just sitting there on my computers. I have the month of May to finish them. On May the 1st I have the last bit of work I have to do for my PhD this year after that for a month I have nothing planned. So hopefully I will get one of these released.

So today my computer is justified by allowing to get starting on "Cross-side" again once I virtualise Windows or Boot Camp it I can start work on finishing OCARBOT PC, EDU and XBOX 360.

Tuesday 6 March 2012

Pretty Lights

So the MacBook Pro arrived yesterday, I was out all day so i didn't get to use it til around 7pm. It like all new machines needed rigorous installing of software to be useful. So the very first thing I installed was Processing, then Arduino, then Open Office, then Thunderbird, then Firefox, then Unity, then updated OSX so I could install XCode 4.3. It only took about 2 hours in total.
My emails were moved over from the old machine, my Firefox was synced with all other machines, it was ready for creating it was ready for research. I also installed Steam because it could and so now it was also ready for gaming. It runs Lion so it took a little getting used to with the mission control / launchpad things but it is all fine now.

The hardest thing for me to grasp is that I can do everything I need to, from one machine.

Today I will be using it for the first time in a workshop. I have already made something with it in Processing for kids to use use in a light and colour workshop being run by a local home educators group. I was only asked around 10:30pm last night if I could and by 12 I was going to bed having made an interactive webcam light colour thing. So I just need to get the coloured gels out of the loft and get some flashlights / torches so the kids can create images with their movements set up the projector and so already the Mac would have been put to good use. I would not have been able to do this on the little old netbook the processor just would not have been able to handle it. The kids would have literally been in the dark.

Friday 2 March 2012

A Funny Thing Happened of the way to the Fridge.

I use computers a lot, all day, everyday. I make things a lot, all day everyday. I make music, animation, software and I teach all of these things, all on a computer of some kind. I have however always had a strange approach to this in that I always used either old, secondhand or cheap equipment often donated to me. I won't lie it made things harder, it was a challenge, using older and out of date hardware/software was often frustrating. Despite my love of technology I couldn't justify a buying computer, especially a top of the range computer for just me. I use computers until they die, until they catch on fire and then I use their parts to build "new" machines that eventually catch on fire.

Last year I bought a netbook an xxxx xxxxxx xxx, it was cheap at around £200 it was clearly approaching the end of it's commercial appeal the online retailer was pushing the newer model. It strangely appealed to me so I bought it, it was a mistake, it was awful, I bought it for giving presentations, checking email and browsing the Internet. It couldn't even do this very well the machine would often crash maybe once an hour. xxxxxxx x, I like the way the advertising campaign used "everyday" people to take credit for it, perhaps that way xxxxxxxxx could deny responsibility for it. I couldn't even change the desktop image.

The other day this awful machine, which would often start with the words "not responding" decided that the LCD would just die, just before I was about to teach kids about web apps. Maybe the idea was too much for it, too new, it just couldn't handle it. Fortunately, I was able to plug it into an external monitor and the kids still enjoyed learning about web apps. I was so angry this this piece of crap stumbled along all of its life and then died, and I bought it new.

I had a chat to a lot of other people about the PC / Mac debate and I have always been ok with both, they are just tools. I have a Mac mini it has never failed me, I have built huge art installations with it and coded apps with it, it runs open office, it works with my printer. I have a brilliant Dell desktop I have made albums on it, decoded mysteries from World War II its not very portable but it works most of the time. I could never justify spending a lot on a new machine. Until now.

I am so busy people are always asking for my help to do this or that. I can not have another computer that is "not responding" for most of the time. I have always championed re-using technology but after a chat with my partner this evening, she bought me a top of the range MacBook Pro. I felt both excited and sick at the same time, I felt relieved and ashamed.

This blog will follow the life on the machine, partly to justify spending an awful lot of money on it and partly to see how it changes my productivity if at all. I use computers for everything I do, it is my main tool for my skills, will this change me? Or have I already changed having agreeing to own such a new and powerful machine?