Optimal Resolution for Node.js games

0 favourites
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • There are two sides to the GPU performance:

    1) reading from the source textures. Larger images involve more data to read so can be slower.

    2) writing pixels to the screen. A higher resolution involves writing more pixels. The rate the GPU can write pixels at is called the fillrate.

    Usually from what I've seen the bottleneck is 2). As in, the size of your source artwork doesn't matter that much, it's mostly about how much content is drawn. If you have a large source image and render it to a small, low-resolution display, you don't use much fillrate, because there weren't so many pixels written to, even if the source image is large. On the other hand, even a small source image drawn at a large size on a high-resolution display will use a lot of fillrate, since it has to fill a lot of pixels. So generally I focus on the fillrate side of performance.

    Look up mipmaps on wikipedia to learn more about them, but they also help make 1) less of a performance issue. The GPU stores images at 1/2 size, 1/4 size, 1/8 size etc. down to a single pixel with high-quality resizing. If you render a large source image at half the size, it will render from the 1/2 size source image that it automatically generated, which means there's even less concern about the size of the source image. The main reason to reduce the size of your source images is basically to reduce the overall memory usage.

    If you have any performance questions involving specific cases, it's best to measure them yourself.

    thanks ashley, that helps me understand better... so basically: stay away from large images as much as you can. And my challenge is to fill up my game's background smartly as possible. I read some of your other blog posts where you reference Rayman Legends' art etc... I guess I thought I was already being conservative...good to know.

  • Ashley so if fillrate is the ultimate decider.. then do you get any benefit from using the same object over and over? (besides memory)

    i.e. a single 800x800 blue square vs. 10 duplicates of a single 80x80 square (snapped together to make it look like one big sqaure)

    I ran a test although I can't tell if it's the same performance or if I'm not looking at the correct info..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fillrate isn't affected by what you're drawing: 10 of the same or 10 different objects drawn at the same size use the same fillrate. Using the same object over and over helps save the overall memory use, which is a separate concern to fillrate.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)