October 26, 2009

Halloween costume confusion

With this years halloween costume finished, I was thinking back on the other costumes I have had over the years. However it did not take long for me to realize the trend of people having no clue to what I am going as. Now for a few of the costumes I have to admit that it was expected that my idea was obscure, but some times it was just annoying. For a bit for fun let me give some examples with the reactions I received. Oh and if you do not notice, I have never had a store bought costume.

Green Power Ranger (Back when it was just starting!)
- Had no clue, I was too early as next year there where other kids with commercial ranger costumes.

Red Coat Costume (I liked the hat)
- Thought I was a pirate... sigh learn more history people!

Chinese dragon (of one)
- Had no clue, I thought it was cool, and it even ate the candy.

Kosh-tume V1 (Babylon 5)
- Had no clue, sort of understood when I said an alien.

Custom Dn'i Cloak (Myst)
- Had no clue.

Kosh-tume V2 (Babylon 5)
- Most had no clue, a few B5 fans caught on.

So for this years costume, which I will post in a day or two, I expect the same as usual. It is funny, as I am so used to it if someone I do not expect knows what I am I was be flabbergasted. Still, I am always far happier with a unknown custom costume, it just fits me better.

October 23, 2009

Installing Quicktime 7 in Snow Leopard 10.6

On small annoyance with 10.6 and Quicktime X is the some important older components do not work yet. So in order to use these older components you will need to install an older version of quicktime 7.

1. First off download quicktime 7 from Apples website here.

2. Right click and select view contents of the Installer and view the Contents folder.

3. Expand the Archive.pax.gz and open the resulting Archive folder.

4. In the Archive/Applications folder drag the Quicktime application to your Utilities folder

5. In the Archive/System/Library/PreferencePanes double click the QuickTime.prefPane and have it install for all users.

6. Register Quicktime pro if you have a license key.

There you have it a easy way to use Quicktime 7 in 10.6 with out having to reinstall your OS.

October 20, 2009

Mac OGM to iPOD conversion

This is more of a post for my self because I always forget what the name of software tools, so here is my simple guide to converting OGM files on a Mac.

1. Download D-Vision from http://www.objectifmac.com/

2. Download and install the Xiph quicktime component. from http://www.xiph.org/quicktime/

3. Click tools and use the OGM Demuxer function to split the OGM file into separate parts.

4. Open the AVi video only file in quicktime 7. (Snow Leopard aka 10.6 will need an older version of Quicktime as vr X does not work with the Xiph component yet)

5. Copy the audio track and use the "add to movie" option to insert it over the video track.

6. Finally use the export option in quicktime to export it as iPhone or iPod format.

This works fine under 10.5 and below, however as noted in 10.6 you need to use the older ver of quicktime, see my guide on installing Quicktime 7 on Snow Leopard here.

October 5, 2009

Online IE Testing

I had stumbled across IE Netrenderer a few weeks ago, it is a site that lets you put a url into the form on the page and will return a picture of how that site looks rendered in different versions of Internet Explorer. For me as a mac owner this is awesome as it allows quick page testing in IE. I have been using Crossover to run both IE6 and IE7 and for the most part works quite well, however Crossover has some issues with occasional things like transparency in IE7 and can not run IE8. So for final tests IE Netrenderer is perfect for the job. As an added bonus it also allows you to do an overlay of IE6 vs IE7 for ironing out these few small differences in site layouts. Check it out for you self, if you are a Mac or Linux user I guarantee this is something you will want to bookmark.

September 30, 2009

Tomcat install on OS X 10.4

I had seen Tomcat on job applications before, however this was the first time I had actually played with it. What is it? "Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process." So it allows you to run Servlets and JSP on a server. Now I needed to find out how to install it on my Lazurus server running OS X 10.4.11 with the latest Java update.

1. First download tomcat from HERE (I used 5.5, so not sure about 6)

2. Then rename the unarchived tomcat folder to "Tomcat"

3. Drop the folder into /Library/

4. Fix the UNIX permissions recursively to 777 (BatchMod is a simple way if you do not know chmod, just check all of the boxes)

5. Edit the /Library/Tomcat/conf/tomcat-users.xml file, see below for example.


<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat,admin,manager"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>


6. Start tomcat by using the terminal to run "cd /Library/Tomcat/bin" and then "./startup.sh"

7. In a web browser head to http://127.0.0.1:8080/ and you should see the Tomcat start up page.

If you want to read on further I figured out most of my instructions from the Tomcat Wiki, so head there for more info or if you get stuck.

Just in case you where wondering, as I was, put your jsp and servlet files in the /Library/Tomcat/webaps/ folder. The webaps/ROOT folder being the one displayed at the base url address. So for now I am just using that folder for testing.

JSP is quite simple to pickup at a basic level if you already know Java. However there are a few differences do to it being web based, but so far I like not having to compile manually. I had no problem writing a few simple classes with outputs and will later play with post and get. HAHA, tri-fecto of web programing achieved (PHP, ASP, JSP), hm still need to sit down with Perl one of these days.

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.