I can’t figure out why Ansca chose such a horribly contorted solution for dynamic image resolution as “newImageRect”. Combined with the terrible lack of dynamic spritesheets, and the awefully broken Box2D implementation that doesn’t allow for image scaling, it poses so many problems for people who want to program anything more advanced than “watch the crate fall to the ground.”
What is the best way to get Ansca to address some of these issues? I don’t think they ever will, and as much as I love Corona, I’m not going to spend another month trying to battle Corona for what should be the simplest of things.
Here are some things that need to be fixed:
-
Get rid of “newImageRect”. It is simply not needed. The need to specify an image’s width and height are absolutely ridiculous, and impose all sorts of inane restrictions around those who wish to develop frameworks and tools for Corona. It basically can only be used by developers who already know the exact width and height of all of the assets in their game.
-
Instead, add a new optional parameter to “newImage” that specifies whether dynamic resolution images should be loaded. If a higher resolution image is found, simply load it using the image’s native dimensions, and then scale it using the current display’s contentScaleX and contentScaleY.
-
“newImageRect” uses the black magic of proxies to Lua userdata structures for display objects to do things that Corona users can’t do. For example, “newImageRect” reports values for “width”, “height”, “xScale”, and “yScale” that take into account higher resolution images. This allows Box2D and other libraries to continue to work properly. However, Corona users can’t access the same type of black magic, and it breaks all sorts of things. Please provide some method for doing this for all display objects.
-
“xScale” and “yScale” don’t work properly when using physics. I’ve seen warnings in the forums and API documentation to “not use xScale or yScale on already existing physics bodies”, however it’s worse than that: you can’t even set the scale of an image BEFORE adding it as a physics body; if you do, it will still break.
-
No spritesheets for dynamic image resolutions? Come on guys. There are a ton of people trying to code all sorts of clever and half-assed ways out of this nasty trap, and for something that should be a core feature, this is painfully missing. It’s also impossible to work around this omission because of all the other traps pointed out above.
So anyways, yeah, I’m pretty much at the point of needing to stop working on desperate work-arounds for critical functionality gaps in Corona, and start evaluating other products now. [import]uid: 71767 topic_id: 19585 reply_id: 319585[/import]