User Tag List

Results 1 to 5 of 5

Thread: iOS5 beta and accelerometer object

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iOS5 beta and accelerometer object

    I built a movement system based around Steven's accelerometer object example, it works perfect on iOS 4.x. The system I built with it starts the frame by taking the initial Y coordinate. Then as it tilts up or down, it will move the character accordingly. I have a stopped position as well as two different speeds, light tilt=slower movement, anything larger, faster movement. I also have a calibration button that will reset that initial coordinate.

    Now when I compile through Xcode 4.2 beta and load up onto a device running iOS 5 (beta 7), there is no happy medium where the character is perfectly stopped. And there is no light up/down tilt. The slightest movement will either bring the character up as fast as possible, or down. And pressing the 'calibrate' button, instead of resetting the initial coordinate, it will simply crash the game.

    I can probably troubleshoot this and get it working again in iOS 5, but will completely ruin it in iOS 4. And I'm not sure what I could do with that calibrate button as of yet. It's the same Xcode file I used in Xcode 4.1.

    It's hard to tell if it is a compatibility issue with the MMF2 export object, or something on Apple's end. I'm also trying to find a work around since eventually, I would need to have the game working on both operating systems. Is there an object right now that can detect the iOS version? That would probably be the simplest thing, or I can experiment with MMF2's built in accelerometer movement.

    I don't know, anyone have any ideas?

    Thanks

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: iOS5 beta and accelerometer object

    Sorry for the double post, but does anyone have any insight on this?

    Thank you

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: iOS5 beta and accelerometer object

    Actually, I think I come down to what the problem may be. Sorry again for the extra post, for some reason the "Edit" button is not showing up tonight.

    My counters "AccelerometerStart" and "AccelerometerCurrent" seem to be working properly, there's a problem with the way the events are pulling the information from them.

    For example, I have it as:
    "Timer = 00.05 Seconds" = Set "AccelerometerStart (Counter)" to irect
    "Always" = Set "AccelerometerCurrent (Counter)" to irect
    ""AccelerometerCurrent" > "AccelerometerStart" -0.1" + "AccelerometerCurrent" < "AccelerometerStart" +0.1" = Player-Stop.
    ""AccelerometerCurrent" > "AccelerometerStart" +0.1" = Player-Direction down, speed 40, deceleration 0, etc.
    "AccelerometerCurrent" < "AccelerometerStart" -0.1" = Player-Direction up, speed 40, deceleration 0, etc.

    (Those numbers aren't exactly what I have in the game, just examples, also note that the player is a "Bouncing Ball" movement).

    In theory, this should work. Actually... It DOES work running iOS 4.X. In iOS 5, it doesn't. It reacts the same no matter what I change those numbers to. Either my player will move up, or he'll move down. No "stopped position." I even have the AccelerometerCurrent and AccelerometerStart counters on screen while playing. I'm getting the same counter results as my other device still on iOS 4.X.

    Something is just happening where it isn't processing these events correctly. Maybe I'm going at it the wrong way. Maybe there is some kind of other formula I can do with it? Could be a exporter bug? Not sure. Need some help on it if anyone can.

    Thank you

    Edit:
    Just another tidbit I just discovered with it. I don't think it's handling decimals correctly. The events I shown up above, I changed it from a decimal, to just a regular number (changed the 0.1 to 1). Seems to be working correctly now, as in I have to pretty much fully rotate the device to get him to move... Just have the major issue that the irect event is heavily focused on decimals.

    Also, just so I'm clear with all my information. The character does move UP/Down still correctly. Correctly as in, tilt the device up, it moves up, tilt it down, moves down, just not when it's supposed to (according to how I have the events set up). In the event where he is supposed to be stopped, he just "jumps" up and down. Soon as my girlfriend gets home with her iPod Touch, I'll get a video comparing how it's acting on the two different iOS versions.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    NUGGETRON's Avatar
    Join Date
    Aug 2011
    Location
    Antarctica
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: iOS5 beta and accelerometer object

    JEFF IS READING THIS POST!!!

    Jeff, What's your MOO server address?

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: iOS5 beta and accelerometer object

    Here's the promised video from the last post. (Again, the edit button is missing).

    http://www.youtube.com/watch?v=Cv3Y4Rug_Rw

    Apologizing now about the quality. Actually recorded this from my laptop's webcam. The first part shows iOS 5 (Beta 7) running the same build of my game as the iPod Touch running iOS 4.1 (works the same in any iOS 4.X build). You don't see them in the first part because I can't hold my phone correctly, but in the second part, you'll see 2 counters in the bottom right corner. They're the AccelerometerStart and AccelerometerCurrent counters. They seem to jump around on both devices pretty much the same, but you'll notice the character stays in one place in the second part, but it all jumpy on the first.

    Also note: in the first part of the video the iOS 5 device, if I tilt it up or down it will move the corresponding ways, I don't think I shown that in the video. What you see is me holding it steady where he's supposed to be "stopped."

    edit:
    If it is a problem with the exporter, I don't mind sending the .mfa to someone if it can be fixed and you need something to take a first hand look at. Obviously, I'd want the problem fixed as soon as possible in the upcoming iOS exporter release. (The current build of CyberPigeon is actually in review as I post this message :P).

    Edit 2:
    Another discovery with it, I was compiling the iOS 5 with Xcode 4.2 beta. And iOS 4 with Xcode 4.1 (stable)... I decided to download the 4.X thing for Xcode 4.2 and the same problem is now happening on the iOS 4.X device. So it's definitely an issue with Xcode and not iOS 5 as I originally thought.

    Edit3:
    Alright... You know what, I just found out I was able to send to an iOS 5 device from Xcode 4.1. And it's now working fine. Definitely an issue with Xcode 4.2.

    I guess this thread could be closed now. I didn't get too much with help, which is a good thing because it pretty much forced me to take a look into the problem myself, and in the end was able to find out what it was!

Similar Threads

  1. Accelerometer object - example
    By Jeff in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 2nd June 2014, 12:04 AM
  2. Accelerometer in beta 31?
    By kiko in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 14th June 2012, 02:22 PM
  3. First iOS beta games not compatible with iOS5.00
    By Fanotherpg in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 4th November 2011, 01:21 PM
  4. Beta 8: Accelerometer Read Lag
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 17
    Last Post: 8th January 2011, 10:16 AM
  5. Beta 3 - Accelerometer
    By Jeff in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 24th October 2010, 11:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •