Introduction
This tutorial shows how to use terrain in Kochol Game Engine and shows the basic usage of tile terrain scene node You have to read Hello Kochol Game Engine and Camera movement tutorials before this tutorial.
We will delete old comments in this tutorial.
The minimal code for terrain rendering
#include "../../Include/kge.h"
#pragma comment(lib, "../../bin/debug/kge.lib")
const float fCamSpeed = 3.0f;
void keys(float elaspedtime)
{
pCam->
MoveBF(fCamSpeed * elaspedtime);
pCam->
MoveBF(-fCamSpeed * elaspedtime);
pCam->
MoveRL(fCamSpeed * elaspedtime);
pCam->
MoveRL(-fCamSpeed * elaspedtime);
}
int main()
{
(
);
(
2048,
2048,
4,
4,
512
);
(
112,
112,
0.0,
0.2
);
{
keys(fElaspedTime);
}
}