Screen jitter after game interface Scaling

Source: Internet
Author: User

I recently solved the problem of screen jitter after game interface scaling. I will share it with you.

Our company's games experienced significant image jitter after the interface was scaled to 75%, 50%, 40%, and 25%. After the assistance and efforts of our colleagues, we understood the ddraw scaling rule, in general, the process should be: Taking 50% as an example, we should take a column for each column of the image, and then remove a column. This is also true for the implementation of rules in the analogy to the row, for example, if there are 10 columns, ddraw will take 1, 3, 5, 7, and 9 from a large BLT to a small screen, and the corresponding even numbers will be removed, if we move the canvas three pixels, the pixels displayed on the screen will become even columns, causing the screen to flash. The corresponding solution is actually very simple, you only need to ensure that the screen is a multiple of 2. Of course, this situation may cause certain exceptions to the character. Specifically, if the character moves an odd number of pixels at a time, for example, if it is 3 pixels, in order to ensure screen flickering, We need to manually adjust the shift of the canvas, then the position of the character will have a pixel offset. If the scaling ratio is not well selected, the offset is more obvious.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.