Ok. Well as it obviously doesn't work great that way, let me make 3 suggestions:

1) Use a big var/ int array that contains the value/ type of every tile in your level, f.i. a 200x200 array. Then create only a small array of entities, maybe 20x20, which make up the visible part of the level. The entities have the appropriate model file according to their position and the var array value. If you now move the camera, f.i. to the right, you only have to morph one column (or none) because you can replace all other columns by simple pointer arithmetic (I mean create the entity field array out of column arrays and replace their indices in the field array).

2) I don't fully understand why you would need to manipulate the meshes and thus need to clone them. The tiles could easily be created this way that they perfectly fit together. If you need a little more variation you can manipulate the vertices in the vertex shader depending on their world position (using sin/ cos/ ...), that's what I oftentimes do in my game, it allows me to stitch entities together easily and animate them seamlessly.

3) As you don't need any collision detection for your game, you can try to set collision_mode to 0 (before level_load) and hope that entity creation gets faster (because no collision mesh should be calculated then).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends