Page 1 of 3 123 LastLast
Results 1 to 10 of 25
Discuss iSabre: The iPhone Lightsabre at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Well, the title just about says it all! I started working on a program yesterday ...
  1. #1
    Rookie Array

    Join Date
    Aug 2007
    Posts
    10
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default iSabre: The iPhone Lightsabre

    Well, the title just about says it all! I started working on a program yesterday that utilizes the iPhone's motion sensor to play the sounds of a lightsaber as you swing it about!

    At the moment I have it playing sounds upon open and close and limited swing sounds. More or less it just took me forever to get it playing sounds because I had to edit some of the Celestial headers because of the NSObject.h errors that kept popping up upon compiling.

    I wish to thank the creators of both ApolloIM and also iPong for the audio playing code which I am using in my program. Also I would like to thank Erling Ellingsen from Medallia Blog for his Accelerometer hack because I will be using that code for my later acceleration measurements.

    Right now I'm using the acceleratedInX: Y: Z: method in UIApplication.h for the acceleration measurements, but I'll be switching to Erling's method sometime later today.

    Screenshots / small movie will also be posted later.

    I've got to say, though, that its really fun to swing your phone around and have it actually make some sounds!

    Edit: I see I misspelled saber in the title of this thread but cant delete / edit the title. Any chance a moderator can do this for me?
    Last edited by sword; 09-09-2007 at 06:43 PM. Reason: Misspellings



  2. #2
    Advanced Array

    Join Date
    May 2006
    Posts
    34
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Next up... I THREW MY PHONE THREW THE TV OMGWTF.

  3. #3
    Senior Professional Array dogzilla's Avatar

    Join Date
    Aug 2007
    Location
    Boston
    Posts
    106
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Quote Originally Posted by Fuzzlet View Post
    Next up... I THREW MY PHONE THREW THE TV OMGWTF.
    I am now selling Wii straps for the iPhone.

    Seriously, I was wondering how long before something like this app came out. Cool work. Very amusing.
    "Are you into S&M?"
    "Well...I'm a Red Sox fan. Does that count?"
    Go Sox!

  4. #4
    Senior Professional Array vexta's Avatar

    Join Date
    Aug 2007
    Posts
    102
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Quote Originally Posted by dogzilla View Post
    I am now selling Wii straps for the iPhone.

    Seriously, I was wondering how long before something like this app came out. Cool work. Very amusing.
    wii Straps for the iphone lol very nice

    anywho yea this could be cool for the kids hahah

  5. #5
    Senior Professional Array Dragg1e's Avatar

    Join Date
    Jul 2007
    Location
    Curacao
    Posts
    228
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    18

    Default

    That's good news!! Keep up the good work.
    I was thinking of the same thing last nght!!! lol
    Previously HW Unlocked 8Gb iPhone.
    Now Unlocked 3.0
    Calls In/Out: YES
    SMS In/Out: YES
    Edge : YES
    YouTube :??


  6. #6
    Rookie Array

    Join Date
    Aug 2007
    Posts
    10
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    This is actually turning out to be fairly tough (unless Im going about this the wrong way) because I have to measure the force of the motion. I'll have the force/direction measurement complete or near complete tonight. After that its a matter of making the sound flow well.

    Also, if someone could make a lightsaber graphic in the on and off positions that would be awesome! Maybe different ones with different colors to make things even more fun.

    By the way, it should work when the phone is in the locked position so that the saber won't shut off accidentially if you touch the screen.

  7. #7
    Senior Professional Array tramuyo's Avatar

    Join Date
    Aug 2007
    Posts
    227
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    18

    Default

    this is a waste of time.. BUT ITS QUITE FUN FOR ALL OF US!!! keep goin bro

  8. #8
    Rookie Array

    Join Date
    Aug 2007
    Posts
    10
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Heh, I don't think of this as a waste of time. I'm using this to learn the UI kit and also to better learn Obj-C. I'm also doing it so I can run up to a random person, swing the phone, and have it make an awesome hit sound.

  9. #9
    Professional Array

    Join Date
    Aug 2007
    Posts
    67
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    I support it very much!!! Make the iphone as fun as possible!!
    Not just a boring normal PDA!!!:p

  10. #10
    Rookie Array

    Join Date
    Aug 2007
    Posts
    10
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    hehe, it would be SO awesome if one day there could be a triangulation feature that would estimate the distance between two phones, and using that and the current tilts of the phones determine where an invisible "saber beam" would be located. If this sort of thing could be done on the iphone then you could literally have lightsaber battles that report things on screen. Then again, I'd think that it would require some massive calculations that would more or less freeze up the phone.

    Anywho, just doing calculations for acceleration at the moment. I'm figuring out how many degrees = 1cm of movement so that I can use that constant in an equation which will figure out the momentum of the phone at a given time and then determine which sound to play. I think I'll have to pull out my trusty scale as well, at which point its Force = V * m time. It'll also be able to detect in which direction your moving the phone since I'll be doing some fun lil vector math.

    If you have a suggestion for a better way to do this, feel free to post it! I'm very open to suggestions, corrections, or really anything of that nature.

    Edit: Scratch the physics part of it, I think I was trying to make things way too complex. Right now I'm just using the delta values of a current sample and a previous sample to accomplish the task.
    Last edited by sword; 09-10-2007 at 04:11 AM.


 

 
Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 04:14 PM.
twitter, follow us!