Do I need to change the code handling the placement of the UI elements using fractions of the screen width and height instead of fixed whole numbers?
I would advise not to do that, that will give a poor result and be pretty complex to manage.
Or do I add a line to the GameViewController that looks for which type of device is being used and then throws to a different set of files with values specific to that device?
I would not do this either.
I see 2 main options:
Use constraints to position elements relatively to the whole view (or safe area). It will be OK on a larger than iPhone 11, but on a small screen, you will have problem to fit them all. You will probably manage on a 5.5" screen, but will be hard on a 4.7 or worse 4" screen.
Embed the whole scene in a UIView withy a fixed size equal ti size of the iPhone11 screen. Set constraints relatively to this view
Then embed this View into a Scrolling view. Set the constraints of the scrollView to the safe area
In any case, clearly warn on the app description that it best works on screens larger than (iPhone 11 screen)
Result:
In iPhone 11, you will see no change.
on larger screens, you will have some unused space, but no scrolling
on smaller screens, user will have to scroll ; may be a bit tricky for a game.