Creating scenes
Now we should have the main.lua
and test.lua
files in our project. The first one is empty, and the second one has our experiments with project settings. But note this, if we add some code to main.lua
too, the code from both the files (main.lua
and test.lua
) will be executed. That is because Gideros automatically executes all added Lua files. This might be something new even to experienced Lua developers, as you won't require every file you want to use; and it provides a much more flexible approach in handling projects. But it also has its own limitations.
For example, if all the code is executed automatically, how should we separate different scenes, we want to use in our game, in a better way? Or in what order are the files executed? ...
Get Gideros Mobile Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.