September 14, 2009

Objective C for the iPhone or iPod

I finally decided to sit down and start working with Objective C, namely to expand my development areas into the iPhone and iPod areas. Not that I have any current grand ideas, however I had been meaning to create my own version of lights out and though it might be a good time to get to work. However, who know it may be worth paying the $99 developer fee in the future, but right now I am looking at jail broken device deployment only.

Objective C is similar and at the same time quite different from regular c/c++. One of the biggest differences is that you can use the dot operator, but also have the option of sending messages instead or a mix of the two. For example you could have class.method(input); or you could do [class method:input]; At first this was a little strange, however after a few hours I started to like it a little as it clearly defines what is processing code and what is message code.

Another change for me was using the Interface Builder in xcode. I had played with it briefly before, however I have never actually sat down and used it. It took me a while and some google searching however once I realized that I needed to add a method reference in the .h file as well as the .m file I could then see the links in interface builder. After that I was golden and quickly linked the button in my first game to UIBUttons that could be referenced in the code as well as a single buttonPressed method. HINT: Copy and paste is much faster then doing it individually. This reminded me a little of working in VBStudio as you could design the interface and then do the code second, however unlike VB, C is a little more demanding and requires hand coding instead of a double click on the UI element adding the code for you. Still, minus the some what steeper learning curve it was actually not too bad, and as a bonus I know now how to use Interface Builder in regular OS X development as well.



After ten hours or so of teaching my self objective c, I can now present BlackOut and simple lights out game. You need to have a jail broken device to install this, as I am not paying Apple $99 to give out a free application. Enjoy.

September 11, 2009

iBook Photo frame Controls

I already had the frame and iBook screen setup and running from my iBook Photo frame project, however it required a keyboard and mouse to really do anything, this is a problem. So I had been planing on trying to add controls at some point, however as usual this was not as easy as I had hoped. The ibook keyboard is connected via a flexible printed circuit, which means that soldering is out of the question and conductive epoxy would cost me money. My next idea was to attach wires under the connectors and use some kind of clamp to keep it connected. So I carefully removed all the keys and extracted the plastic switch membrane but that idea went out the window when upon trying to part the two membrane sides it also ripped a few of the printed circuits... sigh.

So left with a non functioning circuit I finally opted to cut off just the connector ribbon after getting the correct pinout; tracing it reminded me of my ddr pad controller project. Once I had the pinouts I had to think of some way to connect wires to the conductive paint. After a few failed ideas I finally settled on crimping small coper connectors onto the exposed paint. With a magnifying glass and a fine point xacto knife I carefully scrapped off the top layer of thin plastic glued to the thicker back which the circuit wires are printed on. After that I cut a small strip of copper and bent it into a U shape and crimped it on with pliers. I tested the connection with my multimeter after each one. I had to be careful that each connector was only a small strip, as too big and it would not crimp on properly.

Finally I used some extra cat-5 to get the six wires I needed, for the up, down, enter and esc keys to control xbmc, which I had loaded on it after enjoying the xbox version so much. Then I attached the lead wires to slightly larger clips to crimp the smaller ones in. I did not dare solder to the smaller clips because they might melt the plastic, so I figured this would work best. Finally I put it all back together and tested it. Sadly I did not have any buttons to finish up the project with, so I will leave that up for part three in the future. At least now I have a workable way to connect printed circuits to wires, which I bet will come in handy in the future.

September 5, 2009

DADGAME


I had posted the dad at home and work flash movies before as must see items, however to add even more to the series is DADGAME the next episode following dad at work, however this time it is a full game. Yes, you get to play as dad as he goes on a rampage in town while stopping his boss' evil plot! With swords, lazors, nunchucks, guitar and briefcase as playable weapons against guards, football players, robots and a monkey. This is a must play, even if just on easy. I laughed very hard through the whole thing, especially with the crazy animations in rampage mode. sakupen went all out this time.

Play DADGAME Now!

August 30, 2009

Destruction of Wood Playgrounds

I remember the joy I had running climbing and of course falling all over the large wood playground at the first house that my family lived in as a child. It was a huge structure, covering easily a hundred square feet and must have reached thirty feet high at the tops of some of the spires. I loved the ability to explore and climb anywhere I could, and a game of tag was filled with intense ducking and running through holes or quickly climbing to the next platform to escape. Even the smaller simpler wood playground at the second house had plenty of potential with climbing and swinging. However if you look around, these places are vanishing at an alarming rate! Where are the colossal playgrounds of old, I can't even find a picture of the one I played on as a kid!





Now everywhere you look you have cheap tiny plastic structures! While kids will find way to play on anything, these lame (safe?) replacements lack the creativity and imagination of true wood playgrounds that pushed the imaginations of past generations. Look below vs. above and just try to argue otherwise!




I can understand the desire to protect kids now a days, however there is no reason to protect them to the point that there is almost nothing left. Kids need to play and fall and hurt them selves, it is called growing and learning. My parents did it, I did it and if I have kids some day I want them to have the same chance to grow and play. (Hm, could this a source of the obvious lack of common sense in this upcoming generation...) Still ignoring the danger of gravity you still get the whole arsenic levels in wood debate, though it is a naturally occurring substance. (Via Wikipedia)"In addition to the inorganic forms mentioned above, arsenic also occurs in various organic forms in the environment. [15]" However, what I can not understand is why completely destroy what could be considered national treasures, when they could easily plan to slowly replace the "supposedly dangerous" pressure treated wood materials with newer recycled alternatives. Lets face it, plastic is not all that healthy either, but that is a debate that is going to rage on for some time. So school and town administrators, instead lets agree to compromise, if you are planing on removing a playground for what ever reason, you better at least replace it with an equal or better structure! Otherwise you have officially neglected each and every kid that will play on it.

August 14, 2009

Jyetech oscilloscope DIY KIT

A while back on gizmodo they had this oscilloscope kit for $33 from SeedStudio, which I had planed to purchase and try my hand at putting together for a while now. If it worked, although simple, it would work well for the basic circuit projects I occasionally work on. Also it may allow me to finally use the coin and dollar bill collector I have laying around. Oh, and if your are not sure what an oscilloscope is or why you would want one, click here



So after two weeks of shipping from Hong Kong it arrived and I got to work. First off I had to break down and buy some thin solder (0.32), as the thick kind (if you know me you have probably seen it) I am used to using for everything just would not cut it this time. Looking back I probably should have gone with an even thinner diameter and also grabbed some liquid flux as well, as there where a few places that the solder just refused to stick to easily. However the hardest part of the whole project was the tiny components. It was almost frightning how small most of the resistors and capacitors where when I opened the kit, and there are a lot of them to solder in very small places very close together. Going slow it took over nine hours to get everything connected and working, but was worth it in the end. Check out the picture below to see what I am talking about!



When everything was in place on the back of the board I plugged it in and checked the voltage and everything looked okay, but it was slightly unnerving as there was no way to completely tell if it would work when the panel was connected. Luckily after finishing the front side and adding the covers, I powered it up and low and behold the boot loader showed up and started graphing. Then after playing with it for a while I was satisfied that I had connected everything correctly and it was functional.

The image below is what the finished back may look like, however my kit was slightly different in that it had a few changed parts. I must confess that my connections where less nice and more painful spiky, but for my first big SMD soldering job I think I did quite well.




You can grab your own kit from SeedStudio in do it all yourself ($33), do only a little of it ($36), or already done ($49) flavors. Also I highly recommend looking at this site for more detailed pictures. I know I would have been in worse shape with out them. My final advice, you should to go with the SMD exempt kit for 3 dollar more unless you really want bragging rights. ^_^ as it quickly gets very annoying for several hours.

August 10, 2009

HTML 5 Canvas

I was almost giddy when I discovered the canvas tag to be included in HTML 5. With this javascript joins the ranks of C, JAVA and VB in the fact that I can quickly and easily draw straight to the window with a few basic APIs. So to have a little fun and to keep my javascript knowledge fresh, I sat down over the last few days and read up on the canvas APIs and played around a little.

(NOTE: IE does not work with canvas by default, use another newer browser!)

First off I started with the basic balls bouncing around program that I did in every other language that can draw. You can check it out here and see the code here.

I had to do a little research on classes in javascript, and while not exactly perfect, they do work as expected. After getting the bouncing shape test working I moved on to make a simple platform game. The hard thing with javascript is that it is slower and far more processor hungry then even java, so I had to be somewhat careful of sloppy waste, however I did not put too much effort into it as this was nothing more then a way to try out the canvas with javascript. You can see the result here and the code here.

All in all I am excited to see javascript starting to show signs of maturing into a really powerful and useful scripting language.

If interested, you can also read more on the canvas tag here.

August 4, 2009

JamBot

A while ago I was introduced to the online web game Jam Legend, so I checked out the site. The premiss is the same as any of the music games, you hit the notes as the move on the screen. I played for a while, then got bored and forgot about it till this week. However, after playing it again, and getting bored again, I decided to create my own challenge and finally check out the Robot class in java to see if I could create a program that could play it for me.

The Robot class is a java package that is designed to aid in computer automation. You can have it look at the current screen object and then move the mouse or hit keys. The big challenge for me was getting the bot to be able to recognize what was happening on screen. Like any robotics programing it is easy to say that it will look here and do something, but actually making it happen is quite a bit more challenging. To start off JamBot requires you to drag the transparent window over the game, this sets up a view port for the bot to look at a few different locations, namely in and just above the five note zones. The challenge with this is that when playing not only do the note locations change when you need to hit a key, it also changes the background colors as your multiplier increases. In order to adjust for this, the easiest way is to check the color percent of the note color for that spot, vs just seeing if the color has changed. If you look at the included code, the values have been adjusted to what I though worked best, but you may have better luck with some further adjustments. The next step was to also have the bot look just above the note zone to see if there is a hold note active. Then if a color match is found, instead of unlocking the key, it waits for the hold to finish. After figuring out all this, and a few hours later, I had a working bot, just for the insane tap difficulty which would get around a 90% on most songs. Is it perfect, NO, however it looks and act like a normal person playing with normal skill would.

Now if I was interested in further development I would look into adding separate Robot objects for the different notes, I think this will improve accuracy and timing, by using different threads for each zone. Right now the bot is missing notes due to the main loop not being fast enough to either see the note coming or hit it before it is out of range. I am reasonably sure that a more streamed lined threaded setup will fix this. Also it is missing the ability to select different difficulty setting, and needs an included feature for strum. All which would not be too hard to add, but I will leave that up to some one else, as I have other projects to start.

Quick Instructions for Use
[Only works for Insane Tap]
1. Open JamLegend and get to the point that you can hit play to start the song.
2. Start JamBot and drag window till the lines and circles line up on screen.
3. Click the Setup Button and then drag the window to the side.
4. Once out of the browser window click start.
5. Start your song and watch as it plays its self.

As usual I have uploaded the compiled class (MAC) and the java source code for anyone to develop further, however please credit me if you do. Download Here and enjoy.

July 31, 2009

Sysadmin day!

Once again it is time to thank our sysadmins that keep the internets running smoothly! Not that you should only thank them once a year.

Here is a blurb from sasadminday.com
"A sysadmin makes sure your network connection is safe, secure, open, and working. A sysadmin makes sure your computer is working in a healthy way on a healthy network. A sysadmin takes backups to guard against disaster both human and otherwise, holds the gates against security threats and crackers, and keeps the printers going no matter how many copies of the tax code someone from Accounting prints out."

So take some time to day to stop by and say thanks! Happy 10th annual sysadmin day!

Check out more here

July 30, 2009

Xbox USB Controller Mod

The xbox I got off of ebay had three controllers with it, however I recently noticed that one of them did not have the breakaway connector I needed to actually use it. So I looked online and found I could get one for $5, however, my cousin was only here for a few days and I wanted to play three person halo 2 matches. So like any resourceful modder I decided to change it to usb.



The basic design of the xbox uses a modified usb port to plug controllers in, with an extra yellow line that seems to be used for the light gun from what I have read. So there is nothing stopping you from changing a controller port to a standard usb port. This will not only let you use an xbox controller with a usb port, but also a keyboard if your dash will recognize it. You can see from the pictures I have drilled out the plug in the fourth port and glued a standard USB port inside. This looks quite nice from the exterior. Next I cut the breakaway end off the controller and connected a usb plug instead. No real brain work was necessary as you simply ignore the yellow wires and match the red black blue and green wires on the inside of the xbox and in the controller wire. After everything is connected, the controller can be plugged in and used like normal. You can get more information and pictures here on how to connect the usb wires.



As an added bonus you can now use the usb xbox controller with your computer as well. Check the links below for the drivers.
Mac Driver
Windows Driver

July 29, 2009

Halo 2 Killtrocity V2

One of the perks of having a modded xbox is that you can mod and play modded games. Halo 2 Killtrocity is a collection of modded halo 2 maps, however the interesting part is that this does not mean only the included maps have been changed, now you can also play on a few included campaign maps as well. Any one up for capture the flag on the large bridge level with tanks! Also to make matters even better, the weapons and vehicles have been altered as well. This ranges from simple skin changes to a gun the fires plasma grenades. (As a side note. I will never play with Norm on that map, I HATE STICKYS). But that is not all, ever want to use the hunter beam cannon, well now you can! There are a ton of vehicles changes as well, but you can find them out on your own. I must say I had a lot of fun playing with my cousin on these maps, however a large group would be even more fun, I guess I will have to start looking into XLink Kai.

Check out the video below to see what some of the changes look like. PLEASE NOTE that the music may not be to your taste (it is not mine) and you may want to mute it as there are no other sounds.


Read more here.

July 20, 2009

Hamburger Bed


I am greatly amused by this! I love it when people create something cool or weird out of common items.

Check out the website here.

July 19, 2009

XBOX Soft Mod

My friend Matt had soft modded an xbox he got during my last year at school, at first I though it was cool, but did not see any use, however I quickly started to love the ability to stream any media to the big CRT tv we had in the living room. After I graduated I started to miss that ability, as well as having something to play Halo 2 on from time to time. So I went on ebay and found a good deal for an first gen xbox with three controllers, the advanced av pack(s video + optical sound) and the DVD remote kit. All for $33, which is not a bad deal at all. Then after waiting a week for it to arive, stupid ups ground, I finaly got a chance to have some fun with new hardware.

Fist off I read up on the steps to soft mod an xbox, check it out the tutorial here. I had no problem getting my kernel version and using ndure to build a installer, then packing it up and for burning a disk with xboxhdm. However that was when my problems started to happen, first off I could not get the drive unlocked by hot swapping the drive, it ended up not being a swap issue, instead it was a bios problem with the dell model I was using. After a few hours of poking I finally realized I had to plug the drive in first for the bios to know that there was a drive attached then do a double hot swap to the xbox for unlocking then back to the computer. I only figured it out because the drive would only show up if I plugged it in before starting the computer.



After getting the drive hot swapped, I ran into my second problem, the install failed due to lack of space. I am still not sure what was up with this, however after using the restore option twice, I finally decided to try letting it fail and see what happens. This turned out to be fine as it still soft modded the drive, which started up fine, however it was lacking any applications other then the basic dashboard. This was fine as I was able to grab a copy of ConfigMagic and ftp it to the apps folder and then use it to get the EEPROM off the board. This was my main focus as after I got the EEPROM I could always unlock/lock a new hard drive at any time. After I had it backed up I was able to breath easy.

My next step with to change the drive to a 200Gb so I would have plenty of room for movies and other files. This also gave me a challenge as well, as I did not have a DVD drive in the PC I was using, which meant I could not use xboxhdm to format the drive. I was stuck for a bit till I could out that there is a much easier way to clone the drive by using Chimp (Read more Here). I did a test on a 10Gb drive first and it cloned it perfectly. Then I tried the 200Gb, sadly it took three tries, but after stalling and eventually returning to the main menu a few times, it finally moved on to the next menu and I was able to clone it. The nice feature of Chimp is that automatically formats the F partition with the extra space difference between the drives.

Now that I had my drive all set and the xbox soft modded all I needed to do was install XBMC as the dash, which was simple, and then move all my files over to the hard drive, which took the longest till of all. After that I was playing with the built in skins. Matt had the xTV skin that I liked, but I eventually decided on MediaStream as my favorite skin, and I think it is a little easier to use for my family as well.

All in all, a successful and useful mod, now I just need to mod the stock fan, as it is loud and annoying at times.