30 Oct 2011


A Layman's Explanation of Time as the 4th Dimension

This is something I've been pondering for some time and I think I've finally worked out a simple way to explain how time can be seen as the fourth dimension. Don't worry, there's no maths involved in this explanation, just strategic examples.

General Stuff:
In the following examples, I will split the dimensions used into two categories, Base and Stack dimensions. This is NOT any kind of official naming, it's just what I use. The difference between them is basically that if you strip away only the stack dimensions of an object, you can still see what it is but if you take away a Base dimension, the object becomes partially or wholly unrecognisable. This will become much clearer in the examples, believe me.

Example 1: An animated GIF Image
This also applies to a film and basically any moving image. Anyway, an animated GIF is basically a series of pictures, so in this example the 1st (length) and 2nd (width) are the base dimensions (because if you take one of them away, you can't really tell what it is) and the 4th (time) is the stack dimension, as the 2-dimensional images are cycled through over time. The easiest way to visualise this is a flickbook, where the 2D images are literally stacked and then flicked through successively. Therefore you could argue that a GIF/Film is a 3-dimensional image utilizing the 1st, 2nd and 4th dimensions.

A specific example of this is a GIF I made when I was messing around with photoshop's animator tool. It was a large square with a red value which increased along the 1st dimension (x, across), a green value that increased across the 2nd dimension (y, down) but then I was stuck. How could I make it gradient through blue? The image was 2D not 3D, but then I thought of making it animated, effectively substituting the 3rd dimension (depth) for the 4th (time) to create a 3-dimensional gradient.

Example 2: A hologram
A still hologram would be 3-dimensional, utilizing the 1st, 2nd and 3rd dimensions, simple enough (1st and 2nd are Base, 3rd is Stack. Though you could say that any of the 3 could be Stack with the other two being Base, giving a cross-section in any of the 3 axes). But a moving hologram could be said to be 4-dimensional, utilising time as an extra Stack dimension containing a series of 3-dimensional holograms.

I've found this idea very useful when dealing with multidimensional arrays whilst coding, where an array can have up to 32 dimensions. I suppose I should point out that in computer terms, an animated GIF may be put into a 4-dimensional array, not a 3D one, with the extra dimension holding the data for each pixel (x position, y position, colour, etc.) though it is perfectly possible to use a 3-dimensional array and just hold the colour value for each pixel and instead use the dimension indices (i.e. the colour-value's position in the array) to hold the x, y, and t values.

I hope this may one day possibly help some person who is struggling to understand why time is the fourth dimension. Unless of course it isn't and/or this is a load of bull.

Maybe I'll design a program to demonstrate all this...

19 Oct 2011


Certainly better than PixelGame, this is the result of my first assignment (though it has a weighting of 0 meaning it has no effect on my overall grade, but still) which was to create a game using GameMaker 8.1 Lite that can be played using a single button.
My idea is Spectrospores, a colour-based puzzle/defence game where you have to stop these coloured circles (spores) from reaching you (a larger thing called the pulsar in the bottom left corner) by launching pulses of the right coloured photons to charge them with light and explode them.
The player controls the pulsar using the spacebar which is used to select a colour (the colours automatically cycle up the spectrum from IR to UV, pressing space stops the cycle) and the length of the hold determines the charge level. The more charge, the more powerful the pulse (more photons) but also the longer the cooldown time before the pulsar can be charged again.
A spore is overloaded by hitting it with 3 photons in quick succession. If you aren't fast enough, the spore will fling off the photon again in a random direction (possibly charging another spore) and switch to a lower charge state.
When a spore overloads it released a burst of photons of the next colour down the spectrum (e.g. a blue one releases green photons upon overloading).
Also, there are special white spores that will explode and release a HUGE amount of whatever photons hits it first.

However, it is a little buggy. For some reason not at all my fault (some strange bug in GameMaker itself I think, I've checked my game over and over again and found no reason at all) spores will occasionally get charged with photons not of their colour and all photons released by the pulsar will appear IR or red, however this is purely aesthetic and they still act like they should, they just look funny.

Overall, its nice and colourful, quite fun to play and I think everyone was quite impressed with it.

Dropbox (.exe file)

Side note:
I have started the coding for my zombie game. Nothing working yet but I have bits of a physics engine going (a lot more simple than it sounds, velocity.Y -= (9.8 / FPS) implements gravity, for example) as well as a very simple (well, simple in operation, not coding) terrain generator. I've also started building the class tree and I'm working my way down it to the Zombies.

Class Tree for zombies: (bold is done, italics is doing, normal is not done)
>gamePhysObject (any physical object in the game world, has togglable physics (movement) and clipping (collision, i.e. it hits stuff instead of passing through)

>gamePhysEntity (any object with a level of Artificial Intelligence, this includes living (and undead) things as well as stuff that like sensors and tripwires probably)

>GamePhysZombie (any zombie, maybe have subclasses (e.g. fast zombie, ninja zombie) but will definitely have customisable settings with probably slight randomisation so they aren't ALL the same)