Hello, I want to create a guide for a game. This guide would only consist of menus, graphics, text etc. I started with Corona a few hours ago. I have a few questions:
Is Corona the best way to go for me? I read that Corona is simple and easy to learn but has its cons. As my guide-app would be extremely simple (requires no physics etc.), I thought Corona was suiting
I worked through the first beginning tutorials, but I’m not interest in making games at all. Are there specific tutoruials on how to make a “good menu”? My guide would be like that:
a) Main Menu: the buttons of each category (enemies, biomes etc.)
b) Optionally, in each category there can be sub-categories (further buttons)
c) Text and images shall be visible and well placed within the app
What I also need is
scrolling (if text is too long to display)
maybe “arrows” (<— , —>) to move to the next “page”
using images and placing them properly
What I already “know”
how to configure build.settings and config.lua (very limited knowledge, first tutorials)
how to work with images (very limited knowledge, first tutorials)
how to add text (very limited knowledge, first tutorials)
how to make a “tab” (extremely limited knowledge, skipped through a youtube video)
I’ve already skipped through a few videos, but I wanted to ask you for proper help first, so I don’t waste time in making my app
Are there open source projects that I could use (as templates) to create my app? If so, I’d prefer for Corona, as it seem to be easy. If I need to use Java, Javascript, etc., it wouldn’t be too much of a problem either, because I’m probably going to (attempt to) learn these languaes sooner or later anyway
Is there anything I need to be aware of to make my app working on both Android and iOS?
If you need further information/details, let me know. Thank you!
I think the best thing to do here is to begin mastering what your knowledge is limited in. You don’t have to worry too much about config.lua and build.settings (for now). But I’d say you need to master (or at least learn more about) text and image placement and learning about things such as anchors and opacity (which is not complicated). You’ll also need to learn about composer. The Corona API Documentation, holds all of this and more, here are a few guides to get you started.
I’m back with a question. I read that I shouldn’t use global variables, as they can be “dangerous” and are slower (performance-wise) than local variables. How do I make/use constants in Corona?
Okay, actually I wanted to use my globals so I could change the font size/colour and similar stuff on one place. This reminds me on something else. Is there a list of variable-names that I must not use?
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.
Okay, I made a new “globals” module and requested it in each file. My new questions
When I use text that can’t be modified/clicked, does it matter if I fill it with setFillColor or setTextColor?
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.
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?
I think the best thing to do here is to begin mastering what your knowledge is limited in. You don’t have to worry too much about config.lua and build.settings (for now). But I’d say you need to master (or at least learn more about) text and image placement and learning about things such as anchors and opacity (which is not complicated). You’ll also need to learn about composer. The Corona API Documentation, holds all of this and more, here are a few guides to get you started.
I’m back with a question. I read that I shouldn’t use global variables, as they can be “dangerous” and are slower (performance-wise) than local variables. How do I make/use constants in Corona?
Okay, actually I wanted to use my globals so I could change the font size/colour and similar stuff on one place. This reminds me on something else. Is there a list of variable-names that I must not use?