Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Corona Remote - Accelerometer in Simulator - Released
Started by Matthew Pringle Jan 01 2011 04:47 AM

81 replies to this topic
[TOPIC CONTROLS]
Page 1 of 4 1 2 3 »
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK



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.









uid: 5354 topic_id: 4773 reply_id: 304773


[TOPIC: post.html]
#2

Dotnaught

[GLOBAL: userInfoPane.html]
Dotnaught
  • Contributor

  • 370 posts
  • Corona SDK

Very cool. Looking forward to it.
uid: 1560 topic_id: 4773 reply_id: 15245


[TOPIC: post.html]
#3

jhocking

[GLOBAL: userInfoPane.html]
jhocking
  • Corona Geek

  • 1,223 posts
  • Guests

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


[TOPIC: post.html]
#4

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

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.
uid: 5354 topic_id: 4773 reply_id: 15257


[TOPIC: post.html]
#5

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

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
uid: 5354 topic_id: 4773 reply_id: 15258


[TOPIC: post.html]
#6

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

Looks like a neat dev tool -- what's the price going to be? How much of my birthday money do I need to save? ;)

Jay
uid: 9440 topic_id: 4773 reply_id: 15268


[TOPIC: post.html]
#7

NayGames

[GLOBAL: userInfoPane.html]
NayGames
  • Contributor

  • 191 posts
  • Corona SDK

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


[TOPIC: post.html]
#8

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

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.
uid: 5354 topic_id: 4773 reply_id: 15276


[TOPIC: post.html]
#9

bedhouin

[GLOBAL: userInfoPane.html]
bedhouin
  • Contributor

  • 258 posts
  • Guests

That's a very clever solution!
uid: 11393 topic_id: 4773 reply_id: 15285


[TOPIC: post.html]
#10

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

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
uid: 24 topic_id: 4773 reply_id: 15293


[TOPIC: post.html]
#11

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

Edit, by the way, did anyone catch the fact that the app is "universal". ;-)

Thanks again @Pringle ;-).

Carlos
uid: 24 topic_id: 4773 reply_id: 15294


[TOPIC: post.html]
#12

linh

[GLOBAL: userInfoPane.html]
linh
  • Observer

  • 4 posts
  • Corona SDK

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.
uid: 9075 topic_id: 4773 reply_id: 15305


[TOPIC: post.html]
#13

rdcube

[GLOBAL: userInfoPane.html]
rdcube
  • Contributor

  • 178 posts
  • Corona SDK

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 ;)
@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?
uid: 7856 topic_id: 4773 reply_id: 15306


[TOPIC: post.html]
#14

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

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!!!
uid: 11904 topic_id: 4773 reply_id: 15310


[TOPIC: post.html]
#15

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

@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.
uid: 5354 topic_id: 4773 reply_id: 15335


[TOPIC: post.html]
#16

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

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.

uid: 5354 topic_id: 4773 reply_id: 15337


[TOPIC: post.html]
#17

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

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


[TOPIC: post.html]
#18

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

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/.
uid: 5354 topic_id: 4773 reply_id: 15339


[TOPIC: post.html]
#19

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

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


[TOPIC: post.html]
#20

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

@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"
                        },
                },
        }
}
uid: 5354 topic_id: 4773 reply_id: 15341


[TOPIC: post.html]
#21

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

universal build is coming on the next drop.

also while I agree that we should have built the tool, We, as in Ansca, want to foster 3rd party developers to create add-ons for Corona. If we do everything ourselves, we hinder development growth and a healthy eco-system where everyone benefits.

Matthew approached us with the idea not long ago, and I thought it would be a very good feature to have.

And I think that the way it should be looked at, is, wow, these guys are doing tools for Corona, that means Corona has staying power, and quite frankly, who knows, maybe, one of these days, it could be that some third party tool gets integrated into Corona. And that tool could be yours. Who knows, that is the way thing happens sometimes....

Thank you again Matt, and our other 3rd party developers for supporting Corona.

Carlos.

- ;-)
uid: 24 topic_id: 4773 reply_id: 15351


[TOPIC: post.html]
#22

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

Ive uploaded a youtube video as requested. It shows 1 simulator running Corona Remote with another simulator on a different computer ( through screen sharing ) running the remote.lua file and receiving the data. Im simulating the accelerometer input in this version as everything is running in Corona Simulator.

uid: 5354 topic_id: 4773 reply_id: 15357


[TOPIC: post.html]
#23

rdcube

[GLOBAL: userInfoPane.html]
rdcube
  • Contributor

  • 178 posts
  • Corona SDK

@matthew,
could you make the video where you're actually holding the device so we can see how passing data from an actual game would look like?

I think $9.99 might be a bit too much, but if it'll help test accelerometer and 'touch/tap' events on our games, I think it'll be worth it.

sorry for the dumb questions, I just don't quite get how this really works =S
RD
uid: 7856 topic_id: 4773 reply_id: 15391


[TOPIC: post.html]
#24

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

@Matthew,

Did you consider making this solution work with the synch cable through the USB? I think this could help eliminate any potential latency issues. Proximity should not be a problem anyways since when I'm developing & debugging my app I'll be in front of my dev machine. Just a thought.

PS. I do look forward to seeing how you communicate with the PC via IP though. I think what you've done there can be reworked for some peer-to-peer networked games that I had in mind.
@Carlos,

I agree with your sentiments. Divide & conquer comes to mind. For a well written tool that nicely complements Corona I don't think the price point is off. I'm happy to see such 3rd Party developers stepping up to the plate and giving us excellent solutions such as the CPM, The Particle Candy, Corona Remote, Lime, Director Class, Beebe Game Lib etc. All the signs that make you go warm and fuzzy about the platform choice that you've made not so long ago...

Errm, so when do we get to see the next drop? :-)
uid: 11904 topic_id: 4773 reply_id: 15393


[TOPIC: post.html]
#25

Matthew Pringle

[GLOBAL: userInfoPane.html]
Matthew Pringle
  • Contributor

  • 660 posts
  • Corona SDK

@rdcube here is a real video of the remote in action.

@ksan The remote is totally written in Corona and is transmitting over tcp. Thats the only way to do it at present as USB isnt supported in Corona and it would really complicate things. The video above is done with a poor wifi connection and as you can see it runs perfectly well, the remote will signal an error is the connection gets too poor and with auto disconnect if the connection is lost altogether.

Im thinking about writing a multiplayer library next as I pretty much have the networking down. I would need an new addition to Corona though for pairing. If it was what people wanted I could give it a look.
uid: 5354 topic_id: 4773 reply_id: 15438



[topic_controls]
Page 1 of 4 1 2 3 »
 
[/topic_controls]