Sprite not working on device but is on the simulator

@roaminggamer you are a miracle worker!  It was the loop count thing that was screwing up my sprites.  The  .gif images are fine but the loop count was wrong! Thanks so much for your time and help! Very appreciated! 

No.  Really, I suggeest you not use GIFs.  I think you’ll be unpleasantly surprised in the future if you do.

@How to do this without GIFs?

I wonder how one would animate the heart rate line (please open the attachment) in Corona SDK?

The more general use case would be animated lines in Neon glow like they are done in Tron 2.

Either it would take 100s of sprites to make it fluent or there must be a vector alike method to do it with given points.

Does anyone have a clue how to get this done?

Cheers

Matt

Check the case and spelling of all assets carefully.

99% of the time when it ‘works fine in the simulator’ and ‘fails on the device’, it is because you got the case wrong on a file name.

The simulators (because they run in OS X and Windows) are not case-sensitive, but the the device builds running on iOS and Android operating systems are.

@roaminggamer , I checked every single file’s spelling and caps… nothing is wrong… I checked extremely carefully. I even made another build of the app.  When I uploaded it to Test Flight, still no luck with the sprites moving :frowning:

Any other suggestions?

Two suggestions (in order)

Suggestion One

  1. Download this file: https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/01/caseDetectError.zip 

  2. Copy the file caseErrorDetect.lua into your game folder (same place as main.lua)

  3. Add these lines to the VERY TOP of main.lua:

    local ced = require “caseErrorDetect” ced.promoteToError()

  4. Re-run the game in the simulator and play around for a while to ‘test’ all is good.  If any errors pop-up, correct them then re-try building.

Suggestion Two

I appreciate that you’ve posted your code and I did peruse it, but this is one of those things where one needs to see the project.  So, if you’d be willing to post a link to your project (in a ZIP file), I will take a look at it some time today.

I still think this is an issue with case, file name spelling, or assumptions about how paths work, but I can only verify my suspicions with an actual project.

-Ed

One last thing.  Why are you using ‘storyboard’?  When you get the chance, you should switch to ‘composer’.  Storyboard is end-of-life.

@roaminggamer , i followed your instructions and have implemented your file into my game folder.  I have also added the code to the top of my manilla file… I have an error but i have no idea how to solve it!  Please help! Below is the .zip file for my entire project!  Thanks!

Here is my project .zip:

Hi.  I tested this on:

  • OS X 10.10.2 Simulator (Corona 2015.2605) 
  • iOS 8.2 iPad Air  (Corona 2015.2605)
  • Windows 7  Simulator (Corona 2015.2625)
  • Android 4.4 Nexus 7 Gen 1(Corona 2015.2625)

It worked with no issues in each case.

So, you’re either using an OLD version of Corona with bugs, OR you’ve got something else going on.

Which version of Corona are you using.

Also, you said you have an error?  What was the error message.

First try using the latest Corona if you’re not.

Can you provide me a link to the latest version download?

There is a ‘daily builds’ link at the top of the page.

Just installed latest version of corona.  Trying to rebuild app now  The error is: : ***** WARNING! require( ‘CoronaLibrary’ ) - does not exit.  Check case of file.  

Please tell us this:

  1. OS X Version you’re using: OX X aa.bb.c

  2. Where are you seeing the above error?  In the simulator, or on the device?

  3. If on the device, what device, what version of iOS 

  4. Are you able to run and build any of the samples that come with Corona?

  5. Where are you storing the folder containing your project.  I suggest you NOT store it in the applications or other folder.  It should live in a project folder on your drive or on your desktop if that is easy for you.  Definitely, do not put it in the Corona app folder.

  6. Have you tried re-booting since the install?  Not really necessary, but can’t hurt.

  7. I may think of other questions later. I know this is probably frustrating, but we (I) need more details to help figure this out.  You project worked fine for me with all the above combinations of Corona and OS, so I suspect something is wrong with your system setup if you can’t run Corona.  However, I don’t have enough data to figure out what is happening now.

Wait a second…  Did  you  mean:

  1. I’m installing the newest version of Corona now and will try it shortly.

  2. The error I mentioned before was, “***** WARNING! re…”  Is implies you’re still seeing an error.

Please clarify.  Meanwhile, I’ll assume this is resolved.

This is whats going on…

1.) My corona version is Version 2015.2625 (2015.4.23).  

2.) My game runs fine an ALL DEVICES IN THE SIMULATOR

3.) I am then building the app using my provisioning file and the build and application loader works 100% fine with NO errors

4.) when the app is tested in the test flight application, the gameplay works fine, BUT THE SPRITES DONT WORK!

I see the error in my last response using the iPhone 5 on the corona simulator.  The error is shown in terminal in the debugging log.  NO ERROR IS SHOWN ON DEVICE AT ALL!  The folder for my game is on the desktop. 

  1. Version - Good.  That should be fine.

  2. Devices - Testing on your target simulated device is enough for this.  All devices use the same simulator (+/-) a few flags.  The real benefit of the simulators is a quick test of various known resolutions.

  3. Application Loader - Are you using an old version of OS X (you didn’t say which, but had assumed Yosemite.)?  Old versions had an app called the application loader.  You don’t want to use that to upload the binary to your device.  (ONLY use xCode for this.)

  4. Here is a video of the game on my iPad.  Does this look right?  (Maybe I’ve made an assumption here that what I’m seeing is correct.  If something is missing in the video please tell me specifically what I should be seeing that is not there.) 

Click here for video if it doesn’t show.

  1. Two part answer:

Part 1

A. Un-register Corona on your computer.

B. Completely uninstall it.

C. Reboot.

D. Re-install Corona

E. Load “Horse Animation” sample that comes with Corona installation.

F. Build it and install it on your device.

G. Verify it works.  

If you get this far, then your environment, Corona install, and certificates are probably good.  If not, you’ve got some other problem. 

Part 2

When you say no errors on the device at all, did you look at the xCode console?   (See video above.  I mention this there).  (the video was made for another forums question, but is still relevant)

PS - I’m having trouble getting my posts to work due to some unknown issue so bear with me as I re-edit my posts to get them working.

You need to attach your device to your Mac and use Xcode to see messages on the device. Please read"

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

@roaminggamer the video you created is right, EXCEPT the characters SHOULD BE MOVING IN A RUNNING MOTION.  The sprites should be running, not frozen.  

@rob I connected my device to my mac as you said… I then went to the debugging console in Xcode while playing the game like you said…  I got ZERO errors! Everything in the console was normal…  I am clueless as to why my sprites aren’t working on a real device! They work perfectly fine on the simulator! HELP!