Defold does indeed use atlases to cut down on size and better performance. It also does most of the work for you in regards to batching. Does Corona not use LuaJIT? It does offer a huge performance advantage over just regular 5.x Lua.
Corona does not use LuaJIT at the moment - also even though it is an exceptional piece of software (even more so given it’s kind of the work of a single dev) but I can also understand that it’s not the simplest decision as it’s kind of stuck around Lua 5.1 (+ some features of 5.2).
But then Corona does not use a newer version of Lua anyway *and* it seems that more recent Lua versions are still slower (there was some discussion over at the Lua mailinglist) than 5.1 anyway so, besides native integer support and bitops there’s not that much to be gained from newer versions IMO.
You can and should add your vote for a feature you like to see implemetned (or even request new ones) for Corona at the feedback site.
re lua: just benchmark it, fe replace newImage() with {x=123,y=0}. my guess would be ~100X performance, if so then lua isn’t the limiting factor, move on.
iPhone 5c (2013 released) : 25 fps
Samsung Galaxy A7 (2016 released) : 3 fps
lol
p.s: A7 is the better hardware specification.
Without any details, there’s now way to guess what’s going wrong.
Bumping.
Is the community not all that active compared to other engines?
my guess is just that few here care how fast bunnies can be drawn. (but if you care, then why not port it yourself?)
Agreed. I personally don’t have the spare time to port a benchmark. I’m sure others are in the same boat. Just too busy for this.
Is that the general mindset of the Corona community? A little sad to see for me cause when I did this for other engines there was a lot more interest and activity, even in kha the main developer answered questions, defold had a very active thread with well over 50 replies, gideros had multiple people interested, and so forth. Im sure it would only take a half hour to a few hours to port if I was motivated to do so but no point if nobody is interested or if the community isnt super active.
Nothing personal, I understand that some people are busy or have other important priorities. Was just disappointed not to find individuals who might be interested like I did in other communities because that’s one of my favorite parts about learning and trying other game engines.
If I do end up getting around to it I can leave my results here and how I felt about Corona coming from other engines, but I likely wont do the engine full justice like someone experienced could and might end up representing the engine in a poor way if my port isn’t made optimally.
One of the features Corona is advertised for literally on the main page is "Speed and performance
From bleeding-fast OpenGL graphics to the lightweight scripting power of Lua, Corona is optimized for performance at every core level. With Corona, your apps are automatically compiled at build time, streamlined for performance and stability." So I was surprised that there werent really any benchmarks or anything to actually test the validity of these claims.
I don’t understand the attitude in your posts. It doesn’t endear me to your cause.
I’m probably misreading your posts. It is very hard to get tone right.
The people here (like myself and others) who answer questions for new folks are busy trying to make a living, so we are careful with our time.
Converting a benchmark is interesting, but time consuming. I personally can’t justify the time to do it at this point.
Thanks for raising the topic, and I’d love to see it done, but I for one can’t help. Still there are a lot of smart folks here, so if you’re willing to wait a little you may be surprised and see someone post a conversion.
One more thing. I don’t see an original language-/ engine-agnostic design spec for this benchmark.
Without a spec I’d have to reverse engineer one of those tests to implement this, all the time risking an apples versus oranges comparison due to my misunderstanding of the port-from source.
This is a lot of work.
Interesting, but man time consuming.
PS - In 2013 I wrote a series of benchmarks for Corona. I’m checking to see if I still have the code and will post a link here if I do.
While is isn’t your Bunnymark, you can still run it.
Found it: https://github.com/roaminggamer/RG_FreeStuff/blob/master/AskEd/2018/08/cbench.zip
This is some seriously old code. It is still valid, but it did need a little love to convert it to modern SSK and to Graphics 2.0 from Graphics 1.0.
Here is an HTML5 build (not sure how well this will run in HTML5):
https://roaminggamer.github.io/RGDocs/pages/html5_tests/tests/cbench/
Well… it runs but the scroller is hosed up so you can’t see the end of the results.
I really like Corona and, besides one project, all of my current inDev projects, are done using Corona as it has a lots of strengths. The unpleasant but honest truth ist, extreme performance is just not one of those - and I tried really hard before I added a second framework just for one project.
While I haven’t written any bunnymark and I don’t know the details but any serious implementation would need to be done *in* the engine itself, using f.i. particle systems (as some of the above listed implementions seem to use) which may run fully on the C++ side or even on the GPU is just nonsense and any such implementation is just plain useless. Haxe based engines like Kha of course are fine because the generated C++ is actually built from the same language you also use for the rest of your game/project.
Anyway - the benchmark seems really simple and would be a tiny project but implemented in the typical Corona way I predict you’re in for a disappointing result.
Hello,
I tried to port this bunnymark test to Corona, just for the curiosity to see how it performs compared to the other engines. You can find it here: https://github.com/Melix19/corona-bunnymark
Let me know the results!
(If someone that has more experience with Corona than me finds out that the code can be improved, fell free to send a PR)
Looks good, but the fps counter seems to be wrong after 1000 bunnies. It’s still running fairly smoothly but it’s reporting 3-4 fps.
There is not a real fps counter on Corona so i tried different codes to port it to the project. This is the best that i found.
1. You’re awesome. Thanks for porting.
-
I didn’t agree with your implementation of the FPS counter so used my own and added a memory meter too.
-
I also made an optimized mover more like the code here: https://github.com/pixijs/bunny-mark/blob/master/src/Bunny.js
You can see my version of your port here: https://github.com/roaminggamer/RG_FreeStuff/tree/master/AskEd/2018/08/bunnymark
Direct download : https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/08/bunnymark.zip
Folders:
- original - Your unmodified version.
- modified - My version of your code with alternate FPS meter and memory meter.
- optimized - modified + more performant mover closer to this code: https://github.com/pixijs/bunny-mark/blob/master/src/Bunny.js
PS - Your mover was elegant by the way. Very nice.
PPS - I posted an HTML build of ‘modified’ here: https://roaminggamer.github.io/RGDocs/pages/html5_tests/tests/bunnymark1/index.html
I’d say the performance of the HTML5 build-target (still maturing) is sub-optimal, but on other build-targets the performance is pretty good.
I suspect if you knock the FPS to 30 in config.lua you will actually see a frame rate increase at higher bunny counts.
This is because you are halving the calls to all calculations.