Hi there.. i´m struck in a problem..

I want to create 10x10 terrains.
Each terrain should have 250x250 cells with a cellsize of 10.

This is the code to is:
Click to reveal..

Code:
#include <acknex.h>
#include <d3d9.h>
#include <windows.h>

#include "syst_default.c"





var levelbreite, levelhoehe;
var camera_zoom = 1200;

STRING* str_result_filename = "";

BMAP*   bm_levelmap;

COLOR*  pixelcolor = {red=1; green=1; blue=1;}

ENTITY* mapsky;
ENTITY* mapterrains[101];



//==========================================================================================================================
//==========================================================================================================================
//
//                                    INCLUDES
//
//==========================================================================================================================
//==========================================================================================================================
#include "global_structs.c"


//==========================================================================================================================
//==========================================================================================================================
//
//                                    LOADING TERRAINS
//
//==========================================================================================================================
//==========================================================================================================================
void create_terrains(var x_num, var y_num)
{
	var ix, iy, icount, ivertcount, icenterx, icentery, camset;
	camset = 0;
	icount = 1;
	icenterx = (x_num/2);
	icentery = (y_num/2);
	BMAP* terraintest = bmap_createblack(1024,1024,24);
	bmap_fill(terraintest, vector(random(255), random(255), random(255)), 100);
	
	//terrains laden
	for(iy=0; iy<x_num; iy++)
	{
		for(ix=0; ix<y_num; ix++)
		{
			if(sys_memory > 500000)
			{error("Mehr als 500MB sind besetzt!");}
			
			if(ix>icenterx && iy>icentery && camset == 0)
			{
				vec_set(camera.x, vector((ix-1)*2500, (iy-1)*2500, camera_zoom));
				camset = 1;
			}
			mapterrains[icount] = ent_createterrain(terraintest, vector(ix*2500,iy*2500,100), 250, 250, 10);
			icount ++;
			wait(1);
		}
	}
	
	//vertexe setzen
	for(icount=1; icount<26; icount++)
	{
		for(iy=0; iy<x_num; iy++)
		{
			for(ix=0; ix<y_num; ix++)
			{
				
			}
		}
	}
}



//==========================================================================================================================
//==========================================================================================================================
//
//                                    DUMMY MAIN
//
//==========================================================================================================================
//==========================================================================================================================
void main()
{
	nexus = 500;
	video_mode = 12;
	d3d_antialias = 9;
	level_load(NULL);
	sun_light = 0;
	wait(2);
	mapsky = ent_createlayer("sky_2+6.tga", SKY | CUBE | SHOW, 0);
	
	vec_set(camera.x,  vector(0,0,1200));
	vec_set(camera.pan, vector(0,-45,0));
	
	create_terrains(10, 10);
}




It works well with.. let´s say 5x5 terrains.. but with 10x10 terrains, i always get a "nexus too small".
I asked a friend if that´s possible.. but he said that something is strange, cause 250*10*100 = 250000*56byte, wich are a few MB, and not my nexus size of 500MB ._.


What could be wrong?

Last edited by Espér; 01/15/12 15:26.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<