Unscramble Anagram - Corona App on the Windows Phone Store!

I have also seen glitches in sprites on my game in WP8.  For example, a black background appearing instead of transparent, or an unrelated image (like a background graphic) replacing the transparent parts of a sprite. 

It may correlate with increased memory usage, but I am not sure… It’s not something that happens on Android or iOS.

@spacewolf,

I just did the same test with your app’s menu screen now.  I too can see the background going black.

I’m not sure why that’s happening.  I’ve tested several apps having sprites, suspended/resumed several times, and my test apps always reload sprites and other images correctly.  I’ve also tested the old "bmf.lua and the new “bmf2.lua” bitmap font libraries, performed the same tests, and they re-loaded just fine as well.  So, I’m curious what’s so different about your app.

@spacewolf, would you mind sending me a small project that can reproduce this issue?  Such as whatever your main menu screen is rendering?  The best way to do that is by clicking the “Report a Bug” link at the top of this page.  Please make sure to mention my name (Joshua Quick) and reference this forum thread in your bug description so that our tech-support team can send it my way.  I’ll look into this as soon as I can.

@Joshua,

I’ll see if I can get you the small project example.

Another interesting point is that this glitch only happens on some of the screens, others it does not.

Glitch screens:

* Main menu scene

* Select tutorial scene

* Puzzle tutorial screen 2 scene

* Classic tutorial screen 1 scene

* Classic tutorial screen 2 scene

* Select Mode scene

Non-glitch screens:

* Splash screen scene

* Settings overlay

* Select difficulty scene

* Classic tutorial screen 3 scene

* Puzzle tutorial screen 1 scene

* Puzzle tutorial screen 3 scene

* Game play scene

* Paused overlay

* Quit “Are you sure” overlay

As I examine this list no pattern really jumps out at me… I can’t really see why one tutorial scene would have the glitch and another would not. They are basically copies of each other with the tutorial graphic switched. Odd indeed.

Well, if you’re willing to send us your entire app project, then I’d be willing to run it through the debugger on our end to find this issue.  That is, if you’re willing to send us your entire project (I can understand if you don’t).  If you are interested, then see about contacting David to do so, because I’m sure your project is likely too big to send via a bug report.

@Joshua,

Thank you very much for offering to debug the app! I’m sure wading through somebody else’s code is no fun so I appreciate it.

However, in this case it won’t be necessary because I have managed to create a small project that exhibits the glitch. I’ve traced it down to a single line that when commented out will erase the glitch. It’s marked in the “scene_mainMenu.lua” file with the text “@Joshua” so you should be able to find it. I’m sending in the project via the bug reporting tool you referenced earlier so you should be getting the code soon.

In case you are so curious you don’t want to wait, the line is:

storyboard.removeAll()

Please let me know if I’m using that code in a bad way :slight_smile:

Even better!  I’ll have a look at the project that you submitted tomorrow.  Thanks for taking the time into putting it together.

I just wanted to note that I use storyboard.removeAll() quite a lot (between each round of the game), so it could well be the cause of the similar sprite glitches I saw on WP8… Nice work @spacewolf.

spacewolf, hgbrian,

I was able to reproduce this graphics glitch issue with our old Storyboard sample project that we used to include with the Corona Simulator.   Interestingly enough, composer doesn’t have this problem, but I don’t really believe that this is actually storyboard’s fault.  I’m thinking storyboard is hitting some kind of edge case that is causing this graphics glitch issue on WP8.  So, I’m a little worried that something else might be the cause.  The hunt continues.  I’ll let you 2 know when I’ve found a solution.

Note that I’m pretty sure the OmNomster app uses storyboard as well.  The difference is that app is not using display.newText() anywhere.  The developer completely switched to bitmap fonts.  So, if you need a quick fix (because I’m not sure what the fix is on my end yet), then replacing your display.newText() calls with bitmap font may solve this issue for you now.

@Joshua,

Hmm interesting. Is it a big switch to go from storyboard to composer apis?

Also, my app doesn’t have any display.newText() calls in it anywhere already. I also don’t use the corona widget buttons in them either so there are no display.newText() calls from those too. Maybe there is something else the OmNomster app does different?

It depends on how many scene’s you have.  The conversion of a single scene isn’t that complex and if you’re not using willEnterScene() and didExitScene() it will be easier.  The biggest difference is that those two functions are now handled as “phases” in the replacement for enterScene (scene:show() ) and exitScene (scene:hide() ).

Rob

Honestly, maybe you shouldn’t switch to composer then.  Especially since I haven’t discovered the root cause of this issue yet.  I’d hate for you to put in that kind of effort and get zero return from it… other than getting rid of our deprecated storyboard API I suppose.

Sounds good I’ll hold off on major changes like that for now :slight_smile:

I have converted a game from storyboard to composer before and it’s really quite easy. I’m just generally afraid of messing with stuff like that if I can help it, so I’ll hold off for now. 

I’m not sure why removing newText would help though? That would be a much bigger job for me than switching to composer.

I suspect that display.newText() is the issue because it has special handling on WP8.  That and the OmNomster app which uses storyboard and which doesn’t use display.newText() anywhere (completely uses bitmap fonts) doesn’t have this problem.  So, that’s our working theory as part of the cause.

I Can also second that a lot of problems are caused by text updates while doing scene changes or resuming from suspend mode (IE after a full screen ad or while loading several banner ads)

If you were to put a delay on any screen changes, removing etc, resuming app suspend or anything or make the text update first just as long its not the same time., even 2 seconds gap then see if the problem still happens? 

I’m not so sure it is related to .newText() because my app uses pure bitmap fonts and the sample project I made that exhibits the glitch also does not use .newText()

Are you still using widget buttons?  Because those use display.newText() internally.  Even if you don’t set a label.  (Remember I made an optimization for you for label-less buttons.)

I’m not using corona widget buttons either. I made my own buttons that use bitmap font text.

I don’t suppose this is happening after a full screen admob is it?

Nope. It happens whether ads are in the app or not.