Tools for the designer

Something I’ve learnt from the Unity community: Don’t build a game. Instead build a tasty platter of tools for a game designer.

Even in a small team, where you’re wearing both designer and developer hats, it’s helpful to have that split between activities. When you’re creating the tools, you want to focus on building something sturdy and extensible. On the other hand, when you’re designing a game, you want to be free to just try things out, make changes quickly, and focus on crafting an experience for the player.

I’m currently trying to take this approach, building small modules that can be plugged together easily. It’s great for motivation and general sanity (especially when you’re working in fits and starts). So far, I’ve started building a few small modules like a calendar, day cycle tracker, inventory, story/dialog, plant growth simulator etc. From this, I’ve started to gain a feel for how to structure and combine the modules. Leaving some notes here about the thought process so far:

Unity world space

Getting my head around unity world space and how it relates to screen size.

Unity Unit

The unit of measurement in unity. It is good practice to match 1 unit to 1 meter. Default physics and lighting systems are all tuned to this scale.
Tile mapKeep a scale of 1 tile = 1 unit, just for the sake of simplicity.

Camera

How much of your game is visible depends on:

  • Camera size
  • Aspect ratio of your platform’s resolution (e.g. monitor, phone, etc) 

ExampleIf you want your game’s viewport to include about 10m of your scene vertically (for a 2D game).
Camera size: 5 unitsMy scale: 1 unit = 1 meter

Pixels per Unit (PPU)

This is a property of a unity Sprite. Specifies how many pixels from your Sprite fit into a unit in the scene when the GameObject is scaled 1,1,1. 

Setting the right combinations

If you want to make sure all the sprites are the right size relative to each other and the same ‘sharpness’ no matter how far in/out you are zoomed, you should adhere to a consistent unit of measurement for your world. 
If you want to make sure images are sharp on a particular resolution, you need to make sure you have the right combination of these:

  • Object height
  • PPU
  • Camera size.

Example

  • Character height of 1.6m
  • Camera view height of 10m
  • Supporting resolution 2436 x 1125px

Required PPU (for this resolution) = 1125 / 10 = 112.5

Responsive game sizes

If you want to make a responsive game that works for multiple resolutions, you’ll have to decide on how you want to deal with the screen size changes. Say, if you have a bigger screen:

  • Do you see more of the world? 
    • Does this significantly change the game play?
  • Or is everything just enlarged? 
    • If everything is enlarged, then you have to make sure the resolution of your images is high enough to support your largest supported device.

To be continued…