Creating A Guide For An Already Existing Game

It’s still better to make your own data module and store your “globals” there. Then all you do is require that module in each of your modules.

Please read: https://docs.coronalabs.com/tutorial/basics/globals/index.html if you haven’t already.

If you do choose to use globals, please make sure you prefix them with _G. so that you know you’re using a global and secondly name your variables in a way that you know it’s yours. This is called namespacing. Modifying @roaminggamer’s suggestion above:

I would change:

\_G.fullw = display.actualContentWidth

to

\_G.myFullw = display.actualContentWidth

As far as I know fullw is safe, but you can never be sure.

Rob

Okay, I made a new “globals” module and requested it in each file. My new questions

  1. When I use text that can’t be modified/clicked, does it matter if I fill it with setFillColor or setTextColor?
  2. Should I rather use letterbox, zoomEven or other scaling?

I’m extremely confused about resolution, scaling and all that stuff - whether my images and text will be displayed the way I want or not (they won’t). I use the default 320 width and 480 height in my config file. To be honest, I don’t even understand what that really means. I’ve read through a few forum posts, documents and sample code but didn’t understand much as of now.

Generally constants are defined like this: THIS_IS_THE_SCREEN_WIDTH = 480

If your app is portrait then use letterbox scaling, if it is landscape the use zoomEven. 

This explains the difference between letterBox and zoomEven:

https://docs.coronalabs.com/guide/basics/configSettings/#scale

Let’s say it like that. What’s the recommended value for width and height in the config file? I use the “default” 320, 480. What’s the recommended width and height so I can display as much text/information to my guide?

The other issue I have is that I need a good example of an interface that works on any device. All I can take from the documentation is that you have different ways to use scaling and that you can have dynamic image selection by using imageSuffix. Is that it? Is there really nothing else that has to be done?