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.

October 31, 2008

10 Most Disappointing Treats

I stumbled upon this yahoo food post on the 10 most disappointing Halloween treats, check out the original post here. Most of them I agree on, some however like Tootsie rools and Hard candy I never minded getting, especially the strawberry ones in the picture. (Yum!)

This has always been my list of lame Halloween treats.
1. Fruit (Why?... Just why?)
2. Money (Unless it is > $5, and pennies are just cruel!)
3. Popcorn (NO! Unless covered with candy!)

October 26, 2008

Hydro Thunder on Mac




Hydro Thunder has to be my favorite racing game ever! Fast boats, amazing tracks, all and all an amazing game. If you have never played, you may want to read this, it will explaine why Hydro Thunder is awesome.

I have had the PSX disk for a while now, but it is annoying to dig out the Playstation just to play it. So I tracked down the PC version (Yes it does exist!) and got it running on my mac through Wine. This was rather simple, just download the latest free build of Darwine here and install it. You may need the unstable 1.1.7 build, because I had issues with it working on the 1.0.1. Install it and then run the wine helper once, after that the Hydro.exe sould auto open with darwine when you double click. Just as a warning, it may crash once due to no 3D card support, if it does, just reopen it and choose the play in window mode at the recovery screen that will come up. Enjoy

UPDATE: There was a question asked about how you can get the game screen to be larger. The problem is that because WINE does not have good 3D support, it will only play in a small window. There are two thing you can do to fix this, you can use the screen zoom feature under Universal Access in the System Preferences to enlarge the window, or you can grab a copy of Crossover Games, which does have 3D support, see my post on it here

October 14, 2008

Quicktime VR Movie Of My Room

Check it out, a while a go I made a Quicktime VR movie of my room at home. Room VR. Making the movie was easy, apple released for free a simple application called MakeCubic, which takes a panoramic photo and twists it into a VR movie. The hardest part was getting a panaramic photo to use, luckly I am decent at photoshop and could blend the photos together, though the difference in lighting is quite apparent at some points. The settings also took a bit of work, but was not all that hard to figure out.

Sorry internet viewers not spreading this movie around, so on campus viewers only.

October 13, 2008

Fantastic Contraption



Well this is a dangerous find when I have a project I am researching and home to do! Check out Fantastic Contraption for an amazing way to kill time, or loose time that you should be doing other things with. I have been obsessed all weekend with this game. Basically you get an infinite number of motors, rollers and two types of sticks to connect it all together with, all with a mission to get a red piece into a predefined goal area. However getting to the goal is not so easy, especially when it is below you or up a wall, and to make maters worse you only have so much space to build in, although after you run it it can go anywhere! You can only experience it by playing, and after finishing a level check out the thousands of other ways people have found to solve the same problem. If you liked building small gizmos as a child you will love this!

Oh and you can save and share creations! Check out some of mine...
http://FantasticContraption.com/?designId=2972825
http://FantasticContraption.com/?designId=2973894
http://FantasticContraption.com/?designId=2974040
http://FantasticContraption.com/?designId=2975559
http://FantasticContraption.com/?designId=2977810
http://FantasticContraption.com/?designId=2993872
http://FantasticContraption.com/?designId=2994200

October 12, 2008

Religious Images


While doing research on icons for project that I have to present rather soon I stumbled upon this flicker album of
images for use in liturgy programs, which must be close to a hundred mostly black and white medieval religious images. I was rather impressed as you rarely find so many in one place ready to be used. It would be a good resource for any one teaching religious education or doing a project of the medieval church.

October 8, 2008

You have to burn the rope!



A very cute example of how even a very short flash game can be awesome. It is little flash games like this, that are going to take game creation from simple entrainment to form of art. It is not about how hard the game is, or how complex it is, it is how the game effects the users and after playing this you have to tell friends about it. Check it out You have to burn the rope.

A amazing in-depth look at the art of the game is here at 1UP.

UPDATE: Found the ending song! Can be download here.

October 7, 2008

Power Thirst

Another very funny video that was going around at work is the Power Thirst series that makes fun of all the random energy drinks out there. It is some what worrying that today energy drinks seem to be advertised as the solution to all your problems, which is what this parody plays off of, making some ridiculous claims such as giving you the ability to have 400 babies that will run as fast a kenyans! Check out the video below, warning there is one part that uses a bit of strong language but it is short..



There is a sequel to this that is also very funny, but it also contains some strong language as well as a few inappropriate jokes, but is still worth viewing at least once.

September 30, 2008

MIPS on Mac

A tip of the hat to my friend KDostie for finding a very decent mac MIPS simulator which you can get Here. I have only used it a few times so far, but it does everything I need it to do, and it is written in Java so there is a version for every platform. I will need it for the Computer Architecture course I am taking which is arguably the hardest CS class I have taken so far. I am a engineer, I like to use and build upon the basic theories that are already in place, not a scientist, who discovers new theories.

September 15, 2008

Uninstall and Reinstall Cydia

In an attempt to fix the Cydia POSIX errors, I stupidly removed the cydia.list sources files, then in an attempt to fix that I uninstalled cydia, only to realize that I could not reinstall because I had removed the apt-get sources for it, so I had to figure out how to reinstall cydia. After an hour of looking I finaly found a way!

1. ssh into the ipod touch...
2. grab the package from apt.saurik.com
3. rename to cydia.deb, for easy typing
4. place in the / directory "aka root directory" on the ipod
5. type and run "dpkg -i /cydia.deb"
6. respring
7. [click the advertising on the bottom of the page if this was helpful!]

Then it is back, but still POSIX errors... Still working on that.

Update: Fixed the broken link...