December 28, 2008

RCA to S-Video Converter




A small side project that I had worked on over the break was a S-Video to RCA adaptor. I had wanted something that would not only send all the video outputs from the receiver to the tv as it is set up to do, but to the projector as well. I do not do a lot of projector gaming as it is a bulb life waster, but still it is still nice to have the ability, and it lookd like a interesting project. So I started searching for instructions online, and while there was little information out there, one place I did find is here. The only problem was that the instructions are a bit fuzzy and the pictures do not help, so it took quite a bit of time to get the right pin out.





See the above pin out, which is how I have it wired, and for what I need it seems to work quite well. Also the ceramic capacitor I used was not the exact one specified in the instructions, instead it was a 221B, however it was mentioned "values form around 400 pF to around 10 nF should work somehow acceptably." so I was not concerned as it falls in that range. Plus it was the best I could rip off of an old circuit board laying around.

Now I must say that as was warned, the video quality is not amazing, but it works and was completely free, made from spare parts laying around, so beggars cant be picky. Also I think it would look better if it was S-Video converted to RCA, not the other way around like I am using it for.

December 26, 2008

Epic Ornament


My little sister, who definitely got the most artistic genes in the family, was kind enough to surprise me an Epic Box ornament for christmas. She had seen the original animation when I found it, and then she had seen my Epic Game I made in VB last semester, so it was only appropriate to have it on the Christmas Tree as well. I must say that this ornament is a keeper, as it is way too cute.

December 25, 2008

Merry Christmas


Well Christmas is once again here, the trees are up, stockings are hung and school is over for a while. It is nice taking a break for a while after school was way busier this semester then expected. So until I post the results of a few projects I am working on...

Below is a great Christmas flash loop to celebrate with. (Santa... Santa... Santa...) Oh, and if you think it is missing the real point, just wait it is coming. ^_^

CLICK ME!!! (<= Flash with sound...)

December 8, 2008

Koathangersmargen



What do you get when two science students get in a mood to decorate, but do not have all the required materials? You get Monster Tree, made out of coat hangers and wrapped with lights. It actually looks good at night, not so much in the day though.

On a whim I made up some mythology of the coat hanger tree, it started in a village in Sweden, and became know as koathangersmargen, forgotten till now...

December 4, 2008

Super Sumo



Ever wonder what would happen if Sumo, or any wrestling for that matter was like an arcade fighter, well wonder no more!

I needed a good laugh after this week, and this worked quite well.

It would seem that these super sumo videos come from http://check-it.org/14/flash/

December 1, 2008

Alice in wonderland remixes



I stumbled upon Alice a song by the artist Pogo. To quote him, 'Alice' is an electronic piece of which 90% is composed using sounds recorded from the Disney film 'Alice In Wonderland'. It is rather interesting to listen to, and although at first I did not love it, it has grown on me. Check out and download for free Alice and three other songs like it (Lost is also quite good) at Pogo's Last Fm page

November 26, 2008

Epic Box the Game


When I was told that I had to do a simple game for my Visual Basic class I had originally wanted to do a simple tank game with a progress bar that charged. However a friend of mine had the amazing idea of doing Epic Box the game, so when he decided to go with another idea instead, I quickly decided that Epic Box was a way better project. So after a few weeks of work and many laughs later I present Epic Box the Game (aka EpicGame).

Download it here!
(Requires the .NET libraries, Windows only...)



It is a very simple game. You move epic box with the arrow keys to go forwards, backwards and jump. You can also shoot, however this drains energy, jumping does as well. This will become a problem later as the hoards of Thirst Quenchers start to pile up. Luckily after killing enough of them, your Epic Meter will become full and you will receive new powers to help defeat them. After all the Thirst Quenchers are defeated, the Boss Fight begins...

Fun and short about 3 minutes of play, enjoy!

November 17, 2008

Efeion's Homework Uncertainty Principle

I have always hated the fact that answers to homework are never obviously correct especially in homework for math and physics, so the student can only assume that the answers which seem correct are indeed correct. This does not only apply to homework, but when viewed in a more generalized way is applied to almost anything. Such as in science, theories are always used, but not proven, until another better theory comes along. So, after having a somewhat witty and strange banter with Matt over homework answers in general, I have come up with My Homework Uncertainty Principle.

All answers to homework that are assumed correct are correct until proven false.



This is based on the Schrodinger Cat idea, as until the homework has been graded it is neither correct nor false in the eyes of a an indifferent and unaware party. However this changes because of the fact that a student has already assumed that the default state of the homework answers are correct, as it is taken as truth that no student should leave incorrect answers on a homework. The professor also must be assuming that the answers are correct and looking for false ones, based on the same reasoning. Because of this we get the first part of the principle, which is all involved parties have assumed the answer should be correct.

Going on from there, as we have established that the homework is originally assumed correct, then it would take another outside source of greater significance to prove the answers given are other then what has been established, which is currently by default true. If a more trusted source stating something outside what has already been established as true can be found, then it must be assumed that this new result is now the truth and if the answers that have been given do not agree then they must be the opposite of true and thus false.

This leaves us with an interesting problem, if no outside source can be shown to give an actual answer, then the default must be assumed and as such the homework must be correct. As in the case of some of the architecture homework. More interesting is the concept that if all other sources of another different answer are removed from the system then it must be assumed that the only answer that exists is the truth.

November 16, 2008

Integer Splitting in C

For our make project we are using a single int of 9 digits to send communication to the different units. However first we needed a simple way to split the integer into separate parts. Sadly there is no split or charAt functions for integers, so I had to do some math to split it apart. This resulted in the functions below.

Just drop theses functions in...


int* protoConvertFrom(int num)
{
int *data;
data[3] = num % 100000;
data[2] = ( (num % 10000000) - data[3]) / 100000;
data[1] = ( (num % 100000000) - (data[3] + data[2]) ) / 10000000;
data[0] = ( (num % 1000000000) - (data[3] + data[2] + data[1]) ) / 100000000;
return data;
}

int protoConvertTo(int *part)
{
return (part[0] * 100000000) + (part[1] * 10000000) + (part[2] * 100000) + part[3];
}


API information...


int* protoConvertFrom(int num)


Splits an integer of 9 places (our protocol) into an array of four parts .

Parameters:

num: The integer received from the network.

Returns:

An array pointer of four integers... [0] = from, [1] = to, [2] = ID, [3] = value

Example:

int num = 131100001;
int *data = protoConvertFrom(num);
int ID = data[2];




int protoConvertTo(int *part)


Take a array pointer of 4 parts and combines then into a 9 digit integer (our protocol).

Parameters:

part: A pointer to an array.

Returns:

An a nine digit integer that is ready to send over the network

Example:

int *data = new int[4];
data[0] = 1; // from
data[1] = 3; // to
data[2] = 11; // ID
data[3] = 1; // value
int num = protoConvertTo(data);
// returns 131100001

November 9, 2008

Make Controller network communication

For our project in Computer Architecture, we are programing several Make controllers to work together as a home control system. As the programing manager, apposed to the general manager, and part of the system controller group, I have been trying to compile function and a basic API together for the other teams to drop in and use. Here is the easiest way to get networking working on the make controller, using Datagram Sockets. I must say, I hate how small the code is compare to the 7+ hours of my own time and another 2+ hours working with others it took to get working...

Drop these functions into the code...



int sendMessage(int num, int address, int port)
{
struct netconn* udpSocket = DatagramSocket( port );
int val = DatagramSocketSend( udpSocket, address, port, &num, 4 );
DatagramSocketClose( udpSocket );
return val;
}

int recieveMessage(int address, int port)
{
struct netconn* udpSocket = DatagramSocket( port );
int num = 0;
DatagramSocketReceive( udpSocket, port, &address, &port, &num, 4 );
DatagramSocketClose( udpSocket );
return num;
}


API information...


int sendMessage(int num, int address, int port)


Sends out an integer over a specified socket on the network to a network device based on its IP.

Parameters:

num: The integer to send.
address: The IP address of the network device that will be receiving the packets.
port: The port that the network device will be listening on.

Returns:

This function returns an int returned by DatagramSocketSend, which gives the number of bytes sent.

Example:

int address = IP_ADDRESS( 192, 168, 0, 210 );
int num = 1;
int port = 12345;
sendMessage(num, address, port);



int recieveMessage(int address, int port)


Receives data from the network buffer and stores it for use. Please Note: This function sits and waits for data to be written to the socket buffer before continuing, so it best used in a separate task.

Parameters:

address: The IP address of the network device that will be sending the packets.
port: The port that the network device will sending packets on.

Returns:

This function returns an integer that was written using the sendMessage function.

Example:


int address = IP_ADDRESS( 192, 168, 0, 200 );
int port = 12345;
int num = recieveMessage(address,port);

November 6, 2008

Yume Nikki




While mindlessly surfing the internet I stumbled across a rather strange video (watch here), which left me at first amused and slightly confused, then after that I was left wondering what this was based off of. So like may of my other great discoveries, I looked up the game Yume Nikki which the video was based on.

Yume Nikki is a rather strange game, where you are a girl who lives in a small apartment, which you can not leave, at least not while you are awake. You go to sleep and then are able to wonder through the very strange dream world that exist, assumed to be in the characters mind.. You pick up various effects as you explore the areas, which range from a getting a bicycle to turing into a stop light. These effects can help you do things, though so far only the bike and lantern have been helpful.

The imagery of the game itself is what makes it unique, as you travel in dreams of a girl that obviously has some mental issues, it is hinted that she will not leave the room in the real world due to some physiological reason, so what ever caused that, has also twisted her mind, or at least the dreams that she has. Most of the areas are bizarre, in the fact that they mirror a twisted reality or just have creepy backgrounds and NPCs running around, such as a world with grasping hands jutting from the floor. However what I find far creeper is that you will enter a door in one strange area and all of a sudden be in a forest or someplace more normal, which in turn leaves you waiting for something to appear that will make the normal far less normal, which on occasion does indeed happen. It is these "normal" places that seem the most out of place and odd, which I give credit to the creator for pulling off so well.

I must say that this, like other games I have posted are a great example of how 3D does not always make for games better. Yume Nikki is what I would consider a work of art, as it lets the player judge for them selves what purpose the events and reasons behind the game hold, as there is little to no back story or help in the game. If you have time, check out Yume Nikki, there is an english version (Get it Here), which is for windows, but runs well under Crossover Games on the Mac.

Check out this video if you want to see more without actually playing.  (Contains spoilers!)


UPDATE: After getting very annoyed about the game crashing in the eyeball area, I did some forum searching. It seems that the 0.10 version of the game cannot play mp3s, so to fix the problem find the music folder for the game and rename the eight or so mp3 files and everything will work correctly.

November 1, 2008

Crossover for games

A short while ago, CodeWeavers was giving away copies of CrossOver Games for a promotion they where running, it dealt with politics so I am not going any further then that. Anyway... Everyone could grab a free copy of of any of their Crossover products. I grabbed games and mac, and so far I am very happy with it, it does not work for everything, but it does work for a lot. For those who do not know, Crossover uses the open source project Wine which "implements the Windows API entirely in user-space, rather than as a kernel module at the time of writing. Services normally provided by the kernel in Windows are provided by a daemon known as wineserver. Wineserver implements basic Windows functionality, as well as providing extra functions such as X Window integration and translation of signals into native Windows exceptions." Crossover is a commercial version of wine, so it provides a little more support then the open source project. If you have windows software and do not want to use BootCamp or Virtualization options, this is a very nice options. Plus I got to bust out my copy of Indiana Jones and the Infernal Machine, which was just plain awesome. Also it will play the Windows version of Hydro Thunder with full 3D support, unlike playing it under regular wine.