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.

Very cool. Looking forward to it.

Looks really cool, can you explain a little more about how this works?

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.

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

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

Holy cow, this looks sweet! Look forward to hearing more!

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.

That's a very clever solution!

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

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

Thanks again @Pringle ;-).

Carlos

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.

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?

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!!!

@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.

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.

So how do we get our hands on the Universal build stuff? Is there a beta you're on?

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/.

Got it. Glad to hear its near. Will look forward to it. Let me stop hijacking your thread!

@Carlos

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"
                        },
                },
        }
}

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.

- ;-)

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.

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

@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

@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? :-)

@rdcube here is a real video of the remote in action. http://www.youtube.com/watch?v=dXvCRpAFwdY

@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.

I dont know about everyone else but it sure is what I want!!! (Multiplayer pairing that is!)

Me too!!!

Matthew, the more I think about this app the more I like the idea for all round testing. Would it be possible for you to extend the scope and not only send accelerator values from the device to the simulator but also the touch events? This way we could test almost anything in device conditions as opposed to hunting & pecking with the mouse. Just a thought. Thanks for listening.

@ksan

I dont think its possible at the moment but its something im willing to explore. Im waiting for first round approval from Apple and then I can look at adding more features. I think Ansca would need to let me programatically simulate a touch event in the simulator. Much like the jquery click function.

Sounds great! Thanks much for that. Look forward to hearing of your App Store debut!

@matthew,
I see what you're doing, although impressive, I think is backwards to what I had in mind; I thought that I was going to be able to view my game on the device and view the data on the simulator ;P

Looks good, but probably adding the ability to test 'touch' might get me sold...still unsure on how I could take advantage of this tool :(

I like the path you're taking and definitely will look forward to 'multiplayer pairing' code ;)

RD

Just noticing the number of people wanting to simulate touch events. This may not be a viable option for you, but it's working for me:

I'm using an Acer 23" touch screen which was about $US270. There are smaller (cheaper) screens which would be perfectly good for a secondary display only containing the simulator. Just make sure the screen has touch drivers for Mac.

Unless MP's app is able to render whats visible in the simulator, not sure how a blank remote would be useful to interact with on-screen objects - unless you just want to swipe or tap the whole screen.

@bedhouin, a simple workaround would be to have a matching grid overlay on each screen. That way you can position your touches based on the objects position's relative to the guides in the simulator.

How about using something like VNC until there is a packaged solution that does it all?

For what it's worth, you can simulate touch events in code:

1
pauseBtn:dispatchEvent( event )

@BarkBark: That's a neat idea. Simulator and device have matching grid layouts. With colour coding, thickening, or dashing of alternate lines it would be easier to pin point the corresponding locations.

@Dotnaught thats cool, thats as expected. What I would need ( and have yet to try ) would be Runtime:dispatchEvent as I wouldn't be able to target different buttons in the users app ( as every app is different ) but if I could capture the event in runtime on the iPhone and then dispatch the event in Runtime on the simulator it would probably work.

@rdcube Unfortunately not, doing remote viewing of the screen would take up to much runtime to be achievable in lua. The remote is primarily designed to transmit accelerometer data, the problem I was trying to solve. Next is hopefully touch and then compass.

Awesome!!

@Matthew Pringle i would love the Android version. Remote for Android is something i had in mind to write for myself until i discovered Your iPhone solution.

Also the multiplayer class - I WANT this!

Just gone live, Apple and Ansca approved!

http://www.coronaremote.com/

Congratulations Matthew ! Thank you for supporting Ansca and Corona and here is to our growing 3rd party ecosystems.

Also, the fact the app got approved on the app store shows that Corona has 'momentum' and recognition.

C,

Thanks Carlos

Also don't forget this app is Universal, 1 build for iPhone 3G, 4 and iPad with retina display support!

Excellent gonna try it out real soon!

Good work!!!

Bought, downloaded, implemented in current project -- all in about 15 minutes.

Very cool tool for anybody doing Corona SDK development with the accelerometer.

The $10 will pay for itself quickly -- no more building to device just to test your app with the accelerometer.

Nice job, Matthew!

Jay

Thanks Jay

Let me know how you get on. There should be a dedicated support forum soonish to post feedback in.

Cheers

M

Done

Now Matthew the android version please :)

Whilst it's great and thanks for sharing I really believe that this should be part of Corona!

There are clearly "missing" bits from Corona, like this and the CPM and I'm really miffed that I should have to pay extra to get things that should be in the main Corona package!

It's great that the developer of this and CPM have found a way to make a buck out of the missing bits but the trouble now is Ansca won't want to implement the missing bits for fear of upsetting these developers.

I'm not saying there isn't a place for 3rd party tools but if you're not careful too many of them could scare people off Corona...

"Oh you bought Corona, great now go and buy tools W, X, Y and Z cos Ansca haven't included these essential tools".

Also too many 3rd party add-ons can only destabilize and limit the core product.

Sorry if this comes across as a rant or overly negative it's not meant to be, I'm just sad they are not part of the core.

@dweezil: I see your point and it is quite difficult to discuss this without appearing to dismiss the well intentioned efforts of others.

I also agree that there are a number of third party tools appearing that should be part of Corona. The longer Ansca delays in implementing tools the more likely it is that a user will go out and just build it. And once they are out there, it would be difficult for Ansca to kill of their hard work by providing a similar built in tool.

So far we have a GUI Editor, Project Manager, Accelerometer Sim, and Particle System (plus other code bits like Director Class and Game Class).

My concern is not so much the additional cost (developers need to be rewarded for their efforts), but the level of integration and guaranteed ongoing support.

And I agree with you on putting off potential developers - if the physics engine was a third party tool - would bubble ball have been written.

On the flipside, third party tools which fill in the gaps give Ansca breathing room to focus on expanding other Corona features.

Who knows we could see lots of new things in the next drop...

@Matthew: No offense intended. I still think what you did was incredibly clever, and if I was developing an accelerometer app I'd buy it without question.

$10 seems a very fair price for a tool I will use every day. Sure, I'd love it if it were already included in Corona for "free". But what current feature would be missing, or bug not fixed, if Ansca had spent some of their finite resources developing a remote?

@dweezil I do see your point but at the same time I think you are wrong ( no offence ). A vibrant and active ecosystem built around the core of Corona is exactly what you want. It help keeps a piece of software strong and encourages others to adopt the platform. Plus the chances of new and surprising features greatly increases, like the particle engine.

The physics engine, Box2D, used in part in Bubble Ball, is a 3rd party engine. Ansca integrated it into Corona a few months back. This happened behind the scenes and im unsure the licensing they had to go into but if they developed it themselves they may well still be at it.

I dont see the remote as an essential tool, its a very niche product. Only a small percentage of Corona users will find it helpful and the number of Corona users is small compared to the market if I had developed an iPhone app/game.

The particle engine is again a 3rd party engine and one that was not developed for Corona, it was ported by the developers for Corona users because they judged the Corona eco system to be one they could bring value to. Ansca would have been pushed to develop a particle engine in the same short period, it can take years, lots of mathematicians and money to bring such a product to market. I for one hope they work with Ansca to integrate the engine directly into the core of Corona to enhance speed / effects but I would still expect to pay them for a licence.

@bedhouin no offence taken. While I was developing the remote Ansca were developing universal builds, openAL and a few other really cool additions that are coming shortly. None of them achievable in lua, unlike the remote.

Support and integration will happen as and when new features are added to Corona which I can make use of.

@XenonBL my thoughts exactly

I know there are some game salad users who would prefer a more complete package. The problem there is that the package will become very focused and limited in what it can do. Corona on the other hand may feel like a blank canvas but it has much more potential ( why I use it ) and as easily as it can do a 2d physics game it can do much much more. Like the remote, or I could write a web server on it, run industrial equipment from it, write a business app or an eBook. Its limited only by the users imagination, and a few missing features, most of which are replicable in lua if you know how 16bit games used to achieve effects etc...

Corona is still in its infancy and ive seen it grow in the past year in an amazing way and the support and communication from Ansca have shown time and again that I made the correct choice in platform. I for one cant wait for the next 3rd party tool to pop up.

views:1842 update:2011/9/24 8:48:32
corona forums © 2003-2011