Developing 2D Games with Unity Quotes

36 ratings, 4.19 average rating, 9 reviews
Open Preview
Developing 2D Games with Unity Quotes
Showing 1-2 of 2
“As you walk the player around the map, you may notice a slight jittering effect . The jittering is especially pronounced when you stop walking and the virtual camera damping slowly brings the tracking to a halt. This jittering effect is due to overly precise camera coordinates. The camera is tracking the player but it’s moving to subpixel positions, whereas the player is only moving around from pixel to pixel. We made sure of that when we did the calculations for the Orthographic Camera size earlier. To fix this jittering, we want to force the final Cinemachine Virtual Camera position to stay within pixel boundaries. We’re going to script a simple “extension” component that we’ll add to the Cinemachine Virtual Camera. Our extension component will grab the last coordinates of the Cinemachine Virtual Camera and round them to a value that lines up with our PPU.”
― Developing 2D Games with Unity: Independent Game Programming with C#
― Developing 2D Games with Unity: Independent Game Programming with C#
“The trick to getting a good-looking pixel art game is to pay attention to the orthographic camera size with respect to the resolution, and make sure the artwork looks good at a certain PPU. In our game, we’re going to use a resolution of 1280 × 720 but we’ll use a trick to scale up the art a bit. We’re going to multiply the PPU by a scaling factor of 3. Our modified equation will look like this: (Vertical resolution / (PPU * Scaling factor)) * 0.5 = Camera Size Using a resolution of 1280 × 720 and a PPU of 32: (720 / (32 PPU * 3)) * 0.5 = 3.75 Camera Size This is why we set our camera size to be 3.75 earlier.”
― Developing 2D Games with Unity: Independent Game Programming with C#
― Developing 2D Games with Unity: Independent Game Programming with C#