Project Codename: Sharp Pointy Teeth

Announcing:
Project codename: Sharp Pointy Teeth
Platform: iPhone/iPad
Language: Objective-c
Status: Under Development
Release date: Hopefully by summer 2011, realistically when-it-gets-done.

Project Details: This project is going to be a native app for the iPhone and later the iPad that relies heavily on the devices’ built in camera. The rest is top secret.

I plan to release some camera access source code as well as a basic replacement for the apple camera app that lets you take pictures using the volume buttons. This part obviously won’t be released via the app store, but anyone with a developer certificate could install it on their own devices for personal use.

Also, as frustration ensues, there are sure to be posts on my struggles with CoreData, AVFoundations, UIKit, and whatever other frameworks decide to pick a fight with me.

“Access Forbidden”

I’ve been fighting with XAMPP on and off for a few weeks now, repeatedly getting an error:

Access forbidden! You don’t have permission to access the requested object. It is either read-protected or not readable by the server.”

whenever I try to launch one of my sites on my local computer.

My usual technique when starting a new project with XAMPP (and previously MAMP), is to create a symbolic link from the /Applications/XAMPP/htdocs folder using “ln -s /path/to/website ./website” and thus *usually* being able to access the site via the url “localhost/website”.

This worked in the past with MAMP, and for the first few projects I set up with XAMPP. However, the last 3 times I tried to set something up, “Access forbidden”.

Every time this happened, I googled around, look at permissions, tried all the suggested fixes all to no avail. Until finally I noticed a similarity between the 3 failing projects, they are all located inside my ~/Documents/ folder. On a whim I moved them out into ~/someotherfolder/ and magically, the “Access forbidden” has gone away.

I don’t know why this is, or why it effects XAMPP and not MAMP, but I’m glad to finally be done fighting with my computer over it.

Javascript (Unityscript) vs C# for Unity game development

I have, today, made the decision to switch from Javascript/Unityscript to C# for my Unity 3D game development project.. and here are the list of what finally pushed me over the edge:

For iPhone development, it yields better performance to staticly type all your variables, leading me to type

    var i : int = 0;

far too often. If I have to enter the type I may as well type

   int i = 0;

Javascript does not allow explicit pass by reference or ‘out’ method parameters, thus I was unable to create helper methods for with both a data and a boolean return value. For instance to wrap up the ray casting code that I use to see what the users touch has selected, which I have been doing a lot of lately.

And finally, the one the pushed me over the edge, the Prime 31 studios – iPhone Game Center plugin which appears to be an all in one add on that gives you easy access to the iPhone Game Center without having to figure it out yourself.. and guess what, it’s written in C#. I have yet to confirm its awesomeness, but I hope I will not be disappointed.

and as an added bonus, the Mac MonoDevelop app has way better auto complete for C#, I get to use the amazing ‘#region’ tag again to organize my code, and I get C# properties again. All Awesome!

So, for this medium, C# wins by a landslide. That is all.

Jo-el

Unity 3D iPhone – Creating a smooth follow path

Recently, I was looking for a way to make a character follow a smooth path created by tracing your finger on the screen. With a little searching I was able to find the Spline Controller project on the Unify Community wiki. However, the script required you create your path in design time by instantiating game objects to set “waypoints” for your path. The script then uses (I believe) a Hermite Spline to smooth the path and sets your specified game object to move along the path.

My goal: To be able to create the path at runtime using a finger drag as input.

AND: To have the character follow the path based on internal movement instead of external (ie. the character walks at its normal speed along the path, instead of being moved at some predefined speed as was the case in the Spline Controller script)

After some hackery I am getting close, I have set up a queue type structure that allows you to add points on the fly, then at any time allows for calculation of a spline curve. Prelim tests with the OnDrawGizmos function shows the path created:

Now I just have to make a character follow this path at runtime…

iDroid – dualboot (install) android on iPhone 2G

Mood: complacent
Project: Install Android OS 2.2 (Froyo) onto my old iPhone 2g
Other Info: Project performed on a Macbook Pro with 0SX 10.6.4
Music: Classical (Georg Friederich Händel – Wasse)

Prereq: Upgrade to 3.1.2 – 4.0.2 .ipsw and jailbrake

For 3.1.2 I used:
Pwnage Tool 3.1.4 – http://www.hackint0sh.org/f146/92157.htm
IPSW Download site (3.1.2) – http://www.felixbruns.de/iPod/firmware/

Steps:
1. Download Pwnage tool and iPhone Software from links above.

2. Uncompress Pwnage tool and copy / run app

[note] Upon loading Pwnage tool I got an error saying something about me not having iTunes 8 or later, seeing as I have iTunes 10 I ignored the error and it worked out fine. [/note]


3. Select iphone 2g -> click next ->
4. Select your 3.1.2 .ipsw file -> click next ->
5. Select “no” when it asks if you have a contract that would activate normally (unless you have an iPhone plan with AT&T)
6. *wait*
7. You will be asked “has your iphone been Pwned before?” .. Well, has it? .. For me it was no!
8. Follow onscreen directions to enter DFU mode
9. Close pwnage tool – go to itunes and hold ‘option’ -> click ‘restore’, choose the custom firmware you just made
10. *wait some more*
11. DONE!

Now for the fun bit.

Installing iDroid 2.2

Follow instructions at http://www.idroidproject.org/wiki/Installing_iDroid_(Bootlace)

except - I got an error at step 12. Apparently the usbreadline installer from the “OS X 10.6 Preparation” step was old or something.

To get a working version of usbreadline:
Install macports – http://www.macports.org/install.php -> click on one of the links in the sentense ““dmg” disk images for Snow Leopard, Leopard and Tiger as a legacy platform”
After macports installs, open terminal -> type “sudo port -v install readline”
*wait* for it to finish, took about a minute for me*

also – set autolock to never before starting to work with cydia, if your phone goes to sleep during the cydia configuration steps it screws stuff up.


Outcome: SUCCESS!!
Morale: Sense of smug nerd superiority
First assessment of usefulness (0-10): 0

Is personality an accident?

Is personality an accident? With a system as complex and complicated as our brains, is it possible that our personality is simply an accidental side effect of trying to store everything we have ever tried to learn and everything we have ever experienced?

Interesting TED talk about mapping the brain’s connections: http://www.ted.com/talks/sebastian_seung.html