Games Xui2D unofficial performance chit chat

sorex

Expert
Licensed User
Longtime User
Please place your device performance remarks here and not in Erel's performance hints/guide thread.


Phone Wise, if the big games companie's targetted low-end 4GB ROM/ 512MB RAM Mediatek phones as their user base phone, then we would be still playing snake.

sorry but this remark is not really correct and is mainly suitable for the heavy (3D) games.
it depends on your game expectations/preferences.
if you prefer puzzle games or these addictive mini games a la ketchapp specs don't matter much in most cases as long as they kept their minimum target low enough it will work fine on his S3.

I just looked at when angry birds came out and that was 2010 for Android.

I remember that it ran perfect on my Samsung Galaxy Apollo in december 2010 when I got the phone or somewhere beginning 2011 it was just (too) small to look at.

It ran on SDL/Box2D (C++) engine back then but the low spec phone could pull it.

As someone mentioned that Andy's games ran more smooth the difference is probably that big C(++) compiled binary libGDX is running on/in that gives the needed speed boost altho I think Andy is using the scene2d part of it and not box2d which would be faster in processing aswell.

just found this on the libGDX site > "The Box2D implementation in libgdx is a thin Java wrapper around the C++ engine."

Also notice that Xui2D is still in alpha/beta/... stage and there have been speed-ups already to some parts of it. And the IOS port probably runs at full speed already as it is using the C++/objC version of box2d.

I will go through the examples and report what I get on my phone.
 

sorex

Expert
Licensed User
Longtime User
I notice in the space invaders & tilemap that I still get a flood of log messages in release mode.
This usually slows down things a bit but will probably be removed later when the final Lib version comes out. (Edit: it's probably just in the class files)

Phone:
Huawei P8 Lite
Octa-core 1.2 GHz Cortex-A53

Space Invaders : mostly 60 fps, sometimes a small drop. more than smooth enough to play it.
Tank Attack: 60 fps
Tilemap: 60fps after turning off the debug draw
Mario: 60fps
Joints1: starts at 30fps but boosts after 0.5 seconds to 60fps and stays at 60
Hello World: starts at 60fps tille the screen is 3/4 filled with boxes and donuts then it drops to 30 altho the drop animations are still smooth.
Clumsy Bird: 60fps but the pipe redraws seems shaky sometimes but the bird/floor remains smooth
Walking Character: mostly 60fps, it dropped once to 34 probably because some none game related background task kicked in.

I'm very impressed to be honnest.

Small note... this phone doesn't have any apps like facebook, twitter etc installed. These might kill performance when they sync in the background.
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
You keep forgetting one HUGE detail...
XUI2D is still beta... once officially released, I am sure the performance will be even higher...
As I said, I am not a games dev, but the way you are criticising is not a very constructive one... you are just throwing specs and result without any further conclusion not suggestions, and at times, not even additional info.
If I was @Erel, with all the criticism this is having, I would have just abandoned...
Try to see the larger picture... when B4ppc first came out, it didn't even produce a proper .exe! And look how far we are now!
Be constructive in your critics.. don't just say "on my 10years old phone it doesn't work as it's supposed to".
Give additional info, like what apps you have running in background, Android version, etc...
Remember that @Erel's examples are just that... examples, proof of concept... NOT A FINAL PRODUCT...
I am sure @Erel is very much aware of the engine weaknesses, and working hard to gives us a product HE would be proud of... he doesn't settle for less than that.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I just looked at when angry birds came out and that was 2010 for Android.

I remember that it ran perfect on my Samsung Galaxy Apollo in december 2010 when I got the phone or somewhere beginning 2011 it was just (too) small to look at.
The correct question is whether XUI2D is fast enough to build games at 2018+ for Android and iOS. There is no doubt that XUI2D as-is would not have been created at 2010. However it doesn't matter because 2010 has already passed...
The clear answer is yes, assuming that you understand how to use XUI2D framework efficiently.

A galaxy S3 from 2012 or Galaxy Ace are not considered relevant targets for XUI2D. Same is true for the dusted atom netbook from 2010.

As developers we must get our priorities right and aim for the %99 market.

Joints1: starts at 30fps but boosts after 0.5 seconds to 60fps and stays at 60
Hello World: starts at 60fps tille the screen is 3/4 filled with boxes and donuts then it drops to 30 altho the drop animations are still smooth.
Clumsy Bird: 60fps but the pipe redraws seems shaky sometimes but the bird/floor remains smooth
Walking Character: mostly 60fps, it dropped once to 34 probably because some none game related background task kicked in.
While the numbers are not bad they are still misleading. It is expected and completely fine that the FPS will fall from time to time to 30. XUI2D does it on purpose to keep the game play smooth.
If we want to be obsessed with the FPS then it is very simple to change the framework to "try harder" to maintain 60 FPS. Overall the game will not run smoother but the numbers will be better.

You should instead write whether it mostly runs at 30 FPS or mostly runs at 60 FPS.

Anyone who make tests, make sure to test in release mode with debug drawing disabled.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
I am sure @Erel is very much aware of the engine weaknesses, and working hard to gives us a product HE would be proud of... he doesn't settle for less than that.
Not at all. I'm already very proud of XUI2D performance. It is much better than I expected when started developing it.
The engine performance is very good. Don't be misled by irrelevant statistics. This is exactly why I didn't like those posts.
All the examples run at 60 FPS on an old 2013 Nexus 5 and all examples run at 60 FPS on an old iPhone 5S. This covers all relevant phones.
 

sorex

Expert
Licensed User
Longtime User
You keep forgetting one HUGE detail...
XUI2D is still beta...

that was already mentioned in my first post with the addition that Erel keeps working hard to improve and extend it.

>don't just say "on my 10years old phone it doesn't work as it's supposed to".

I didn't mention that. re-read my post. I'm saying box2d was made to work on the low spec phones when it came out as there was not much else.

As Erel pointed out if it works on older phones (~5 years) it's perfect.

And talking about being misled... This was the case for me because my first tests were only with B4J exept for the space invaders.
And as Erel mentioned it's a lot better performance wise on mobile.
 
Last edited:

sorex

Expert
Licensed User
Longtime User
You should instead write whether it mostly runs at 30 FPS or mostly runs at 60 FPS.

well, all of them are mostly/static ~60 (58-60) , only the donut/boxes one drops to 29-34 and stays around these figures when the screen is full of objects.

30fps is fine
 

andymc

Well-Known Member
Licensed User
Longtime User
As someone mentioned that Andy's games ran more smooth the difference is probably that big C(++) compiled binary libGDX is running on/in that gives the needed speed boost altho I think Andy is using the scene2d part of it and not box2d which would be faster in processing aswell.
I don't even use scene2D, I just load the textures, sometimes I used regions and draw everything manually in the render batch.
 

sorex

Expert
Licensed User
Longtime User
Even better then ;) (sorry, post updated)
 
Last edited:

JanG

Member
Licensed User
Longtime User
There are many tablet owners with older generation devices, because the life cycle is longer than phones. I am one of this users. I have a Samsung SM-T520, Octa-Core 1.9 GHz. It satifies my needs perfectly. All non high-end games (esp. 2D) run smoothly.

Is it possible to develop smoothly working xui2d games for devices like that or is it unsupported?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are many tablet owners with older generation devices, because the life cycle is longer than phones. I am one of this users. I have a Samsung SM-T520, Octa-Core 1.9 GHz. It satifies my needs perfectly. All non high-end games (esp. 2D) run smoothly.

Is it possible to develop smoothly working xui2d games for devices like that or is it unsupported?
You should always start a new thread for your questions.
 

sorex

Expert
Licensed User
Longtime User
I think it will work fine, Jan.

You can always try the examples then you'll know for sure.
 
Top