Topic: Framerate Issues Between between UFE Life and UFE Source

I recently upgraded to UFE Source from UFE Lite and the framerate on a Source build is terrible compared to Lite. I'm having the same problem on the Unity editor and Android build.

I set my framerate to 60 fps and I'm having the most trouble with 2D characters.

I have uploaded it to YouTube for you guys to review.

https://youtu.be/j6MiEsdUUwQ

I tried everything from a Unity optimization standpoint but nothing works.

Please help.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

They phone on the right looks like a galaxy s4...? What about the phone on the right? Are they pretty similar spec wise?  Have you checked the profiler to see what might be slowing it down?

apollo wrote:

I recently upgraded to UFE Source from UFE Lite and the framerate on a Source build is terrible compared to Lite. I'm having the same problem on the Unity editor and Android build.

I set my framerate to 60 fps and I'm having the most trouble with 2D characters.

I have uploaded it to YouTube for you guys to review.

https://youtu.be/j6MiEsdUUwQ

I tried everything from a Unity optimization standpoint but nothing works.

Please help.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

Also, are you using a sprite sheet or separate files per sprite?

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

@christougher: It doesn't matter the specs on the phone, I still get the same issues. No I didn't check the profiler. I will try that.

@MrPonton: I'm using separate files per sprite. There are no UFE tutorials on how to use a sprite sheet for 2D characters.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

It depends on the size of your sprite files honestly. The first time they play in the scene and get put into RAM might potentially be causing a hitch. I've never tested it on phones. It shouldn't be due to the source version though.

To use a sprite sheet you'd create it like any other sprite, except you'll just have to do all your pivot points and sprite cut outs all in one file instead of individually. I had some performance success when doing setting up a local Third Strike variant/redux by doing that. Also will come in handy if you need to look into doing palette swaps down the road. I haven't gotten that fully functioning yet so I haven't made a tutorial on doing such atm.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

@MrPonton I did so much work on my characters but I will reluctantly use a sprite moving forward (especially concerning pallet swaps).

I noticed substantial improvements when I commented out all of the debug printouts (for character moves) from the source code. UFE Lite doesn't print debugs to the console window.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

There is no relation to framerate and the version of UFE you are using. There are a lot more variables at play, so I wouldn't jump into that assumption. I believe the problem is somewhere else.

Under Unity, go to Edit -> Project Settings -> Time. See if the values match these:
Fixed Timestep: 0.01666667
Maximum Allowed Timestep: 0.3333333
Time Scale: 1
Maximum Particle Timestep: 0.03

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Framerate Issues Between between UFE Life and UFE Source

apollo wrote:

I noticed substantial improvements when I commented out all of the debug printouts (for character moves) from the source code.

Yeah some Debug logs at certain points will just kill the framerate. Especially if it has to print on every. single. frame.

Share

Thumbs up +1 Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

@Mistermind

The only difference I saw was Fixed Timestep: 0.02

I made the change but didn't really see any improvement.

Thanks for the help nonetheless

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

@MrProton:

I also looked at the Profiler window as you suggested and it seems there's a lot of activity in Scripts (specifically UFE.FixedUpdate())

I'm not sure how to get to it. Maybe UFE.FixedUpdate() is the problem and a Coroutine should used instead.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

apollo wrote:

@Mistermind

The only difference I saw was Fixed Timestep: 0.02

I made the change but didn't really see any improvement.

Thanks for the help nonetheless

That alone should be the cause of the problem. When the Timestep is incorrect that is the exact result you'd see. To run at 60 FPS you need Fixed Timestep at 0.01666667.

About the FixedUpdate, that is not the problem. The profiler is just pointing out the function that uses the most resources, which is UFE's main tick function (since it calls out to everything else in the game). Notice you will see the exact same result with your previous copy of UFE lite.

The problem is most likely because you copied the files onto an existing project instead of extracting UFE Source package directly. As a result, some of the project settings were not properly overridden. This process can be done manually, here is how:

- Close Unity.
- Using the explorer and navigate to (Project Folder)\Assets\UFE\ProjectSettings
- Open ProjectSettings.zip
- Extract its content to (Project Folder)\ProjectSettings
- Reopen your project in Unity

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Framerate Issues Between between UFE Life and UFE Source

@Mistermind: I did your suggestion and didn't see any changes. Now the apk crashes when I try to launch on Android devices (tablet and phone). Would changing the framerate to 30 fps help things? Please advise.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

apollo wrote:

@Mistermind: I did your suggestion and didn't see any changes. Now the apk crashes when I try to launch on Android devices (tablet and phone). Would changing the framerate to 30 fps help things? Please advise.

No it wouldn't change anything. Setting it to 30 fps means changing your entire game architecture to understand data at 30 fps, not 60. That means moves that were designed with 15 frames would run in half a second instead of a quarter of a second.

About your craches, it sounds like an unrelated problem to this topic. Take a look at this post, see if your settings match these instructions:
https://forum.unity.com/threads/univers … st-3815395

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Framerate Issues Between between UFE Life and UFE Source

@Mistermind: It seems like the problem has been resolved after I downloaded the latest version of Unity and manually installed the JDK and NDK.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

Good news! Everything seems to work after I compressed the individual 2D sprites into High Quality and compressed images in other places around Unity.

Share

Thumbs up +2 Thumbs down

16 (edited by apollo 2020-01-27 11:44:55)

Re: Framerate Issues Between between UFE Life and UFE Source

Setting the FPS to 30 fixed my frame rate issue on mobile. I had to adjust all the hitboxes and moves to all of my characters but that was a small price to pay.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

UFE has its own FPS counter and it operates tightly with Unity time manager and the options under Global Editor -> Advanced -> FPS and the FPS architecture of each move:
http://www.ufe3d.com/doku.php/move:general?s[]=fps
http://www.ufe3d.com/doku.php/global:advanced?s[]=fps

Make sure you know what you're doing when changing your FPS settings.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

Re: Framerate Issues Between between UFE Life and UFE Source

@Mistermind Hello;

I replaced UFE's particles with new ones to better match the artwork of my game. Unfortunatly, it caused drops in my framerate and my Control Freak 2 touch controls are unresponsive.

I have made adjustments to Input Buffer Size in the Network Options and I reduced the image sizes of the materials in my new particles. Are there any other ways to optimize my project with if I use new particles?

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

apollo wrote:

@Mistermind Hello;

I replaced UFE's particles with new ones to better match the artwork of my game. Unfortunatly, it caused drops in my framerate and my Control Freak 2 touch controls are unresponsive.

I have made adjustments to Input Buffer Size in the Network Options and I reduced the image sizes of the materials in my new particles. Are there any other ways to optimize my project with if I use new particles?

It could be that your game is loading necessary assets during gameplay and that is overloading the CPU.
Try checking the "character preview" under each of your move assets. If you have linked character prefabs on those moves that are not the characters that are currently active, that will load unnecessary assets to your game.

Also, are you using Resource loading methods for loading your character assets (instead of prefabs)?
http://www.ufe3d.com/doku.php/character:prefabs
Under Character Prefab, select "Resource Folder" as your loading method to make sure the game only loads the necessary assets. You can read more about it here:
https://docs.unity3d.com/Manual/BestPra … nity6.html

Also, make sure you are doing the same for the Move Sets. Use Stances (Resource) instead of Stances (Preloaded).

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.

20 (edited by apollo 2020-03-18 21:16:28)

Re: Framerate Issues Between between UFE Life and UFE Source

Thank for the suggestion. I did everything you suggested (even moving stages to Resources folder) but I'm still getting sluggish framerates.

Share

Thumbs up Thumbs down

Re: Framerate Issues Between between UFE Life and UFE Source

I made some substantial frame rate improvements after I did the following:

- I did your suggestions(checking the "character preview" under each of move assets) and moving the prefabs to Resources.

- I reduced the size of all of the particles in my game.

- I set the Camera Object > Rendering Path to Legacy Vertex Lit

- And I unchecked Use FixedUpdate for Inputs in the Advanced Options

Share

Thumbs up Thumbs down