Slowdown?

Hey Mathew,

After messing around for a while to try and get this working I finally got it working (I think) but it seems to slow down my frame rate quite a bit in the simulator.

I was just wondering if this is at all normal or if it probably is due to me not integrating it quite right, I was having some issues with that at first so that is entirely possible!

The main purpose for me using this is actually so I can record a video preview of my game (don’t know any ways to record games with accelerometer support on the iphone) so a low frame rate doesn’t look too good in a video preview.

Any thoughts or suggestions would be great, and thanks for this helpful tool by the way! I am very excited to start using it more!

-Clark [import]uid: 5786 topic_id: 5454 reply_id: 305454[/import]

Hi Clark

I cannot say if it is your implementation or not but under certain circumstances Corona Remote can slow your application down if the network connection is not ideal.

Please have a read of http://www.coronaremote.com/#support

You can also try the setting

remote.startServer( "8080" , "slow" )  

Basically as the remote runs in Corona it needs a certain amount of time to connect to the iPhone and get the latest values. On a fast network this shouldn’t be noticeable. On a slower network Corona has to wait for the transmission to complete so if it is interrupted or has lag Corona will pause for a brief moment.

The ‘fast’ setting tells Corona not to wait for the iPhone, the ‘slow’ setting tells Corona to wait 0.001 seconds. This is different from the lag where Corona is forced to wait for the transmissionto complete but ive found the settings can help on different networks.

Please also ensure your network is not being used for other traffic while using the remote. For instance streaming radio, downloading or a backup process will all slow down the remote.

From my extensive testing ive found that it is the iPhone that needs the strongest wifi connection possible. If im across the other side of the office to the network box I can demonstrate slowdown. But by positioning both my laptop and iPhone in the same room as the box I have no issues.

You can also download the Remote Demo and see if that slows down / jumps as it is ideal for testing the network. http://www.coronaremote.com/downloads/Remote%20Demo.zip

I have done screen recording without issue with the remote but I apologise if you are unable to get idea results. I intended this as an aid in development, it will not slow down your final app.

As a note the iPhone sends the accelerometer values 15 times a second ( it was 30 in testing ) so as to not hold up your app. I have been able to achieve 30 times a second on a n network.

Matt [import]uid: 5354 topic_id: 5454 reply_id: 18512[/import]

Hey Mathew,

Thanks so much for the detailed reply, I really appreciate it. It seems that I have underestimated the network speed needed to run the remote, I was doing about everything that you recommend not to do, oops. I am on the 2nd story here (router is in basement) and my dsl isn’t that fast to begin with. I also almost constantly have Pandora or Netflix streaming so I’m sure that combined with the distance is my problem.

I will free up all network traffic and move my laptop/iphone to the basement and test it out, thanks for the advice!

Again, thanks for the great tool! And the great support!

-Clark [import]uid: 5786 topic_id: 5454 reply_id: 18750[/import]

Not a problem.

I just purchased an Airport Express to extend my network and that made a huge difference. I also played around with the mulitcast settings of the router and upped the Mbs.

My cheap adsl router was acting at the dhcp server as well. I stopped that and set up my time capsule to handle everything as I would assume it is a more capable device.

Not that the latest version of Corona is out they have included an non blocking http connection so im going to look at incorporating that and removing the tcp connection. That should then ( theoretically ) run at the speed of your network but without slowing your app down.

This may be a week or 2 away ( build time and approval ) but I had it working in a test case last night.

In the meantime I hope the remote proves useful.

Matt [import]uid: 5354 topic_id: 5454 reply_id: 18799[/import]

Hi Clark

Ive just sent a new version for review by Apple

The new version (1.2) included the new asynchronous network api in the latest release of Corona.

This means the simulator will not slow down if you have a slow network ( it just gets less result per second ) so you should be able to do screen recording at a much better frame rate.

I will let you know when it is released so you can update.

Matt [import]uid: 5354 topic_id: 5454 reply_id: 19818[/import]

That is great news, thanks Matt!

I will definitely look for the new release.

Thanks for all your help!

-Clark [import]uid: 5786 topic_id: 5454 reply_id: 19822[/import]

Ok its out in the app store. This should help.

Let me know if you get better results.

You need to download new remote.lua from the website [import]uid: 5354 topic_id: 5454 reply_id: 20034[/import]

Thanks Matt!

I will hopefully get some time tomorrow to mess around with it. I live in Michigan and were getting socked with snow so my classes are cancelled for tomorrow.

Sounds like a good day to stay in and mess around in Corona.

Thanks again for all the help!

[import]uid: 5786 topic_id: 5454 reply_id: 20077[/import]

Hey Matt,

Just wanted to let you know that I updated to 1.2 and everything is working great now!

Thanks for the update and for helping me through this process.

-Clark [import]uid: 5786 topic_id: 5454 reply_id: 20309[/import]

No problem! [import]uid: 5354 topic_id: 5454 reply_id: 20427[/import]