This is not the way you should use an ini-file. An array is more suitable for a 2-dimensional grid form like this one.
Even worse, you are not loading the ini-data to RAM, but constantly read from the file. You force the file to be read at least 11 times per iteration. With 100x100 positions that's 110000 file accesses in just 36 seconds. It's not slow, it is pretty fast :D
A better way to use the ini-file would be to not orient to the grid, but make groups of object types (and give the items the x/y values):
You'd then, instead of those x/y loops, access the ini-file with:
+ For each item in group "lights"
->Create object tile_light on layer "Tiles" at (GetToken(INI.CurrentItem, 1, ",")* whatever, GetToken(INI.CurrentItem, 2, ",") * whatever)
Add this for every type of object and you're done. this would only access the file once for every item and therefore will be a lot faster than your way.
But if you for whatever reason want to stick to the grid method, then use an array. Arrays will be loaded to RAM, so multiple access to it will be much, much faster.tulamide2011-09-09 04:20:42