Now i finished some of the basics of my game, but now i try to make the terrain load, so i got this code:
void CreateTerrain ( void )
{
// two textures are going to be used for the terrain, the first
// will be the diffuse part and the second will be used to
// create extra detail on the terrain
dbLoadImage ( "Assets//Texture001.png", 10 );
dbLoadImage ( "Assets//Detail001.png", 11 );
// the first step in creating a terrain is to call the
// function dbSetupTerrain, this will perform some internal
// work that allows us to get started
dbSetupTerrain ( );
// now we can get started on making the terrain object
dbMakeObjectTerrain ( 1 );
// here we pass in a heightmap that will be used to create the terrain
dbSetTerrainHeightMap ( 1, "Assets//Heightmap001.bmp" );
// now we set the scale, this will have the effect of making
// the terrain large on the X and Z axis but quite small on the Y
dbSetTerrainScale ( 1, 3.0f, 0.6f, 3.0f );
// adjust the lighting for the terrain, this function takes the ID
// number, then a direction for the light, then 3 colours for the light
// and finally the scale, by using this function we can adjust the
// overall colour of the terrain
dbSetTerrainLight ( 1, 1.0f, -0.25f, 0.0f, 1.0f, 1.0f, 0.78f, 0.5f );
// in this call we're telling the terrain that its diffuse texture
// will come from image 1 and its detail texture will come from
// image 2
dbSetTerrainTexture ( 1, 10, 11 );
// once we have set all properties of the terrain we can build it,
// at this point it gets created and added into your world
dbBuildTerrain ( 1 );
}
and this is there error i get:
Unhandled exception at 0x0052a27b in Learn Project.exe: 0xC0000005: Access violation writing location 0x00000004.
Is there something i am doing wrong or do i need to change some things??
and my other question:
Is it possible to make a MMORPG with GDK???