Hi, need some help!
I am having problems with speed. My game has 64 terrain tiles each 32X32 totalling 256X256 ie 131072 triangles in total. I tried adding all of them but things just freeze up. it dus work when I just add 4 tiles. I still need to add lots of trees a rocks. Here is the problem code.
If s=0 Then
trimesh(xx,yy)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx+4,yy)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx,yy+4)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx+4,yy+4)=CreateTriMesh(Space,Land_mesh(xx,yy))
dGeomSetPosition(trimesh(xx,yy),1024+(xx*2048),0,1024+(yy*2048))
dGeomSetPosition(trimesh(xx+4,yy),1024+(xx*2048)+8192,0,1024+(yy*2048))
dGeomSetPosition(trimesh(xx,yy+4),1024+(xx*2048),0,1024+(yy*2048)+8192)
dGeomSetPosition(trimesh(xx+4,yy+4),1024+(xx*2048)+8192,0,1024+(yy*2048)+8192)
EndIf
Any ideas to speed things up?
I am having problems with speed. My game has 64 terrain tiles each 32X32 totalling 256X256 ie 131072 triangles in total. I tried adding all of them but things just freeze up. it dus work when I just add 4 tiles. I still need to add lots of trees a rocks. Here is the problem code.
If s=0 Then
trimesh(xx,yy)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx+4,yy)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx,yy+4)=CreateTriMesh(Space,Land_mesh(xx,yy))
trimesh(xx+4,yy+4)=CreateTriMesh(Space,Land_mesh(xx,yy))
dGeomSetPosition(trimesh(xx,yy),1024+(xx*2048),0,1024+(yy*2048))
dGeomSetPosition(trimesh(xx+4,yy),1024+(xx*2048)+8192,0,1024+(yy*2048))
dGeomSetPosition(trimesh(xx,yy+4),1024+(xx*2048),0,1024+(yy*2048)+8192)
dGeomSetPosition(trimesh(xx+4,yy+4),1024+(xx*2048)+8192,0,1024+(yy*2048)+8192)
EndIf
Any ideas to speed things up?