Populating an array from an external CSV file, and more....

So I am new to Corona, and I am going to transfer one of my simpler projects from Unity to Corona to use as a learning exercise.

My game uses CSV files to populate arrays at runtime, which I use in the game. Is this something that is easily accomplished in LUA/Corona? Is it even possible out of the box?

Next, one of the appealing things with Unity is that you can write super small compact scripts that do specific things. So in the above example, I have a small script that just parses the CSV file, and populates the necessary arrays when the game starts. With the Corona method of everything being in the main.lua file, how do you create separate re-usable code?

I notice that there are separate files for UI, that are included and pulled in using the require statement. Is that the way for me to keep code segregated, and reuseable? So I can setup a master score manager that is required by the main.lua, the main would handle the gameplay and the score manager can handle the scoring? Could I take it one step further by setting up a main that requires the UI.lua, scoremanager.lua and than a gamemanager.lua?

Would using

local ui = require(“ui”)

be the same thing as setting up an instance of the ui, that I can then manipulate through the lua file that has the require in it?

I am still a little confused on the whole lua thing, my only familiarity with it is custom tools that do no more than control asset loading in the game.

Mike Hovland [import]uid: 5317 topic_id: 551 reply_id: 300551[/import]

Well, more investigation has answered some of my questions.

I will continue experimenting and researching to find the remaining answers. Of course, if anyone feels like pointing me in the right direction, it would be appreciated.

m [import]uid: 5317 topic_id: 551 reply_id: 1099[/import]