Some complaints

(*Thread title edited to be relevant)

Now that I have your attention, I am writing this post out of pure frustration as a relatively new member of the Corona community. For almost 3 months now, my game team and I have requested assistance from the Corona community and ANSCA staff with framerate performance issues. All of this began when Walter posted his blog article called “Blazing Sprite and Tile Performance”:

http://blog.anscamobile.com/2012/02/blazing-sprite-and-tile-performance/

We had been experimenting with Corona to figure out how to improve the fps in our game. After reading Walter’s blog post, we were very excited to implement the new performance updates that he wrote about and showed in his video example. Unfortunately, there was and still is no detailed documentation to go along with these performance enhancements explaining how to take advantage of them.

So we began searching the forums for answers, posting our detailed questions in multiple Corona forums and continued experimenting. We did receive some feedback from Corona users and we greatly appreciate their attempts to help. However, after trying their suggestions as well as some bits of information we obtained from searching through hundreds of forum posts and old outdated Corona documentation, we found ourselves in the same place where we started - alone, afraid, frustrated, helpless, and disappointed. Oh and not to mention we still didn’t have the solution to our framerate issue.

The next thing we did was spend the extra money to get a Corona Pro License, thinking that we would have greater access to resources and finally be able to resolve our framerate performance issue and finish our game. Well, this made no difference whatsoever.

This brings us to our current situation. Carlos Icaza (former ANSCA staff) was nice enough to offer his help and allowed us to email him our source code. We sent him the source code and I thought that everything was going to work out just fine. Well, it didn’t. Weeks went by. Nothing. No response. I emailed him asking for an update. He said we were in queue for review. A few more weeks went by. Then Carlos announces that he is leaving Corona. Wonderful!

So then I receive an email from David Rangel (ANSCA staff) who states he is going to take over where Carlos left off. Ok. Sounds good. I filled him in with the details. I wait a week or so and then ask him for the status. He said they are busy but he will get someone to look at it. I wait another week and ask again. He said I had someone look at all the forum posts but he had some questions. What?!!! So basically they didn’t even have the source code that had been sent previously. We next emailed him a link to download our source code. I wait another week. No response. I ask for the status (isn’t this getting old? can you see my frustration with this whole experience?). He replies that “I will try to have someone look at it today”. Well, I have emailed him twice since then and have received no reply.

Look, I’m not asking for pity and believe me I really don’t like to complain especially not on a public forum but this is ridiculous! For the ANSCA staff to be treating paying Corona users like this is very unprofessional. We have been working very hard for almost 1 year on this game and I want it to be a success and I would love to credit Corona in my game but how can we with the kind of experience that we have had? We are seriously considering dropping Corona for our next project.

All we want is someone to review our source code and tell us what we are doing wrong or how we can improve it to take full advantage of the performance enhancements as described by Walter. We are trying to improve our framerate to the best that it can be.

I urge any other frustrated Corona users to join together with me, share your pain here, and fight for your right to get professional help with your source code!

Thank you.

Rob
Roentgen, LLC [import]uid: 134650 topic_id: 26414 reply_id: 326414[/import]

At the current time, there is no “official” documentation for this. The best source to learn how to utilize the new APIs is the very thorough blog post by Jonathan Beebe (Ansca staff member and long-time advocate of the SDK).

I assume you have read and studied that blog post thoroughly. When it was first posted, I used it to convert my entire game (containing considerable graphical assets, sprites, etc.) over to the new APIs within about 2 days. It was not overly complicated to follow and understand what’s going on. While there are still some minor issues being ironed out on these new APIs, the basic structure is intact and easy to follow.

I mean no offense, but asking and expecting Ansca staff to review your code is, well, somewhat unreasonable. Aside from the basic fact that it’s not their job to do so (unless you paid for Premium support), remember that reviewing all of the code for a game is a monumental task for somebody who didn’t write it. Every developer programs differently, plans differently, and structures their apps differently. When I look at somebody else’s code, I first need to determine what they’re attempting to do, then I have to figure out how they’ve approached it, and finally I need to consider and make suggestions about how to improve it (often with complete code re-writes). For a very simple routine, it’s not too difficult, but optimizing somebody else’s entire app could take days of diligent work.

My point is, most of us have paid for Corona, either Indie or Pro. This doesn’t entitle us to one-on-one help from Ansca staff on coding issues. The forums are the best place for that, and quite simply, you will learn to use the new APIs by just experimenting and testing them out.

Also note that Ansca IS currently rewriting and restructuring much of their documentation, including an upcoming feature to distribute “offline” documentation with each new build, thus highlighting and explaining new APIs as they are rolled out.

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 26414 reply_id: 107156[/import]

Brent seems to have covered most of this really well but I would like to add if you believe that your issue is not a user error and there is in fact a bug in Corona then please file a bug report - we get a LOT of emails and things can slip through the cracks sometimes. Filing a bug helps us keep track of it internally so that doesn’t happen.

Peach :slight_smile: [import]uid: 52491 topic_id: 26414 reply_id: 107160[/import]

Hey Rob, I can understand the frustration of not getting any help. But trust me, it doesn’t help to rant on the forum. And despite your experience, I think the Corona community and Ansca want to see you succeed. Putting all that aside since you’ve got people’s attention now:

Have you checked out the optimization post by Danny? http://developer.anscamobile.com/forum/2011/12/03/tips-optimization-101

Have you profiled your application to narrow the issues?
http://www.mydevelopersgames.com/site/

Have you considered putting up a job post to get help with optimization? Not that I’m looking for work, but I have been contracted to work on someone else’s code base that had 50K lines of code and was worked on for over a year. If your codebase is anything like that, I wouldn’t expect Ansca or anyone to help you without a contract offer and several weeks to work on it.

Cheers [import]uid: 27183 topic_id: 26414 reply_id: 107182[/import]

Peach,

I did file a bug report about 2 months ago and no one ever replied to me so I gave up on that resource.

Rob

[import]uid: 134650 topic_id: 26414 reply_id: 107196[/import]

Don,

Yes we have been through Danny’s optimization post. We have also profiled our application and it said our fps meter was taking up 25% of memory. However, removing it made no difference.

I did offer to pay Carlos and David but things never worked out with them as I described above.

We have narrowed the problem down on our own through trial and error. Essentially, with a fixed screen we are able to achieve 60 fps. Once the screen is scrolling, the fps drops below 30 (about 27). Scrolling is the problem. So we separated the rendering code from the sprite physics code so that our sprite’s fps is independent of the rendering fps. In this way, we always get 60 fps for our sprite movement. However, my goal would be to also get 60 fps for the rendering of the game.

With all that being said, I would be willing to hire you to review our source code and optimize it. We do not have 50k lines of code.

Rob [import]uid: 134650 topic_id: 26414 reply_id: 107204[/import]

Thanks for the offer Rob, but I’m not free to take on work at this point. I’d love to help out if I can.

Your fps meter is taking up 25% of memory? That’s odd. Not sure why that would be the case.

Anyway, first off what build are you using? What devices are you testing on? Also, how many sprites do you have on screen? How big are these sprites, pixel dimension wise? How many of them have physics attached to them? How many of these sprites are animating? Is there anything off screen? Are you resorting, inserting or removing objects / sprites?
[import]uid: 27183 topic_id: 26414 reply_id: 107218[/import]

Hi Rob,
Can you please specify some more details about your app? For example:

  1. How do you scroll the screen? How many display objects are on the screen?
  2. What is “applied” to these objects? Collision listeners? Animations?
  3. What devices are you testing on?
  4. Are you using any 3rd-party tools like LevelHelper, Lime, or ParticleCandy?

There are so many factors which could be influencing the performance. I don’t recall your previous posts on this issue, so maybe you can outline it again. If scrolling seems to be the core issue, then focusing on that is the first step.

Brent Sorrentino

[import]uid: 9747 topic_id: 26414 reply_id: 107219[/import]

Here are the details of our issue. FYI - this is from 3/12.

We are having some major performance issues since we upgraded to build 761+ for our game and builds later than this do little, if nothing, to improve the situation. I am hoping that someone may be able to shed some light and offer suggestions as to what the problem is and whether it is my lack of knowledge of the new imageSheet / imageGroup ‘performance improvements’ or in fact that there is an issue with the new builds.

A little background:

Our game is a tiled based game with average map sizes of 30 x 60 [individual tiles are 96 x48] built using Tiled and loaded using Lime. The physics for the maps are created in PhysEd (the imported data averages about 130-200 polygons for the ‘landscape’) and added to the landscape tiles as a whole as
the landscape is more than a little curvy (applying physics to individual tiles wasn’t viable). We make use of the Lime API to ‘spawn’ our game objects at level start but after that it’s running in our code and only calling Lime (map:update()) to track the player in the map.

The game was originally developed using build 704 and we had some issues even with screenCulling enabled in Lime, so we tried to use much bigger tiles (much bigger!) and we did get a performance boost, mainly because Lime was culling far less tiles at once, but it did bring with it something of a texture memory issue, especially on 3G.

We were delighted to hear about build 759+ as it seemed to address all of the performance issues we were having, and the videos and blog about it seemed to suggest this was the answer to our problems. So we duly subscribed and bought a Pro licence to get these improvements.

We switched back to our normal tileset size, and obtained a Lime 3.5 Beta that makes use of imageSheets (and corrected an issue of corrupt rendering of maps in 3.4). Amazingly, performance actually decreased (21fps vs 25 in 704) and we also seemed to be getting a ‘stutter’ of the display when scrolling. By this time we were using build 765.

All game graphics and UI were recoded to make use of imageSheets and even that brought little improvement and still a stutter, so the next thing we tried was to modify Lime 3.5 to use imageGroups (instead of displayGroups that Lime has always used) and it seemed to make framerate worse, not better, and the
stutter is even worse.

We have studied how to use imageSheets and imageGroups and read the blog on their use, so their use is correctly implemented to the best of our knowledge. So this leaves us puzzled somewhat as to why a ‘performance improvement’ isn’t improving anything for us, despite the lengths we have gone to, to embrace the changes. Between builds the game code changed very little and any change wouldnt account for the degrade in performance.

So if anyone can perhaps shed some light or make comment or suggestions, it would be most appreciated. [import]uid: 134650 topic_id: 26414 reply_id: 107289[/import]

This does clarify things somewhat. I assume you’ve been through this already, back and forth with Graham (creator of Lime), but I believe this is mostly a Lime issue and how it implements its scrolling, culling, etc. I’m not pointing fingers here (apologies, Graham), I’m just saying that IF you’re experiencing sluggish performance ONLY when the screen scrolls, it’s probably not a core Corona issue.

Remember that “screen culling” in the more recent builds of Corona does not handle the removal of tiles, physics bodies, etc. when they move off the screen. This is either the responsibility of Lime’s engine, or you the developers. All that screen culling does is optimize the OpenGL pipeline so that Corona isn’t rendering/refreshing objects that reside off the screen. Everything else about them remains intact until Lime (or you) clean them up… animations will keep running, physics bodies will continue to sense and react, etc.

Anyway, it sounds like you have thoroughly studied and implemented imageSheets, and done so correctly. Have you discussed this with Graham? Is he aware of this as a “repeated” issue, or is this an isolated issue?

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 26414 reply_id: 107322[/import]

In my experience the update to 761+ only slightly improved performance for Cannon Cat on newer devices. From what I know, older devices got a bigger performance boost. Also if Lime is doing any sort of culling for you, I’m pretty sure you’re going to experience a performance loss.

I’ve done lots of tests and the biggest performance destroyer is resorting, adding or removing objects from the display. In my experience 60 fps is achieved because if nothing is moving that means nothing is culling/changing. If the screen is fixed and your adding and removing objects often I’d be surprised.

Unfortunately, I haven’t had a ton of time to experiment with the new Sprite API. I’m still sticking with the old one, since it’s backwards compatible and for me it’s a known quantity. Initially I tried out the new API and I was too close to launch to switch over but I was also underwhelmed by the fps improvement. But as a result of experimenting, I found reducing the number of spritesheets and physics objects (and their shape complexity only using circles and rects) helped maintain 60fps.
[import]uid: 27183 topic_id: 26414 reply_id: 107339[/import]

If you are using lime, it already was dogged by performance issues on devices which he has stated. Compounded by already sprite performance issues, I can see why you would be getting FPS drop like that. When I did a scrolling game test and then tossed sprites into the mix like what you are describing, I got nailed.

I ended up having to go “native” corona to get the performance I needed.

I really wanted lime to work out as I liked the workflow, but I am not sure if Lime will ever *truly* be production ready, even though I love using it.

To let you know, I am using Physics ed to build out my “levels” and I’m in the 1000+ vertices, AND I get 60fps on ipod4g, ipad2 and new ipad. mid to high 40 FPS on 3GS (not my target device though, this is really made for newer devices). I know that sounds insane, but when I used lime, the FPS went in half and was plopping along in high to low 30’s. Take lime away, poof it works again. I’ve since worked down my vertices to about 400 to 600 depending on how “accurate” I want to be. I am dealing with curves, so you can only imagine how many vertices you need to make things “smooth” :slight_smile:

That is my experience with Lime, it’s great if used for something small, but soon as you want to get mr fancy pants on it, it will slow down and toss an egg in your face.
ng
[import]uid: 61600 topic_id: 26414 reply_id: 107350[/import]