	SetCameraFocusX(0);
	SetCameraFocusY(0);
	SetCameraFocusZ(0);
	SetCameraRadius(700);
    SetCameraElevationAngle(0);
	SetCameraAzimuthAngle(90);
	SetFogParam(250, 1000, 1, 1, 5);

task StageBackground{
let a = 0;

let sky = ObjPrim_Create(OBJ_SPRITE_2D);
let groundup = ObjPrim_Create(OBJ_SPRITE_2D);
let skyref = ObjPrim_Create(OBJ_SPRITE_2D);
let grounddown = ObjPrim_Create(OBJ_SPRITE_2D);
let water = ObjPrim_Create(OBJ_SPRITE_3D);
let water2 = ObjPrim_Create(OBJ_SPRITE_3D);

ObjPrim_SetTexture(water, GetCurrentScriptDirectory ~ "./img/Ingame/water.png");
Obj_SetRenderPriorityI(water,20);
ObjRender_SetAngleX(water,-78);
ObjRender_SetScaleXYZ(water,1,1,1.5);
ObjRender_SetBlendType(water,BLEND_ADD_ARGB);
ObjRender_SetAlpha(water, 188);
ObjRender_SetPosition(water, rand(-50, 50), 100, 100);

ObjPrim_SetTexture(water2, GetCurrentScriptDirectory ~ "./img/Ingame/water.png");
Obj_SetRenderPriorityI(water2,20);
ObjRender_SetAngleX(water2,-78);
ObjRender_SetScaleXYZ(water2,0.9,0.9,2);
ObjRender_SetBlendType(water2,BLEND_ADD_ARGB);
ObjRender_SetAlpha(water2, 188);
ObjRender_SetPosition(water2, rand(-50, 50), 100, 100);
	
Obj_SetRenderPriorityI(sky,20);
ObjPrim_SetTexture(sky,GetCurrentScriptDirectory ~ "/img/Ingame/sky.png");
ObjSprite2D_SetSourceRect(sky,0,0,1024,256);
ObjSprite2D_SetDestCenter(sky);
ObjRender_SetBlendType(sky,BLEND_ALPHA);
ObjRender_SetPosition(sky,GetStgFrameWidth/2, GetStgFrameHeight/4,0);
ObjRender_SetScaleXYZ(sky, 1, 1, 1);

Obj_SetRenderPriorityI(groundup,20);
ObjPrim_SetTexture(groundup,GetCurrentScriptDirectory ~ "/img/Ingame/ground.png");
ObjSprite2D_SetSourceRect(groundup,0,0,1024,512);
ObjSprite2D_SetDestCenter(groundup);
ObjRender_SetBlendType(groundup,BLEND_ALPHA);
ObjRender_SetPosition(groundup,GetStgFrameWidth/2, GetStgFrameHeight/2-300,0);
ObjRender_SetScaleXYZ(groundup, 1, 1, 1);

Obj_SetRenderPriorityI(grounddown,20);
ObjPrim_SetTexture(grounddown,GetCurrentScriptDirectory ~ "/img/Ingame/ground.png");
ObjSprite2D_SetSourceRect(grounddown,0,0,1024,512);
ObjSprite2D_SetDestCenter(grounddown);
ObjRender_SetBlendType(grounddown,BLEND_ALPHA);
ObjRender_SetPosition(grounddown,GetStgFrameWidth/2, GetStgFrameHeight/2+210,0);
ObjRender_SetScaleXYZ(grounddown, 1, -1, 1);

Obj_SetRenderPriorityI(skyref,20);
ObjPrim_SetTexture(skyref,GetCurrentScriptDirectory ~ "/img/Ingame/sky.png");
ObjSprite2D_SetSourceRect(skyref,0,0,1024,256);
ObjSprite2D_SetDestCenter(skyref);
ObjRender_SetBlendType(skyref,BLEND_ALPHA);
ObjRender_SetPosition(skyref,GetStgFrameWidth/2, GetStgFrameHeight/2+150,0);
ObjRender_SetScaleXYZ(skyref, 1, 1, 1);

	loop{
	ObjSprite2D_SetSourceRect(sky,-a/3,-a/4,2048+-a/3,-a/4+1024);
	ObjSprite2D_SetSourceRect(skyref,-a/3,a/4,2048+-a/3,a/4+1024);
	ObjSprite3D_SetSourceDestRect(water,0,0+(a),256*4,256*5+a);
	ObjSprite3D_SetSourceDestRect(water2,0,0+(a/1.5),256*4,256*5+a/1.5);
	a++;
	yield;
	}
}



task SarakaBackground{
Background1;
Background2;
Background3;
Background4;
}

task Background1{
	let count = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	
	Obj_SetRenderPriorityI(obj,21);
	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "/img/Ingame/back1.png");
	ObjSprite2D_SetSourceRect(obj,0,0,384,448);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetBlendType(obj,BLEND_ALPHA);
	ObjRender_SetPosition(obj,GetStgFrameWidth/2, GetStgFrameHeight/2,0);
	ObjRender_SetScaleXYZ(obj, 1.68, 1, 1);
	loop{
	ObjRender_SetAlpha(obj, count*5);
	count++;
	yield;
	}
	Obj_Delete(obj);
}

task Background2{
	let count = 0;
	let alpha = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	
	Obj_SetRenderPriorityI(obj,21);
	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "/img/Ingame/back2.png");
	ObjSprite2D_SetSourceRect(obj,0,0,384,448);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetBlendType(obj,BLEND_SUBTRACT);
	ObjRender_SetPosition(obj,GetStgFrameWidth/2, GetStgFrameHeight/2,0);
	ObjRender_SetScaleXYZ(obj, 1.68, 1, 1);
	loop{
	ObjSprite2D_SetSourceRect(obj,0,-count,256*2,-count+256*2);
	ObjRender_SetColor(obj, 30, 255, 30);
	ObjRender_SetAlpha(obj, alpha);
	if(alpha<220){alpha+=5;}
	count+=2;
	yield;
	}
	Obj_Delete(obj);
}

task Background3{
	let count = 0;
	let alpha = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	
	Obj_SetRenderPriorityI(obj,21);
	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "/img/Ingame/back4.png");
	ObjSprite2D_SetSourceRect(obj,0,0,512,512);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetBlendType(obj,BLEND_ALPHA);
	ObjRender_SetPosition(obj,GetStgFrameWidth/2, GetStgFrameHeight/6,0);
	ObjRender_SetScaleXYZ(obj, 1, 1, 1);
	loop{
	ObjRender_SetAngleXYZ(obj, 0, 0, count/4);
	ObjRender_SetAlpha(obj, alpha);
	if(alpha<195){alpha+=5;}
	count++;
	yield;
	}
	Obj_Delete(obj);
}

task Background4{
	let count = 0;
	let alpha = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	
	Obj_SetRenderPriorityI(obj,21);
	ObjPrim_SetTexture(obj,GetCurrentScriptDirectory ~ "/img/Ingame/back3.png");
	ObjSprite2D_SetSourceRect(obj,0,0,512,512);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
	ObjRender_SetPosition(obj,GetStgFrameWidth/2, GetStgFrameHeight/6,0);
	ObjRender_SetScaleXYZ(obj, 1, 1, 1);
	loop{
	ObjRender_SetAngleXYZ(obj, 0, 0, count);
	ObjRender_SetAlpha(obj, alpha);
	if(alpha<200){alpha+=5;}
	count-=64;
	yield;
	}
	Obj_Delete(obj);
}