Hum i see... Great suggestions there and very good news that the Merger 
class is getting updated soon (i'll probably use it :-)) and your example 
looks awesome, it runs on my pc at 30fps and with just 35mb of ram. Since my 
last post, I decided to use the "move subgeometry" way, and realized the 
following: there should be a moveTo() function in the SubGeometry class, 
that would move the subMesh to a position. To achieve this, i created the 
following function (that can then be adapted to the SubGeometry class):

private function moveSubGeomTo(subGeom:SubGeometry, position:Vector3D) {
var vertexData:Vector.<Number> = subGeom.vertexData.concat();
var vertexLength:int = vertexData.length;
 for (var i:int = 3; i <= vertexLength; i += 3) {
 vertexData[i - 3] += position.x;
 vertexData[i - 2] += position.y;
 vertexData[i - 1] += position.z;
}
subGeom.updateVertexData(vertexData);
}

where subGeom is the SubGeometry we want to move and position is a Vector3D 
that indicates the position we want to move the SubGeometry to. Maybe this 
could be implemented in the SubGeometry class :-D.

Well, just tested now and with this method (currently only applied to the 
cubes of one type) really increases the FPS and the memory used. Right now 
my game is only using 20mb of ram (before was 30mb) and runs at 24 FPS (the 
max I've set it to and before in some cases the FPS dropped to 15-19). And 
also decreased the time that the map took to build, by 50ms (from 150 to 
100). So I'm hoping for even better results with the Merge class :-D

P.S. I would love to publish a test of my game, but I'm trying to improve 
it. Maybe at latter phases, who knows

Reply via email to