Accelerometer in Simulator (+implementation idea)

During the development of Doodle Dash! and currently it's sister-title "She Doodle", it became a little time consuming having to build for device to be able to test out the game (due to both being tilt-based controls).

So I came up with an idea... Now I know the Corona simulator AND the Xcode simulator doesn't simulate accelerometer events, so it might not be possible to even do this, but I'll just throw it out there and I'll let the Corona developers decide:

You double click on any part of the simulator window outside of the screen (such as the black part of the iphone), the mouse pointer disappears and now accelerometer events are bound to the mouse movement. For example, you move the mouse to the left, it rotates the "iPhone" to the left and so on.

Having a feature like that I think would make the lives of anyone who uses accelerometer in their apps way easier.

Not something that's really high priority, but would be nice to see maybe by the time final release is out.

Thanks for all the hard work from those who develop Corona SDK!

Jonathan Beebe

I agree there is a need to be able to test this in the simulator! I like your idea but think it would be even better to have another window appear showing the orientation of the phone. You could then mouse click/rotate the phone in that window on any of the x,y,z axis.

I played around with iTorque a while back. They didn't have any support for it either. However you could bind keyboard keys to some testing functions to help simulate it.

I'm just about to start development on a game that uses the accelerometer and I'm not looking forward building to device all the time.

I added this as feature request #921 (internal).

-Tom

If the Corona sim could take external events from the hardware it would be a huge productivity boost. Unity has a loop where it sends a video back to the handset but I don't think this is necessary - at least for testing accelerometer actions.

I developed this joystick to add an input that users can play with and if necessary simulate the accelerometer

http://developer.anscamobile.com/code/joystick

It gives x and y values from -1 to 1 just like the accelerometer and you can set it up with some conditional statements so that if you are in the simulator it is used and if on the device it is hidden and the accelerometer takes precedence.

I use it all the time to simulate different inputs while in the simulator, it saves having to go back to the device all the time.

Not ideal but a good work around I hope!

Good idea. I'm now using it too. Thanks.

can corona use the accelerometer in the macbook pro?
cause i seen some games use that. may be that will be great for development.

Not sure if this has been seen yet but the Simulator for the DragonFireSDK has tilt support as can been seen in this video at around the 1.40 mark - http://www.dragonfiresdk.com/video/index.htm

Mine is getting close to release

http://coronaremote.com/

Corona Remote is now released, accelerometer support in Corona Simulator!

http://www.coronaremote.com/

views:2260 update:2011/9/18 20:20:08
corona forums © 2003-2011