Text file limit on iOS

Hello all, is there a text file limit for an iOS game? For example if i am going to create random generated levels while running the game where each level is saved in a different text file, is there a limit for the number of text files or size?

Another question is about storyboard, is this a scene manager like director class or i am wrong?

Thanks for your time! [import]uid: 74723 topic_id: 25897 reply_id: 325897[/import]

I can’t say for certain, but I doubt there’s a “limit” on text files, especially Plain Text files. Even a text file with thousands of lines is probably smaller than a typical JPEG or PNG image in your app.

The “limit” you should concern yourself with is how you process and read these files. In one of my apps, I read several chunks of information (100-200 lines) from an external file and load this into Lua tables so I can deal with it. Using proper string patterns, Corona is really fast in reading this information… but if you place 1000 entries from a text file into one Lua table, you might not approve of the performance. Breaking them up into proper sub-tables is recommended, and be sure to keep them clean, delete them upon exit, etc.

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 25897 reply_id: 104790[/import]

Thanks for the reply. I’ve been testing around and it is working good so far. And thanks for the tips on how to read files.

The only thing i need to figure out now is a way to check the memory of a phone. So i can stop creating/generating maps when it reaches a certain limit.

Once again, thanks! [import]uid: 74723 topic_id: 25897 reply_id: 104864[/import]

I personally like this memory-checking code, courtesy of Jonathan Beebe (Ansca). I might have modified it slightly (printing the value to the Terminal, not the screen), but credit Jonathan for writing the original code. :slight_smile:

local function garbagePrinting()  
 collectgarbage("collect")  
 local memUsage\_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) )  
 print( memUsage\_str, "TEXTURE = "..(system.getInfo("textureMemoryUsed")/1000000) )  
 --mem.text = memUsage\_str  
 --texmem.text = "TEXMEM: "..(system.getInfo("textureMemoryUsed")/1000000)  
end  
local t = timer.performWithDelay( 1000, garbagePrinting, 0 )  

[import]uid: 9747 topic_id: 25897 reply_id: 104926[/import]

iOS is built on top of a Unix based system and pretty much has an insanely large max file size. So I wouldn’t worry about large text files. I have several 100Kbyte and one 2MByte text file for an app and I don’t notice any delays in reading it.

[import]uid: 19626 topic_id: 25897 reply_id: 104934[/import]