Corona Remote - Accelerometer in Simulator - Released

Just released!

http://www.coronaremote.com

This is a remote control application that sends accelerometer data to the Ansca iPhone development platform Corona.

Using your iPhone 3G, iPhone 3GS, iPhone 4, iPod Touch or iPad you can now send real accelerometer data to the Corona Simulator for use when developing accelerometer powered applications and games.

Accelerometer Data Collected

xGravity
yGravity
zGravity
xInstant
yInstant
zInstant
isShake

Ansca, the Ansca Cotton Logo, Corona, the Corona Logo are trademarks or registered trademarks of Ansca, Inc. © 2008-2011 All Rights Reserved. Used With Permission.

[import]uid: 5354 topic_id: 4773 reply_id: 304773[/import]

Very cool. Looking forward to it. [import]uid: 1560 topic_id: 4773 reply_id: 15245[/import]

Looks really cool, can you explain a little more about how this works? [import]uid: 12108 topic_id: 4773 reply_id: 15256[/import]

You buy the app from the app store and then download a file from the website remote.lua. You then require the file in your game / application.

Once you have opened the app on your iPhone you enter the ip address of the computer running Corona Simulator and it will connect to the computer and start sending accelerometer data from your iPhone to your app. This needs to be on a local network connection.

Instead of getting accelerometer data using the usual method of event.xGravity you now use remote.xGravity etc… Im writing a couple of sample apps including updating Ansca’s Accelerometer1 sample code to work with the remote. [import]uid: 5354 topic_id: 4773 reply_id: 15257[/import]

You also dont need to remove the remote.lua app when building for the device as it senses when its on a real device and provides real accelerometer data. Stops you having to edit your code for final builds / on device testing [import]uid: 5354 topic_id: 4773 reply_id: 15258[/import]

Looks like a neat dev tool – what’s the price going to be? How much of my birthday money do I need to save? :wink:

Jay
[import]uid: 9440 topic_id: 4773 reply_id: 15268[/import]

Holy cow, this looks sweet! Look forward to hearing more! [import]uid: 8782 topic_id: 4773 reply_id: 15270[/import]

The price is going to be $9.99. Its a universal app and will work with the iPad as well as having hires graphics for the iPhone 4 retina display. [import]uid: 5354 topic_id: 4773 reply_id: 15276[/import]

That’s a very clever solution! [import]uid: 11393 topic_id: 4773 reply_id: 15285[/import]

Great work Matthew !

I had a chance to try it over the weekend and it is a great untility for anyone doing Corona work.

Carlos [import]uid: 24 topic_id: 4773 reply_id: 15293[/import]

Edit, by the way, did anyone catch the fact that the app is “universal”. :wink:

Thanks again @Pringle ;-).

Carlos [import]uid: 24 topic_id: 4773 reply_id: 15294[/import]

While it’s useful no doubt, Ansca should put out a remote that works like the Unity Remote and is integrated directly into the simulator. No need to include anything or set IP addresses. You can test the Unity remote in the editor/simulator directly without any code changes. Unity puts theirs up for free, too. [import]uid: 9075 topic_id: 4773 reply_id: 15305[/import]

I agree with linh, I think this should’ve been something that came out of Ansca.
Coming from GS, this is something we got off for free :wink:
@matthew, could you perhaps post a video of how this works? sounds interesting.
@carlos, does this mean we’re getting universal builds on next corona release? [import]uid: 7856 topic_id: 4773 reply_id: 15306[/import]

Great utility app for sure. Great job developing it. My ears are still ringing with the word “Universal” though!!! How come no one has picked on this yet despite Carlos’s tease? Can’t wait to get my hands on this universal capable Corona!!! [import]uid: 11904 topic_id: 4773 reply_id: 15310[/import]

@Ksan Yep its universal and it works great. Ive added a note at the bottom of http://developer.anscamobile.com/content/configuring-projects on how to setup a project for universal.

There is a trick with rendering fonts on an iOS device when using content scaling where you draw the fonts at 2x resolution and then scale by 0.5. You should see it on an iPhone 4, everything is super crisp.

@linh A bunch of people have asked in the past for the remote, every dev platform has its own way of doing things, in XCode for instance you need to buy iSimulate, which costs more. I would rather the community provide solutions like this, the sprite packers, Particle Candy etc… and let Ansca work on the higher level stuff that cant be achieved using lua, such as 2.5D and image transforms. Im charging for it as it took a lot of work, has a very limited appeal. I also provided a Joystick in the sample code area for free which can be used to simulate the accelerometer in 2 directions. Thats what I used before developing the remote. Another platform has a similar solution to that, where the simulator has a little analogue joystick built into the surround.

@rdcube Im putting the site together at the moment, will try to do a vid. Concept is simple though, you include the remote.lua file and then your app becomes accelerometer aware. When you connect the remote it start sending the values across your local network to the simulator.

The reason for the IP address is two fold. 1 Corona doesnt have bonjour incorporated so auto pairing would be almost impossible. With an update to Corona where I could find the local IP of the iPhone I can auto pair using a remote server. But having to set the IP would let a larger studio have multiple remotes running to separate computers.

I will be updating the remote as and when Ansca include new features in Corona such as gyroscope support. I also have a plan for touch to be transmitted across from the iPhone but that too would need a new api adding to Corona when I can programatically simulate a touch. [import]uid: 5354 topic_id: 4773 reply_id: 15335[/import]

Here are the 2 sample apps that come with the application that when you run on your computer will connect to the remote and read back real time results.

Carlos has also given me permission to redistribute the sample code Accelerometer1 which is now also remote aware.

[import]uid: 5354 topic_id: 4773 reply_id: 15337[/import]

So how do we get our hands on the Universal build stuff? Is there a beta you’re on? [import]uid: 11904 topic_id: 4773 reply_id: 15338[/import]

Im under an NDA but im assuming the next release of Corona will include the Universal support. You can obviously plan for it now as it still works the same in the simulator. Ansca have a great relationship with their users so if you email support they will probably tell you when the release is planned for.

There is also the roadmap where you can see what they are working on http://www.anscamobile.com/resources/roadmap/. [import]uid: 5354 topic_id: 4773 reply_id: 15339[/import]

Got it. Glad to hear its near. Will look forward to it. Let me stop hijacking your thread! [import]uid: 11904 topic_id: 4773 reply_id: 15340[/import]

@Carlos

The universal settings should be added to the documentation and maybe a sample setup. Without them Application Loader rejects the application.

settings = { iphone = { plist = { CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png" , "Icon@2x.png" , "Icon-72.png" , "Icon-Small-50.png" , "Icon-Small.png" , "Icon-Small@2x.png" }, }, } } [import]uid: 5354 topic_id: 4773 reply_id: 15341[/import]