@rshanlon: This is probably a “Down the road”, someday, kinda thing for you… but something to keep in the back of your mind as you move ahead I think…
I’d agree with jbp1, and add on top of that, if you’re looking at doing a living book type “series” of products, in addition to developing all the bits of code that make all individual elements happen (like #1-5 above), you might want to develop a little scripting system so you can throw together entire books quickly (or download small data files that are new stories on occasions), by sort of filling in the details on data forms / in text files. (and a Corona App you develop would be the “engine” that reads the files, and tells the stories).
To do the page flipping / story telling for one part of an app that uses “pages” of similar sequences (tutorials spread around a product) I used a lua table, and lua’s ability to read in text, and decode it back into a table.
So this is a little piece of a script that puts up a background, shows a couple animations on top, and has a link to a “next” page / screen. In the case of these tutorials, one panel would be shown at a time until the user tapped somewhere, then the “next” file would be read and processed (which shows a new panel).
After the engine was done, putting together new tutorials that fit the same scheme was having an artist generate content, and then practically filling in forms. Keep in mind of course, this approach works best when you have many products that use the same “template” (You can save a LOT of time, and bugs over many products this way). On top of that, once the system is created, coders can get back to doing generic coding, and a Production Assistant or Editor can put together the stories.
However, if the pages / books functionally vary a lot, it might be more trouble than its worth. Unfortunately, experience coding helps to know when developing a Content Management System (as I’ve seen them called) might pay off, and when it’s likely to be an unending uphill battle. (And you don’t have a lot of experience making these kind of coding trade-offs).
Anyways, to give an idea of what putting page together with a system like this would look like
[lua]
{
“background”: “Atelier/TutorialBack01.png”,
“objects”:[
{“overlay”:“Atelier/Tutorial/tutorial01.png” },
{“burst”: 1, “x”:480, “y”:320 },
{“bird”: 1, “x”:714, “y”:236 },
{“text”: “Welcome to the Atelier.”, “x”: 480, “y”:860 },
{“next”:“Atelier/Tutorial/Tutorial2.txt” }
]}
[/lua]
Your main app then includes the data file reader / processor. Planning carefully, using pre-fab characters, you could even have your main app include all the stock shots of objects / characters, and then just download little data files on occasions, that contained new stories (new text data files), but re-used the art/audio already built into in the app. Anywho…
PS: A little bit of code to read in a data file like above
[lua]
– loadTable() loads in a table from a file (filename), and returns it (nil on error)
function loadTable(filename)
local path = system.pathForFile( filename, system.DocumentsDirectory) – Where I keepa my tables
local file = io.open( path, “r” )
if file then
– read all contents of file into a string
local contents = file:read( “*a” )
local myTable = Json.decode(contents)
io.close( file )
– print(" – load success.")
return myTable
end
print(" – load fail, no pre-existing file.")
return nil
end
[/lua
PSS: Developing the Corona engine to read and process these scripts, display animations, text, backgrounds, go forward and back between pages/scripts… Took about 2 weeks. From there, it was all gravy as PA’s could throw pages together, and test them immediately (using the corona simulator, installed on their machines).