Archive for the ‘Development’ Category

64KVJ Preview

Friday, July 9th, 2010

Recently I’ve been playing around with writing some VJ software for the PC. I decided to do this after enjoying writing a handful of audio reactive sketches in Processing but then wanting to have something with more control. The other thing that Processing gave me was a desire to complete the project quickly without worrying too much about how well it was engineered. One thing that helped here was that I decided to fit the entire thing inside 64k – I guess you could even call this the spiritual suscessor to my 1KDJ program from last year. With only 64k to play with I didn’t have enough space to add things like giving the user the ability to load their own models, images or effects, or to reconfigure the way that the existing effects are set up. With these deliberate limitations in mind you can think of 64KVJ as a “fixed function” VJ program.

So I grabbed the code from my 64k framework (the one that I used for Transform) and started hacking away. I added Bass to listen to incoming audio and to give me a spectral analysis of the frequencies in the signal. I then use this to modulate the various effects so that, let’s say, the background effect animates faster when it sees loud bass frequencies. I could probably have done the audio input myself (I already have decent enough FFT code in my framework) but, to be honest, the thought of having to deal with Windows audio input was just too much, especially when Bass already exists and does such a good job of it already.

Next up is the control section. There’s a UI for this in a separate window, but the program also responds to MIDI. I bought a cheap MIDI controler with plenty of sliders and knobs (the really rather excellent Korg nanoKontrol) and configured the program so that the whole thing can be controlled directly with it. This means that I can turn effects on and off and chage their parameters using sliders and knobs, which is much nicer than using a mouse. I’m also thinking of possible live use with this program and my days of DJing tell that being able to tweak multiple controls at once will be a win.

The project is currently about 90% complete – I just need to tidy up the window handling code and fine tune the effects and it’s done. However, I have a couple of other, rather more urgent projects to get out of the way first so it’s currently sat on my virtual shelf. I plan to get it out later in the year when I have more time and I’m posting it up here for two reasons. Firstly, it’s a reminder so that I don’t forget about it. Secondly, I’m curious to know whether anyone else in interested in using the program. I would love to see this used live! Give me a shout if you’d love to get involved in making that happen ;)

More screenshots of 64KVJ in action after the break..

(more…)

More Processing..

Monday, April 12th, 2010

I’ve still not got the Windows partition on my laptop fixed, so I’ve still got idle fingers that are being channelled into writing music visualisers with Processing. This one was created during Friday’s commute to and from work.
applet4.jpg

Processing

Friday, March 26th, 2010

I’ve recently being playing with Processing. It’s described as “an open source programming language and environment for people who want to program images, animation, and interactions“, and it aims “..to serve as a software sketchbook and professional production tool.

So what does this mean to me? In short it means that I can quickly write some cool looking music visualisers and, because Processing is rather friendly, I can easily export them so that they run in your web browser! Below are three sketches that I’ve written in the past week or so of my Processing experiments. Click on the images to (fingers crossed!) run them. I say “fingers crossed” because the browser implmentation of Processing seems a bit flaky – sometimes I get errors, sometimes I get nothing and sometimes, if I’m lucky, the things even run perfectly. If you do get problems, please just keep trying!
applet1.jpg

applet2.jpg

applet3.jpg

Why all the interest in Processing then? Well, I’ve heard about it a lot over the past year or two. It seems that quite a few digital artists have picked it up and are running with it, and I keep thinking that I too should take a look sooner or later. It turned out to be sooner, when the Windows partitiion on my Macbook Pro stopped working. I do most of my coding in Windows, so this brought an abrupt end to all of that. Luckily, not only was my OSX partition was still fine but the Processing IDE is Mac friendly.

Processing has proven incredibly easy to get into. It’s Java based and comes with not only a simple IDE but also a huge number of libraries, examples and tutorials. The online support forums and reference guides are also pretty impressive.The language itself is definitely geared more towards experimentation and learning than development of full-blown applications. The fact that Processing programs are called “Sketches” makes that obvious from the start. I’ve certainly found it liberating to work in such an experimental fashion, though, and I’ll probably be incorporating some of things I’ve learned back into my main codebase when I finally find the time to reinstall Windows. Will I continue to play with Processing when that’s done? Yeah, I probably will. The speed with which I can code these sketches can be very impressive. The second and third sketches above only took about half a day’s work each, and they are the perfect antidote to working on large-scale projects.

decode_recode

Monday, March 8th, 2010

At the end of last year I visited the Decode: Digital Design Sensations exhibtion, held at the V&A in London. The event “showcases the latest developments in digital and interactive design, from small, screen-based, graphics to large-scale interactive installations”. There were certainly some great pieces at the event (such as the works by flight 404 and Matt Pyke, for example) but a lot of it really left me with the feeling that I could have done it. In fact, I began thinking that I should be doing it.

One of the pieces at the event was the exhibition’s digital signature itself, designed by Karsten Schmidt. The piece is written in the Processing language and the code is available for download. This means that the piece is open for remixing. Actually, both the author and the event’s organisers actively encourage you to remix the piece and submit your results for inclusion in their online gallery.

After a discussion with Matt “Smash” Swoboda we both decided we’d have a go, but as we didn’t like the look of any of the existing remixes (change the colours, change the camera, job done..) we thought we’d recode them ourselves from scratch instead. Matt went for an incredibly high-end PC version, while I went in the complete opposite direction and produced a 512byte ZX Spectrum version.

The important part of this project for me was to produce the work on the same 1980’s technology that I used for my first experiments in digital art all those years ago. I think that back in those days, almost everyone who had a home computer was inspired to produce art with it to some degree – even if it was just typing in a program listing from the back of the manual. Others were inspired to copy what computer graphics we saw on TV or in the cinema. Of course the end results were nothing like the amazingly advanced (for their time!) inspirations, but they took on a charm of their own. These investigations and experiments were what eventually led me to the demoscene.

I took what I considered to be the key elements of the original piece (the obscured logo, the angular graphics, and the waves of vibrant colour) and boiled them down into the smallest amount of code that I could. The end result fits into just 512 bytes and runs on an original 48k ZX Spectrum.. or an emulator.

You can find the video over on: Vimeo

You can also download the executable and full source code from: atebit.org

Bite This!

Friday, February 12th, 2010

Whenever I’m writing a demo (or a game, or anything) I usually collect copious amounts of reference material. Some of this directly influences my work, some of it doesn’t. The stuff that isn’t of immediate use often gets lost and forgotten, and I find this a shame – sometimes, maybe months after discarding an idea, a use for it will pop into my head.

I’ve had it in mind for a while now to start a site where I can collect these pieces of inspiration together in one place, to create an archive that I can browse back through when I’m in need of a creative spark. And now, finally, I’ve created bitethis.org as a place to do just that. In case you were wondering, the name is slightly tongue in cheek – in rap parlance bite means to copy or steal someone’s style, particularly their lyrics.

So, bitethis.org aims to be a catalogue of inspiring videos, pictures, interviews, music, games and, well, anything else that either influences me or makes me want to create something. The aim is to post one inspiring thing every single week day.

It’d be rude if I failed to mention Matt Simmonds at this point – the initial germ of the idea for the site came when he and I were swapping references for demo design. Matt has already been very active in helping me collect enough material to get the site started. Thanks Matt!

So please check out the site, and I hope that it proves as inspiring for other people as it does for me.

bitethis.org 

Ahh.. the tape loading era!

Tuesday, September 29th, 2009

Released at Sundown 2009, “Ahh.. the tape loading era!” is another ZX Spectrum demo by me. It’s a 128 only demo with a simple tune and a few fairly basic effects. It placed first in the Oldschool Competition.

So how did such a simple sounding demo place so high? The secret is in the special sauce of course – the demo is running the effects and playing the music at the same time as it is being loaded from tape.

I’ve always been a little jealous of the C64 demo writers – they’ve had a disk drive as standard in their arsenal for quite some time. The disk is used to stream in more data as their demos run, allowing them to write demos that are far bigger than the C64s standard RAM size. Now of course we have our own benefits on the Speccy (more memory for one) but there has never really been a standard disk system. The +3 never really took off (and has not been adopted by demo writers) and flash memory systems like the divIDE really only emulate the tape interface unless you fancy some really hard work. Those crazy Russians have their own Speccy clones that often have disk drives too but they haven’t really made it over to Europe. Besides, whilst I could use a disk drive or a divIDE they were not readily available until way after the Spectrums best years were behind it and that feels like cheating.

This means that we can’t have streaming demos on the Speccy, right? Wrong. It just means that we have to use the tape. Now, loading from tape is notoriously slow. It takes something like 40 seconds to load a single full-colour graphics screen. But if you look closely at a disassembly of the Spectrums ROM loading routines you’ll notice that it’s full of delays. These delays are great because they allow a lot of variation in the loading speed. This means that a mangled tape playing on your dads beaten up old portable cassette player still had a fighting chance of loading successfully. As we progress through Spectrum history we come across the so-called “turbo loaders”. These special loaders reduced the lengths of these gaps, making games load faster but at a the cost of greatly reduced reliability.

So delays in a tape loading routine are good, right? Yes. But who says we should just sit and wait for a few hundred clock cycles. Who says we can’t do something interesting in those delays? No-one, and yet very few people seem to have tried. Check the txt file from the demo to see some references to what other people have done but, as far as I can tell, I am the first person to do something this complex with a Spectrum loader.

A few people have asked if the demo is real or if I am cheating. I can happily say that it’s very real. I’m even happier to say that it runs on both actual hardware and emulators, though you may need to change some settings to get emulators to run it properly. The demo uses a slightly modified version of the standard Spectrum loading routines. In fact, it only really differs in two ways. Firstly, the data loaded from tape goes into a small, cyclic buffer. Secondly, I replace the inherent delays in the loading routine with something more interesting. What that interesting thing does exactly depends on what part of the demo you are watching. In some parts it’s copying data out of the cyclic buffer into another part of memory. In others it is actually running that data as code to display the effects that you see. Both of these things have to happen in tiny time-slices so as not to upset the timing of the loading – if a routine takes too long or runs too quickly then data will be corrupted and the loader will crash. Look very closely at the ROM code I linked to above and you’ll see the comment “Wait 358 T states before entering the sampling loop” – that’s the secret to this demo ;)

You can grab the final demo from here

It’s also here on YouTube

And it’s also up on Pouet

1kdj

Sunday, April 19th, 2009

1kdj.png

1kdj is a little demo that I’ve been working on just for fun. It started when I was trying to make a 1k intro for Forever 9 in March. That intro was to have some funky music combined with a simple wireframe 3D effect. I had my code pretty much finished with a week to go before the party when I deciding that, actually, it just wasn’t very good. So I binned it. But I had enjoyed working on it so much that I decided to start on something else just a week or so later.

I’ve always enjoyed squeezing music into my 1k intros but they are always a bit limited because you have to get some effect code in there too, so this time I thought I’d write a pure music player. But, hey, that would be too boring and too easy so I ended up going for an interactive music player – a DJ program in 1k.

I’ve been working on this in my (dangerously limited) spare time for a couple of weeks now. For the past week I kept managing to optimise away a few extra bytes almost every day, which meant that I could then add in some frivolous extra features – like the channel mutes and the border effects. Finally I’ve decided that enough is enough and I should stop tweaking and release the thing already…. though I’ve just seen a place where I could save another two bytes…

Here are some bonus factoids about the intro:

  • Size of source code: 20696bytes
  • Size of code uncompressed: 2623 bytes
  • Pattern data: 1536 bytes
  • Instrument data: 217 bytes
  • Size of code once compressed: 985 bytes
  • Compression ratio: 2.66:1
  • Size of decompressor:  39 bytes
  • Final executable size: 1024 bytes

You can grab the intro in ZX .tap format from here – I’ve included the full source code in the same archive. Also, remember to check it out on Pouet ;)

Hello World!

Tuesday, February 24th, 2009

Luc Tay Patterson Grenfell born 18th Feb, 2009 at 2:10am weighing 8 pounds and 9 ounces. Mum and baby doing well. Dad incredibly proud :)

eyes-open.JPGhands-up-whos-happy.JPGsnoozing-at-homeb.JPGsnug-as-a-bug.JPGtired-daddy.JPG
(click on the thumbnails for bigger pics)

Jam Game #3

Friday, January 16th, 2009

Way back in November of last year saw the third Dundee Jam event being held. After doing much of the organisation of this event and thinking up an idea for a game to write I was pretty miffed to find out that I couldn’t actually make it along on the day – it was decided that house hunting for my imminent move back to England was actually just a little bit more important. Anyway, I vowed that I would soon find a free day where I could work on my own Jam game. This finally happened towards the end of Decemeber but, due to various other distractions and drains on my time, I didn’t manage to finish writing the damn thing in that day! I then had to take what spare hours I could find over the next week or two and use them to finish it off. The result is “Hello Ian”, a Robotron style, level-based arena shooter.

hello-ian-thumbnail.png

In total I would say that it took me around three days to write this game – way over the one day limit of the Jam. I don’t care! Also, I don’t think the resulting game is that much fun. Again, I don’t care! :D

So why did it take too long and why is the result not what I had hoped for? Well, firstly I think the scope of the project was too big. The game itself was pretty much finished within a day but I had no time left to add the audio, create the levels, add the game wrapper or, more importantly, tweak the gameplay. All of these things make a big difference to the final game but I didn’t allow enough time for them. I think I would have done much better to have had fewer levels and enemies that were actually interesting and fun (and that’s were the tweaking should have come in) and to have not bothered with things like a high score table at all!

Still, I’m glad I finished the game, and maybe someone will find it fun or learn something from the soure code. I’ve learned a few things myself during its creation and it has definitely shaped the way I will go about making my next Jam game.

You can download the “Hello Ian” game here, and the C++ source code (which builds in Visual Studio Express) is available here

Another day, another game..

Tuesday, June 3rd, 2008

Last Saturday we held the second Dundee Jam. This is an event where a bunch of slightly foolhardy developers gather together to create games in the space of a single day. The theme for the Jam this time was “build”.

Below you can see a screen grab from my days work – a game called “Up The Garden Path”. It’s very loosely based on the game of Dominoes, with the aim being to build a path from the start line to the finish by matching the colours on the Domino pieces.

screen_upthegardenpath_2.png

I’m pretty pleased with it for a days work. It’s a fun little game but it’s not going to set the gaming world on fire. However, with a few more levels and some more features it could be a lot of fun.

Download the game here: download game

I’ve also made the full source to the game available, so you can see just what a days coding looks like. It also provides an example of how to program my free 2D games engine, the Jam Engine.

You can find the full story and all of the other games over on the official site: Dundee Jam website