open-project-1 icon indicating copy to clipboard operation
open-project-1 copied to clipboard

Released Mac app verry laggy

Open mushu8 opened this issue 4 years ago • 9 comments

Short description Hard to play the game because of performance issues : camera lags, it takes 3 seconds to jump, 2,50 GB RAM used for the application.

Expected behaviour Smooth movements

To Reproduce

  1. Download the 0.6 alpha for Mac
  2. Launch it
  3. Game launch fast but it is very laggy

Notes Using Mac OS Catalina 10.15.6 on 3GHz 6 cores i6 and 32GB DDR4

mushu8 avatar Feb 13 '21 14:02 mushu8

I am a beginner with Unity game development but not in development. I would like to use this project as a starter to learn and try. Could someone tell me if it is possible to reduce the memory usage of this project so it can be adaptated to a lighter game ?

mushu8 avatar Feb 13 '21 15:02 mushu8

Thanks for the issue report, @mushu8! Did you try and check why the game lags? It would be great to know. You could try and use the profiler? Since you mention you are a beginner with Unity, this talk might come in handy.

You might also have to rebuild the app for Mac using "Development Build", so that you can attach to it and profile: image

If the task is outside of your knowledge don't worry, we will do it (as we get some time) or hopefully another member of the community.

ciro-unity avatar Feb 13 '21 16:02 ciro-unity

I tried to google this MacOS specific performance issue and came across this log from Unity Answers: https://answers.unity.com/questions/1695529/is-it-expected-to-see-worse-performance-on-mac-osx.html

It might be some thing to retrofit in 2019.x LTS or we wait for 2020.x LTS version to get this solved...

treivize avatar Feb 19 '21 18:02 treivize

this MacOS specific performance issue

Hmm, I'm not specific if you're talking about the issue @mushu8 is describing? Sounds to me like a framerate issue, more than specifically on the input. But I'm not too sure.

ciro-unity avatar Feb 22 '21 20:02 ciro-unity

While I understood how to create the development build and attach to it for profiling from the video, not familiar enough with the codebase to figure out why the PlayerLoop in each frame hovers from 14.5-19ms per frame. Is there an easy way to share my profile data for someone else to review so that they don't have to build? I'm on MacOS Big Sur 11.12.3 with 2.9GHz 6-core i9 with 32GB DDR4.

shuttle127 avatar Apr 21 '21 14:04 shuttle127

Is there an easy way to share my profile data for someone else to review so that they don't have to build?

Hey, yes, the Profiler has a Saving functionality, you can export a file and share it here so we can take a look. Could be useful and fun for learning too!

image

Thanks!

ciro-unity avatar Apr 24 '21 11:04 ciro-unity

That's what I did the other day, but when I tried to upload it here, GitHub said the file type (.data) wasn't supported. My brain was so fried that I didn't realize I could convert it to .gz using gzip and upload it, so I'm trying that now and the file (~41MB) is too big (needs to be <10MB)! Guess it'll be for personal edification after all, heh.

shuttle127 avatar Apr 24 '21 22:04 shuttle127

I guess you can link it using Google Drive, or Dropbox, or similar? (if you want to)

ciro-unity avatar Apr 27 '21 21:04 ciro-unity

Been so swamped lately that have only now gotten a chance to update to the latest code and re-profile, so here's a Dropbox link to a ZIP file of me starting the game on the beach, taking a few steps, attacking the air a few times, and jumping.

https://www.dropbox.com/sh/2rcv8ws0j9fdbrd/AABJzHf2UsDKt5Mk0V7KdzwEa?dl=0

shuttle127 avatar Jun 05 '21 21:06 shuttle127