http://developer.anscamobile.com/showcase/coremoter-0
Before your downloading, you can watch following videos to roughly learn how coremoter can do.
Demo videos:
on youtube.com (USA):
http://www.youtube.com/watch?v=gI_kqk05z8k
http://www.youtube.com/watch?v=FZFkz1Ho5bA
http://www.youtube.com/watch?v=WKbnPHx9JkI
http://www.youtube.com/watch?v=Wxzeg2ytxVI
http://www.youtube.com/watch?v=Wwh_EB3x5us
on youku.com (China):
http://www.youku.com/playlist_show/id_15431266.html
http://v.youku.com/v_show/id_XMzAzNzQyMTM2.html
http://v.youku.com/v_show/id_XMzAzNzQ0MjEy.html
http://v.youku.com/v_show/id_XMzAzNzQ1MzIw.html
http://v.youku.com/v_show/id_XMzAzNzQ1OTU2.html
http://v.youku.com/v_show/id_XMzAzNzQ3MDU2.html
Coremoter is a development utility for corona SDK.
It helps corona developers testing their programs in corona simulator with accelerometer events and tuner events(or you must build the app for device and test it on device).
It has a wonderful feature: you can create a fake input textfield in simulator. By touching the fake inputfield, a real inputfield will be actived on the coremoter’s screen (on your device) so you can test your input and really changes the text in simulator.
It also supports multitouch on device, so you can test your app’s multitouch feature in simulator by touching your device.
It can save a lot of your building and testing time.
Coremoter sends all events over wifi. It support’s both UDP and TCP protocol. UDP is for fast event transmission. TCP is for testing when you do not have a device or you want to make some specific event by hand (That means, by TCP protocol, you can telnet to the simulator and input the event string you wanted to generate a accelerometer event or tuner event)
You can try it for FREE by downloading this lite version:
http://itunes.apple.com/us/app/coremoterlite/id455625403?ls=1&mt=8
It has full feature except for some activation count limits.
How to test
- download the latest corona SDK from : http://developer.anscamobile.com/downloads/coronasdk
you need a corona account, just register one. It’s easy.
after downloading, you should install it to your mac. - then get lua source code at google code by subversion:
svn checkout http://coremoter.googlecode.com/svn/trunk/ coremotertst
(you can also downlaod the lastest package from: http://code.google.com/p/coremoter/downloads/list and extract files into a directory named “coremotertst”) - run the corona simulator and load the main.lua from the directory coremotertst
- run the coremoter app on your device
- touch TCP button to change it to UDP
- press connect
- enter the server IP (which is your mac’s ip)
- press the OK button ( the green hook button)
- then press the buttons from “off” to “on” to see the effects in the corona simulator.
(shake or change pose or shout at your device)
Important information:
At begin of remoter.lua, there is a detailed description about usage of this code
Following are some examples about how to modify Corona SDK Sample Code to accept events from coremoter.
You will find it is very easy.
- DebugDraw
copy the files (remoter.lua, whnet.lua, base64.lua) to DebugDraw source code directory
in main.lua
add following code at the beginning of file
require(“remoter”)
remoter.startService(“udp”, 1974)
find
j:addEventListener( “touch”, dragBody )
change it to following:
function j:touch(event)
dragBody(event)
end
j:addEventListener( “touch”, j )
then, run it in simulator
open coremoter
connect to youreip:1974
turn multitouch on
- ShapeTumbler
copy the files (remoter.lua, whnet.lua, base64.lua) to ShapeTumbler source code directory
in main.lua
add following code at the beginning of file
require(“remoter”)
remoter.startService(“udp”, 1974)
find
Runtime:addEventListener( “accelerometer”, onTilt )
change it to:
remoter.startAccelerometer(onTilt) [import]uid: 35642 topic_id: 15380 reply_id: 315380[/import]