Skip to content

Hardware requirements

Matthew Khouzam edited this page Aug 14, 2020 · 28 revisions

Drawing assumptions: We want probably 60 fps, I would argue 10 fps is a fine compromise for the WORST case

Resolution Max # states (and textured pixels) Max # vertexes Fill rate (mega v/s)
4k 8.3 M 33 M 330 M
1440p 3.6 M 15 M 150 M
1080p 2 M 8 M 80 M
720p 1 M 4 M 40 M

To give perspective (2020 number):

  • This is the worst case, it is very very hard to achieve
  • An old laptop or modern tablet should handle 720p
  • A new laptop should handle 1080p
  • A gaming console or desktop computer should handle 1440p
  • A top notch PC can handle 4K

Optimisations that come to mind: Note: these optimizations will not accelerate the "average case" only degenerate cases.

  • On the software side a quick optimisation is "if a state is one pixel wide, draw a line" this will divide the number of vertexes by 2
  • We can also apply a "Zebra optimisation": one state is full and the other draws over. So we can make alternating colours draw as surfaces. So in some cases we can divide by 2 another time.
  • Finally we can draw to a back buffer and over-render, then keep the image as a surface. Then panning will be trivial, we will lose in terms of memory usage and we will suffer aliasing issues with this.
  • Check that we wait for VSync to avoid tearing issues. (we might already do that.)
  • Finally we should avoid pre-mature optimisations I wrote them to show that we know there is work that can be done if needed on the software side.

The benchmark I would suggest looking at is bunny-mark. It scales really poorly (I tried it on several PCs and the results are not linear), but it uses pixiJS.

https://pixijs.io/bunny-mark/

Clone this wiki locally