Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jbabineau · Feb 02, 2020 at 10:42 PM · optimizationresolutionframerateslowprocessing

2D game performance keeps slowing tremendously when resolution is at 1080p (1920 x 1080)

I have been working on the main menu options of my 2D game for PC builds for some time now under a resolution of 720p (1280 x 720), and it had been running very smoothly above 60 fps most of the time. I basically have been working with PNG images as sprites and backgrounds for building a proper aesthetic without the reliance of post-processing or unique shaders.

I have decided, however, to restructure the game into a higher resolution of 1080p to meet today's more common gaming platform standards. This meant having to enhance the sizes of most of my previous art assets by 150%. Upon applying all these assets into the new build though, the game suddenly has slowed down to an average rate of 40 fps, and no matter how much I try to optimize the game by compressing images and removing pointless methods in the code, the game remains sluggish.

I don't fully understand why no improvement can be made to the game at a higher resolution. Though, I am certain the general causes are related to the larger texture files upsetting the GPU. For instance, I have a 3840 by 1080 px sprite that resembles a fog that is meant to scroll across the screen in a repetitive loop. I did what I could to compress the size, but no luck. I also resorted to rendering the image as a material for a quad instead to allow its wrap mode to repeat, but it also doesn't bring much improvement and it doesn't allow me to filter the alpha properly to my expectations. In addition, I have a lot of large tree sprites set in the background to move along the background when I execute the illusion of moving across the scene. Again, I have compressed them to reduce filesize usage, but no change. It all still works perfectly at 1280 x 720 resolution, so I'm baffled on why the render time would change so drastically from a 50% increase in screen size.

I'm beginning to think the issues are due to my graphics card (AMD Radeon HD 7730M and Intel(R) HD Graphics 4000). It might also be due to my version of Unity being at 2018.2.20f1. Can anyone tell me if these are the possible reasons for my game's slow performance? Or am I really neglecting a certain technique to further optimize the processing power usage? I swear, I have tried nearly everything I've read up upon to make it happen, like Static batching or Occulsion culling. Please let me know of any other solutions.

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sacredgeometry · Feb 03, 2020 at 07:43 AM 0
Share

3840 by 1080 px is a massive sprite especially if its an animated one. What is your art style? Do they genuinely need to be that big? Not only that because its not power of 2 its also a poorly optimised one.


Your game is probably really poorly optimised. This is often the case with poorly optimised systems. They are fine until you put any amount of stress or load on them and then they completely fall apart. Without more information about how the game is structured, any efforts that have been made to optimise, profiling information etc its really hard to say specifically whats slowing your game down.

avatar image jbabineau sacredgeometry · Feb 03, 2020 at 09:52 AM 0
Share

alt text

alt text

These are some examples of the art assets in use. The top one is a frontward fog that should only take the bottom third of the screen. Its color and texture should be somewhat similar to the fog that takes up the full screen, which I cannot upload here due to size. The tree is one of up to four present in the scene. These trees are programmed to zoom in as they scroll to the left of the scene to simulate the idea of walking past them. The zoo$$anonymous$$g feature is obviously going to use up more processing power, which is why I make sure to remove them once outside the canvas. Are these any indication of problems for optimization?

frontfog.png (234.2 kB)
fronttreea.png (339.1 kB)
avatar image jbabineau sacredgeometry · Feb 03, 2020 at 11:05 AM 0
Share

https://imgur.com/a/kFSba8Z

Here's a sample of the overall game scene to further clarify the details of the art assets in use. Note the transparent fog engulfing the canvas. Please don't $$anonymous$$d the offset hand and GUI text. They are meant to be enlarged later on, since they were originally created for 720p res.

avatar image JPhilipp · Feb 03, 2020 at 11:13 AM 0
Share

Good question. Just to ask, are there any downsides for you for just giving a try of updating to the latest Unity (2019.3.0f6), to confirm whether the issue there still exists or is gone? If there's no downsides to that upgrade, then I would say (normally) the newer the better.

Once you've done that, you might want to look at the Unity Profiler to see what is causing the most lag. In particular, if you still have the old pre-resolution-increase version in a repo, consider the before-after situation in the Profiler. This could pinpoint the exact thing that's now taking longer.

Good luck!

avatar image jbabineau JPhilipp · Feb 03, 2020 at 06:00 PM 0
Share

I actually upgraded to 2019.3 earlier last night. There seemed to be a small percent of improvement in runtime, but the overall processing is still slow as a sloth. I sent a screencap of the project as seen within my reply to a previous answer, which displays the stats of the game's process. Strangely, the FPS often reads around 80, but it still moves like it was 40. I've checked the profiler and noticed a lot of the GPU's usage is co$$anonymous$$g from the transparent rendering, but may also have to do with the constant draw calls of the art assets, according to the frame debugger. In any case, does whatever I post in the image give any further clarification on the issue I'm going through?

avatar image JPhilipp jbabineau · Feb 03, 2020 at 06:02 PM 0
Share

Does the lag still appear in the build, i.e. when adding an FPS counter, compiling, then running the Exe? I'm asking as Unity Editor sometimes adds odd, non-fully-representative lag. (Though it's usually indicative of something wrong indeed.)

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by suIly · Feb 03, 2020 at 07:13 PM

It's the 4k fog that scrolls across the screen that's slowing it down, try reducing it to 720 or 1080p :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jbabineau · Feb 03, 2020 at 07:32 PM 0
Share

Could you clarify? $$anonymous$$y game IS at 1080p, and I'm not sure what you mean by reducing IT. I am not aware of any setting that can reduce a PNG texture or sprite based on a screen resolution. Did you mean reduce the max size of an image to something like 1024 or 512? Either way, I have already compressed the fog as best as I could without disrupting to much of the detail. So I don't think that alone is the problem.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

129 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why my game is so god damn slow on Droid ? 0 Answers

Sudden Framerate drops at random times?? 2 Answers

Optimizing framerate on lots of billboards 2 Answers

VSync won't disable 3 Answers

Movement cutting frames in half? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges