Initial setting of camera and ppu to match playing table

My goal is to implement another board game as close as possible as I would play it on a table – to not much think about how to arrange elements. The used space on table is in the dimensions of around 1x2m and most of my assets are scans of game cards with a touch of Photoshop (for personal use only). My question is regarding the camera, pixel on import of asset and converting to units. There are no physics in the game involved and it is 2D. For now it will be tailored to my own mobile but I would like to know if one way is preferred if I wanted to later change resolution or is just better best practice. From my understanding it would result both in the same outcomes but there might be some hidden trouble or side effects.

  • Should I (convert for myself to get a feel for dimensions) take 1 unit as 10cm -> scene of 10×20 units would represent my table or rather have a 1×2 unit scene (since most take one unit as one meter)
  • Assuming my scanned card has something like 2000×1000 pixel (and is 10x5cm big on a real table), does it make more sense to have it imported as 2000/20000 under pixel per unit or downscale the image first before importing it with a lesser value? I don’t really care currently about build/ asset size.

Game Development Asked by Zibelas on November 21, 2021

1 Answers

One Answer

Your choice of units within these ranges doesn't matter that much. The math all works out the same.

Usually units only start to be a problem if you're working exceptionally small (eg. 1 unit = 1 pixel) or exceptionally large (eg. 1 unit = 1 km).

Between metres and centimetres, there's not really enough of a magnitude gulf to be a problem, as long as you're close to the origin. So just use what you find comfortable.

Regarding the image size, it sounds like you already understand the trade-off you're making: import time and build size.

If you never plan to show the cards more than about 1000 pixels tall on a screen (filling the screen vertically at 1080p), the extra resolution doesn't really do anything for you, but if you're OK with larger build sizes / VRAM needs or longer import/build processes as the engine resamples the files down to your working sizes — or longer load times as the running game pulls in the whole texture and mip chain — then you can absolutely go either way.

I almost closed this question as opinion-based for these reasons, but hopefully sharing it as a answer makes it clearer why this is just a judgement call you'll need to make based on your own goals and preferred working style.

Answered by DMGregory on November 21, 2021

Add your own answers!

Related Questions

Trouble destroying an SDL2 texture from another class

1  Asked on December 21, 2020 by gamer1


How to hide objects behind an invisible plane?

1  Asked on December 18, 2020 by hatinacat2000


Resizing a tiledmap when using phaser

1  Asked on December 16, 2020 by sora


Prefab spawning issue

2  Asked on December 15, 2020 by usmaan-mahmood


Pause updating but keep rendering

1  Asked on December 5, 2020 by yosoku-denkai


How to make it so my cursor is not behind the UI?

0  Asked on December 3, 2020 by jacksonba90


Can’t submit facebook app for review

2  Asked on November 20, 2020 by moria


OpenGL Strange mesh when animating Assimp

1  Asked on October 26, 2020 by david-neves


2D Sidescroller Gravity

1  Asked on October 22, 2020 by pete-mavrelis


Ask a Question

Get help from others!

© 2021 All rights reserved.