UnityTechnologies / open-project-1

Unity Open Project #1: Chop Chop
http://unity.com/open-projects
Apache License 2.0
5.73k stars 2.03k forks source link

Released Mac app verry laggy #366

Open mushu8 opened 3 years ago

mushu8 commented 3 years ago

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 commented 3 years ago

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 ?

ciro-unity commented 3 years ago

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.

treivize commented 3 years ago

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...

ciro-unity commented 3 years ago

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.

shuttle127 commented 3 years ago

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.

ciro-unity commented 3 years ago

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!

shuttle127 commented 3 years ago

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.

ciro-unity commented 3 years ago

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

shuttle127 commented 3 years ago

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