How To Properly Manage Cross-Platform Development

Hi all,

I’m planning on developing a puzzle game for deployment on Android, iOS and Web. I am currently using one project for all platforms (and relying on Cloud Build to produce builds). The game is estimated to take 6-8 weeks until first submission.

The game’s design currently uses a portrait orientation at a target resolution of 1080x1920. I’m currently using a Canvas to contain most of the game content, which uses a Canvas Scaler component, targeting the resolution 1080x1920, matching the width where possible. This appears to scale appropriately, containing the game board at the center, keeping the menus anchored to the top and bottom, scaling the screen vertically for 16:10/16:9 devices.

The game board is fully contained within the canvas, to ensure it is scaled appropriately. It also uses a combination several SpriteRenderers and Canvas Renderers (Image, Text and Button), the latter mainly for UI/menus.

I currently use one source-control repository for the game.

Assets are developed using Photoshop and saved in psd format. The .psd files are used directly in the Unity project (not exported to another format).

My questions are as follows:

  • Is it common to have a single repository to use for multiple platforms? I plan to use preprocessor directives to manage platform-specific items (achievements, leaderboards, social etc). I’ve heard that multiple source control repositories is a ‘proper’ approach, one for each target platform, but I can’t understand why having all that duplicated data is a good idea? Is it even possible to share an Asset folder between two projects?
  • Regarding 2D textures in particular, is this asset production workflow typical? Am I OK to leave the psd files as they are and use them directly?
  • Regarding target resolutions, I chose 1080x1920 in order to target my own device natively. Is this likely to cause problems on less powerful devices? It runs at 60fps without issue on both my test devices (Samsung Galaxy S4 (1080x1920) and an iPad Air (1536x2048)).
  • Is the non-uniform scaling likely to be responsible for the occasional pixellation of some of my assets on iPad? See below images for source and iPad screenshots, images are both at 1:1 resolution; font sheet is imported as TrueColor, 2048x512, Trilinear filtering with mipmaps.

2214183--147304--Original.PNG

Any feedback very much appreciated!

Thanks

Yes. The benefits of a single repo far outweigh the (few and far between) minor differences between platforms in Unity.

I generally convert all my textures to PNG, but that may just be from years of habit. If PSD is working for you then I see nothing wrong with it.

Resolution doesn’t have all that much impact on performance. It’s best to either target the smallest device you want to support, or target some “typical” middle-of-the-road device. If you’re using all of the pinning/scaling properties properly, your UI will adjust just fine.

It runs at 60fps without issue on both my test devices (Samsung Galaxy S4 (1080x1920) and an iPad Air (1536x2048)).

Yes, quite likely. If you really want crisp fonts, you should avoid making them images at all. Use Unity’s Text object, or if you need more control (outline, etc.), use something like TextMesh Pro.

HTH,

  • Joe
2 Likes

TextMesh Pro is exactly the sort of thing I’m looking for! I bought Font Setter-Packer The Best Assets for Game Making | Unity Asset Store but TMP looks even better…

Thanks for clarifying that a single source-control repository was correct - I couldn’t understand why anyone would need several (one per platform), but I’m certain that was the quote I was given, maybe it was a miscommunication :stuck_out_tongue:

Thankyou Joe, you’ve been really helpful :slight_smile:

2 Likes