Another game....Sci Fi Tactical Turn Based Shooter (simple)

Started by Matty, August 06, 2024, 17:09:37

Previous topic - Next topic

Matty

Yes, it is blitz3d though the last two videos were rendered not in real time, but simply by saving the output frame to a folder one after the other over several hours.

Here's the code (it's really ugly - i'm only showing this to show you how I did the movie, it's not good coding practice what i've done with this....if you replace the values that are loaded with all the loadmesh/loadanimmesh/loadtexture you can basicallly produce the same movie but with whatever meshes you have sitting around...)

Code:

Code: BASIC
debugging = 0
scg# = 0.175
record = 1
startframe = 0
Global renderfrom = 0
skipframe = 0
skipped = 0
maxframe = 3400
;;;;;;;;;;;;;;;;;;
doclouds = 1
dorocks = 1
dobushes = 1
Global doshadows = 2
dotrees = 1
grasson = 1
spedup = 0

renderfrom = Abs(Int(Input("Render From This Frame:")))
maxframe = Abs(Int(Input("Render To This Frame:")))
record = Int(Input("Type '1' to Record Frames To Disk"))
If record<>1 Then record = 0
Graphics3D 1920,1080,0,2
Global cpivot = CreatePivot()
Global camera = CreateCamera(cpivot)
AlignToVector camera,0,-1,1.5,3,1
MoveEntity camera,0,0,-100
Global gplane = CreatePlane()
EntityColor gplane,40,40,40
EntityPickMode gplane,2
;;;;;
;Lighting
;
AmbientLight 0,0,0
lp = CreatePivot()
light1 = CreateLight(1)
LightColor light1,240,200,150
EntityParent light1,lp
AlignToVector light1,1,-1,1,3,1
light2 = CreateLight(1)
LightColor light2,240,200,150
AlignToVector light2,-1,-1,1,3,1
EntityParent light2,lp
light3 = CreateLight(1)
LightColor light3,240,200,150
AlignToVector light3,1,-1,-1,3,1
EntityParent light3,lp
light4 = CreateLight(1)
LightColor light4,240,200,150
AlignToVector light4,-1,-1,-1,3,1
EntityParent light4,lp
;;;;;
bbbb = 1
For c = 1 To CountChildren(lp)
	LightColor GetChild(lp,c),240/bbbb,200/bbbb,150/bbbb
Next


Dim mesh(200)
Dim meshsc#(200)

Dim skeletonalive#(1000)
Global skeletonindex = 0

Global warriorid = 0
Global wizardid = 0

Dim man(10)
Dim woman(10)
Dim mans(10)
Dim womans(10)
Dim horse(1)
Dim horses(1)

Type ent
	Field index
	Field x#,y#,z#
	Field yaw#
	Field scx#,scy#,scz#
	Field shade ;mesh for shadows...
End Type

Global villagetree = 0
Global grassid = 0
Global bushid = 0
Global statueid = 0
Global rockid = 0
loadmeshes()

loaddata()

	cammode = 0
	meshindex = 0
	cube = CreateCube() ;for reference purposes only...
	EntityAlpha cube,0.8
	EntityColor cube,255,0,255
	
	PositionEntity camera,0,1.75,0
	AlignToVector camera,0,1,0,2,1
	AlignToVector camera,0,0,1,3,1
	TranslateEntity camera,0,0,-50
	
	gcube = CreateCube()
	FitMesh gcube,-100,-1,-100,200,1,200,False
	
;	gtex = LoadTexture("maptex.jpg",1)
	gtex0 = LoadTexture("deserttex.jpg",1)
	SetBuffer BackBuffer()
	Global map = LoadTerrain("desertmap.png")
;	map2 = LoadTerrain("desertmap.png")
	TerrainDetail map,30000
	TerrainShading map,True
;	TerrainDetail map2,30000
;	TerrainShading map2,True
	ScaleTexture gtex0,1,1
;	ScaleTexture gtex,1,1
	
	
	ScaleEntity map,5,150,5
	PositionEntity map,-1280,0,-1280
;	ScaleEntity map2,10,480,10
;	PositionEntity map2,-2560,2,-2560
	
;	EntityTexture map2,gtex,0,0
	
	SetBuffer BackBuffer()
	EntityTexture map,gtex0,0,0;desert

	TranslateEntity gplane,0,-0.5,0
	
	CameraClsColor camera,100,140,180
	
	camshot = 1
Global	frame = -3
	
	PositionEntity map,-1024,0,-1024

	bpivot = CreatePivot("C:\mattiesgames\old\conflicttmp\tools\3dmodels\scifibuildings\")
	dir = ReadDir("C:\mattiesgames\old\conflicttmp\tools\3dmodels\scifibuildings\")
	If dir<>0 Then
		SeedRnd 33
		Repeat
			file$ = NextFile(dir)
			If file = "" Then Exit
			If Right(file,3) = "3DS" Then
				bld = LoadMesh("C:\mattiesgames\old\conflicttmp\tools\3dmodels\scifibuildings\"+file)
				If bld<>0 Then
					If bldtex = 0 Then bldtex = LoadTexture("C:\mattiesgames\old\conflicttmp\tools\3dmodels\scifibuildings\mtl-bld-04.jpg",1)
					EntityTexture bld,bldtex
					xx# = -60
					zz# = 120
					PositionEntity bld,xx+Rnd(-60,60),0,zz+Rnd(-60,60)
					TranslateEntity bld,0,ym(EntityX(bld),EntityZ(bld)),0
					RotateEntity bld,0,Rnd(0,16)*22.5,0
					;TranslateEntity bld,0,-1,0
					ScaleEntity bld,0.01,0.01,0.01
					EntityParent bld,bpivot
				EndIf 
			EndIf 
		Forever
		CloseDir dir
	EndIf
	
	HideEntity bpivot
	
	spivot = CreatePivot()
	ship = LoadMesh("C:\development\3dmodels\finalships\team5\small_frigate_4\small_frigate_4.3DS")
	RotateMesh ship,0,-90,0
	shiptex = LoadTexture("C:\development\3dmodels\finalships\team5\small_frigate_4\small_frigate_4_color.png",1)
	shipitex = LoadTexture("C:\development\3dmodels\finalships\team5\small_frigate_4\small_frigate_4_illumination.png",1)
	TextureBlend shipitex,3
	EntityTexture ship,shiptex
	EntityTexture ship,shipitex,0,1
	EntityTexture ship,shipitex,0,2
	ScaleEntity ship,1,1,1
	AlignToVector ship,10,-3,3,3,1
	PositionEntity ship,-100-400,120+100,160
	EntityParent ship,spivot
	HideEntity spivot
	
;	epivot = CreatePivot()
	esprite = CreateSprite()
	Dim etex(8)
	For i = 1 To 8
		etex(i) = LoadAnimTexture("C:\mattiesgames\corridors_in_space\fx\etex"+i+".png",1+2,128,128,0,64)
	Next
	HideEntity esprite	
	;EntityParent esprite,epivot
;	HideEntity epivot
	
	
	gunship = LoadMesh("C:\mattiesgames\old\conflicttmp\tools\3dmodels\gunship\gunship05.b3d")
	RotateMesh gunship,0,0,0
	gunshiptex = LoadTexture("C:\mattiesgames\old\conflicttmp\tools\3dmodels\gunship\gs-02-map.jpg",1)
	EntityTexture gunship,gunshiptex
	ScaleEntity gunship,1,1,1
	
	HideEntity gunship
	
	marine = LoadAnimMesh("C:\mattiesgames\corridors_in_space\units\marine1.b3d")
	ScaleEntity marine,1,1,1
	
	HideEntity marine
	
Repeat
	tris = 0
	TurnEntity cube,0,10,0
	frame = frame + 1
	If frame = 2401 Then
		dup = dup + 1
		frame = 2400
		If dup >2 Then frame = 2401
	EndIf 
;	If frame > 2400 Then spedup = 0
;	If debugging <> 0 And frame > startframe + 5 Then 
;		If frame Mod 10 = 0 Then startframe = frame + 200
;	EndIf 
	mx = MouseX()
	my = MouseY()
	lmb = MouseHit(1)
	rmb = MouseHit(2)
	zm = MouseZSpeed()
	
	If zm<>0 Then 
		If cammode = 0 Then 
			For id = 200 To 0 Step -1
				If mesh(id)<>0 Then Exit
			Next
			meshindex = meshindex + zm
			If meshindex < 0 Then 
				meshindex = id
			EndIf
			If meshindex > id Then meshindex = 0
		EndIf 
	EndIf 
	
	CameraPick camera,mx,my

;	If camshot<>1 Then 
;	MoveEntity camera,0,0,Float(KeyDown(17)-KeyDown(31))*0.25
;	TurnEntity camera,0,Float(KeyDown(30)-KeyDown(32))*1.25,0
;	Else
		If frame = 0 Then
			PositionEntity camera,0,ym(0,0)+3.0,0
			AlignToVector camera,0,1,0,2,1
			AlignToVector camera,0,0,1,3,1
		Else
			If frame < 10 Then 
			dd1# = 1.0
			If debugging<>0 Then dd1# = 10.0
			MoveEntity camera,0,0,1.0*0.125*0.25*dd1
			TurnEntity camera,0,-360.0/(1440.0*4.0)*dd1,0
			PositionEntity camera,EntityX(camera),ym(EntityX(camera),EntityZ(camera))+3.0,EntityZ(camera)
			EndIf 
		EndIf 
;	EndIf 
	If frame < 150 Then
		MoveEntity camera,-0.25,0,0.15
		AlignToVector camera,0.1,0,1,3,1
		PositionEntity camera,EntityX(camera),ym(EntityX(camera),EntityZ(camera))+2.0,EntityZ(camera)
	EndIf 
	If frame > 250 And frame < 250 + 360*4.0 Then
		PositionEntity ship,EntityX(ship,True),ym(EntityX(ship,True),EntityZ(ship,True)),EntityZ(ship,True),True
		PositionEntity camera,EntityX(ship,True)+80.0*Sin(Float(frame)*0.5*0.25),80+EntityY(ship,True),EntityZ(ship,True)+80.0*Cos(Float(frame)*0.5*0.25)
		TranslateEntity camera,0,-0.15*(Float(frame - 250))*0.25,0
		If frame > 1200 Then
			MoveEntity camera,0,0,-0.25*Float(frame - 1200.0)
		EndIf 
		If frame < 1200 Then CameraZoom camera,3.0
		PointEntity camera,ship
		zoom# = 3.0
	EndIf 
;	If frame > 1450 Then spedup = 1
	If frame > 1200 And frame < 1450 Then
;		spedup = 0
		zoom = zoom * 0.975
		If zoom < 0.85 Then zoom = 0.8
		CameraZoom camera,zoom
		
	EndIf 
	If frame > 3000 And frame < 3600 Then
		zoom# = 1.0 + Float(frame - 3000) * 0.0125
		CameraZoom camera,zoom
	EndIf 
	If frame = 150 Then
		cam150x# = EntityX(camera)
		cam150y# = EntityY(camera)
		cam150z# = EntityZ(camera)
	EndIf 
	If frame >1500 And frame < 2000 Then 
			PositionEntity camera,-60,ym(0,0)+3.0,30
			AlignToVector camera,0,1,0,2,1
			AlignToVector camera,-0.1,0,1,3,1
			;If frame = 1501 Then PositionEntity camera,cam150x,cam150y,cam150z
			
			MoveEntity camera,-0.25,0,0.15
			;AlignToVector camera,0,1,0,2,1
			;AlignToVector camera,-0.1,0,1,3,1
			
			;PositionEntity camera,EntityX(camera),ym(EntityX(camera),EntityZ(camera))+2.0,EntityZ(camera)

			CameraZoom camera,1
	EndIf 
	
	If frame < 250 Then TranslateEntity spivot,5,-0.85,2.5

	If frame > 1400 And frame < 1500 Then
		b1 = GetChild(bpivot,1)
		
		PositionEntity gunship,EntityX(b1,1) - 10,EntityY(b1,1),EntityZ(b1,1) - 10
		PositionEntity gunship,EntityX(gunship),ym(EntityX(gunship),EntityZ(gunship))+1.0,EntityZ(gunship)
	EndIf 

	If frame >=2400 And frame < 2700 Then
		xx# = EntityX(gunship) - 45
		yy# = EntityY(gunship) + 25
		zz# = EntityZ(gunship) - 25
		PositionEntity camera,xx,yy,zz
		PointEntity camera,gunship
		CameraZoom camera,3
	EndIf 

	If frame >=2700 And frame < 3000 Then
		PositionEntity ship,EntityX(ship,True),ym(EntityX(ship,True),EntityZ(ship,True)),EntityZ(ship,True),True
		PositionEntity camera,EntityX(ship,True)+80.0*Sin(70),20+EntityY(ship,True),EntityZ(ship,True)+80.0*Cos(70)
		PointEntity camera,ship
		TurnEntity camera,0,30,0
		MoveEntity camera,0,0,-50
		CameraZoom camera,1.2
	
	EndIf 
	If frame >3000 And frame < 3400 Then
		PointEntity camera,marine
	EndIf 
	If frame > 1600 And frame < 2350 Then
;		TFormVector EntityX(gunship)-EntityX(camera),EntityY(gunship)-EntityY(camera),EntityZ(gunship)-EntityZ(camera),0,0
;		AlignToVector camera,TFormedX(),TFormedY(),TFormedZ(),3,0.125
		If frame > 1600 Then RotateEntity camera,DeltaPitch(camera,gunship)*0.2,DeltaYaw(camera,gunship)*0.1,0;PointEntity camera,gunship
		CameraZoom camera,1.0 + Float(frame - 1600) * 0.0025
		TranslateEntity camera,0,0.2,0
	EndIf 

	If frame > 1800 And frame < 2350 Then
		CameraZoom camera,2
		PositionEntity camera,EntityX(gunship),EntityY(gunship),EntityZ(gunship)
		RotateEntity camera,EntityPitch(gunship),EntityYaw(gunship),EntityRoll(gunship)
		MoveEntity camera,5,0,-25
		MoveEntity camera,0,0,-0.125*Float(frame-1800)
	EndIf

	If (frame Mod (spedup+1) = 0 And spedup >= 1) Or spedup = 0 Then 
	If skipframe > 0 Then 
		If skipped = 1 Then startframe = frame + (frame Mod skipframe) - 3
	EndIf 	
	If frame >= startframe And (record = 0 Or (record<>0 And frame Mod 2 = 0)) Then 
	skipped = 1
	CameraClsMode camera,True,True
	ShowEntity gplane
	For id = 0 To 200
		If mesh(id)<>0 Then HideEntity mesh(id)
	Next
	ShowEntity cube
	HideEntity cube
;	ShowEntity gcube
	HideEntity gcube
	ShowEntity map
;	ShowEntity map2
	renderworld3

;	HideEntity map2
	HideEntity gcube
	HideEntity gplane
	HideEntity cube
	HideEntity map
	
	
	CameraClsMode camera,False,False
	CameraFogMode camera,False
	ShowEntity map
	For ix# = 0.1 To 1.0 Step 0.1
	TranslateEntity map,Rnd(-0.25,0.25),Rnd(0.1,0.15),Rnd(-0.25,0.25)
	EntityAlpha map,0.1
	renderworld3
	Next
	EntityAlpha map,1
	PositionEntity map,-1024,0,-1024
	HideEntity map
	If doclouds = 1 Then 
		If cloudtex = 0 Then
			 cloudtex = LoadTexture("cloudtex.png",1+2)
;			 SetBuffer TextureBuffer(cloudtex)
;			 LockBuffer
;			 For tx = 0 To TextureWidth(cloudtex)-1
;				For ty = 0 To TextureHeight(cloudtex)-1
;					argb = ReadPixelFast(tx,ty)
;					ta = (argb Shr 24) And 255
;					tr = (argb Shr 16) And 255
;					tg = (argb Shr 8) And 255
;					tb = (argb And 255)
;					tr = tr / 2
;					tg = tg / 2
;					tb = tb / 2
;					WritePixelFast tx,ty,ta Shl 24 Or tr Shl 16 Or tg Shl 8 Or tb
;				Next
;			 Next
;			UnlockBuffer 
;			SetBuffer BackBuffer()
		EndIf
		
		If cloud = 0 Then
			cloud = CreateSphere()
			EntityTexture cloud,cloudtex
			EntityAlpha cloud,0.6
			EntityFX cloud,1
			ScaleMesh cloud,10,4,7
			
		EndIf
		ShowEntity cloud
		SeedRnd 893483
		gcloud# = gcloud# + 1.0
		If gcloud > 2048 Then gcloud = 0
		For i = 1 To 250
			gx# = Rnd(-1024,1024) + gcloud
			gz# = Rnd(-1024,1024) + gcloud
			If gx > 1024 Then gx = gx - 2048
			If gz > 1024 Then gz = gz - 2048
			For j = 1 To 30
			xt# = gx + Rnd(-100,100)
			zt# = gz + Rnd(-100,100)
			gy# = ym(xt,zt)+Rnd(-30,70);Rnd(50,250)
			
			PositionEntity cloud,xt+zcloud,gy,zt+zcloud
			;RotateEntity cloud,Rnd(360),Rnd(360),Rnd(360)
			scx# = Rnd(10,30)*0.66
			scy# = Rnd(4,15)*0.5
			scz# = Rnd(10,30)*0.66
			EntityAlpha cloud,Rnd(0.05,0.35)*0.2*1.0
			ScaleEntity cloud,scx,scy,scz			
			CameraProject camera,xt,gy,zt
			If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-400 And ProjectedY()<1400 Then 
				renderworld3
				tris = tris + TrisRendered
			EndIf 
			Next
		Next
		HideEntity cloud		
	EndIf 
	CameraFogMode camera,True
	CameraFogRange camera,10,180
	CameraFogColor camera,100/bbbb,140/bbbb,180/bbbb
;	If frame > 2400 And frame < 2700 Then CameraFogMode camera,False;CameraFogRange camera,60,300
	ShowEntity bpivot
	ShowEntity spivot
	
	xx# = EntityX(ship,True)
	yy# = EntityY(ship,True)
	zz# = EntityZ(ship,True)
	If frame >150 And frame < 155 Then
		xx1# = xx
		yy1# = yy
		zz1# = zz
	EndIf 
	If frame < 250 Then 
	EntityFX ship,8+1
	Else
		EntityFX ship,0
		ScaleEntity ship,5,5,5
	EndIf 
	renderworld3
	HideEntity spivot
	HideEntity bpivot
	ShowEntity esprite
	SeedRnd 3
	If frame < 150 Then 
	For i = 1 To 16
		rrq# = Rnd(1.0,3.0)
		ScaleSprite esprite,8*rrq,8*rrq
		EntityFX esprite,1+8
		qq = Abs((Int(frame*3)+i*4) Mod 80)
		If qq >= 0 And qq < 64 Then 
			EntityTexture esprite,etex(Rand(1,8)),qq
			PositionEntity esprite,xx+Rnd(-2,2)*Rnd(0.5,2.5),yy+Rnd(-2,2)*Rnd(0.5,2.5),zz+Rnd(-2,2)*Rnd(0.5,2.5)
			renderworld3
		EndIf 
	Next
	EndIf
	If (frame >250 And frame < 2000) Or (frame > 2650 And frame < 3600);250 + 360 Then
		SeedRnd 312
		EntityAlpha esprite,1
		For i = 1 To 32
			rrq# = Rnd(0.5,3.0)*0.6
			ScaleSprite esprite,8*rrq,8*rrq
			EntityFX esprite,1+8
			qq = Abs((Int(frame*1)+i*4) Mod 80)
			If qq >= 0 And qq < 64 Then 
				EntityTexture esprite,etex(Rand(1,8)),qq
				PositionEntity esprite,xx+Rnd(-12,12)*Rnd(0.5,2.5)-20,yy+Rnd(-3,3)*Rnd(0.5,2.25)+2,zz+Rnd(-15,15)*Rnd(0.5,3.5)
				
				renderworld3
			EndIf 
		Next

	EndIf 
	If frame >150 And frame < 200 Then
		If frame > 180 Then
			EntityAlpha esprite,1.0 - Float(frame-195)/46.0
		EndIf 
	SeedRnd 31
	For i = 1 To 32
		xx = xx1
		yy = yy1
		zz = zz1
		rrq# = Rnd(5.0,12.0)
		ScaleSprite esprite,8*rrq,8*rrq
		EntityFX esprite,1+8
		qq = Abs((Int(frame*3)+i*4) Mod 80)
		If qq >= 0 And qq < 64 Then 
			EntityTexture esprite,etex(Rand(1,8)),qq
			PositionEntity esprite,xx+Rnd(-2,2)*Rnd(0.5,2.5),yy+Rnd(-2,2)*Rnd(0.5,2.5),zz+Rnd(-2,2)*Rnd(0.5,2.5)
			renderworld3
		EndIf 
	Next
			
	EndIf 
	HideEntity esprite
	
	If frame > 1450 And frame < 2400 Then

		ShowEntity gunship
		ScaleEntity gunship,1,1,1
		If frame > 1600 And frame < 1930 Then
			RotateEntity gunship,0,Float(frame - 1600)*0.5,0
			MoveEntity gunship,0,0.125,0
		EndIf 
		If frame > 2000 Then 
			TranslateEntity gunship,1.85,0.2,1.5
			
		EndIf 
		renderworld3
		HideEntity gunship
	EndIf 
	
	If frame >= 2400 And frame < 2700 Then
		ShowEntity gunship
		RotateEntity gunship,0,0.1*Sin(Float(frame-2400)*0.25 - 2400.0)-45+180,0
		PositionEntity gunship,Float(frame - 2400),0,Float(frame - 2400)
		TranslateEntity gunship,0,ym(EntityX(gunship),EntityZ(gunship))+25+10.0 * Cos(Float(frame*2.0)),0
		renderworld3
		HideEntity gunship
	EndIf 
	If frame >=2700 And frame < 3000 Then
		
		ShowEntity gunship
		EntityFX gunship,0
		ScaleEntity gunship,2,2,2
		;PositionEntity gunship,EntityX(ship,True)+50,EntityY(ship,True)+20,EntityZ(ship,True)-50
		If frame < 2800 Then TFormPoint -5+(Float(frame-2800))*0.1,0,50+Float(frame-2800)*0.1,camera,0
		
		PositionEntity gunship,TFormedX(),TFormedY(),TFormedZ()
		;TFormVector 0,0,-80,camera,0
;		TranslateEntity gunship,TFormedX(),TFormedY(),TFormedZ()
		RotateEntity gunship,0,Float(frame)*0.1,0
		If EntityY(gunship)>ym(EntityX(gunship),EntityZ(gunship)) Then
			If frame > 2850 And frame < 3000 Then TranslateEntity gunship,0,-0.1*(Float(frame)-2850.0),0
		EndIf 
		renderworld3
		HideEntity gunship
	EndIf 
	If frame>=3000 And frame < 3400 Then
		ShowEntity gunship
		SeedRnd 44
		For j = 1 To 6
			xx# = EntityX(gunship) + (EntityX(ship,1) - EntityX(gunship) )*Float(frame - 3000)*0.002 + Rnd(-5,5)
			zz# = EntityZ(gunship) + (EntityZ(ship,1) - EntityZ(gunship) )*Float(frame - 3000)*0.002 + Rnd(-5,5)
			yy# = ym(xx,zz)+0.1
			ShowEntity marine
			ScaleEntity marine,0.1,0.1,0.1
			PositionEntity marine,xx,yy,zz
			RotateEntity marine,0,ATan2(EntityZ(ship,1)-EntityZ(gunship),EntityX(ship,1)-EntityX(gunship)) - 90.0,0
			qanim = Int(frame) Mod 30
			SetAnimTime marine,qanim
			renderworld3
		HideEntity marine
		Next
		HideEntity gunship
	EndIf 
	If frame < renderfrom Then Goto skipzone2
	If dobuildings = 1 Then 
	For ent.ent = Each ent
		If mesh(ent\index)<>0 Then 
			ShowEntity mesh(ent\index)
			en = mesh(ent\index)
			PositionEntity en,ent\x,ent\y,ent\z
			RotateEntity en,0,ent\yaw,0
			ScaleEntity en,meshsc(ent\index),meshsc(ent\index),meshsc(ent\index)
			xx# = ent\x
			zz# = ent\z
			renderworld3
			tris = tris + TrisRendered()
			HideEntity mesh(ent\index)	If doshadows <>0 And ent\shade = 0 Then ent\shade = shadows(en)
			If ent\shade<>0 Then 
				PositionEntity ent\shade,ent\x,ent\y+0.025,ent\z
				ScaleEntity ent\shade,ent\scx,ent\scy,ent\scz
				ShowEntity ent\shade
				EntityAlpha ent\shade,0.03
				For sx# = -2.0 To 2.0 Step 2
					For sz# = -2.0 To 2.0 Step 2
						PositionEntity ent\shade,ent\x+sx*ent\scx,ent\y+0.025,ent\z+sz*ent\scz
						renderworld3
						tris = tris + TrisRendered()
					Next
				Next				
				HideEntity ent\shade
			EndIf 
		EndIf 
	Next
	EndIf 

	;do people
	If dopeople >= 1 Then 
	dda = 250
	If dopeople = 2 Then dda = 25 
	;do horse
	If horse(1)<>0 Then
		SeedRnd 333
		ShowEntity horse(1)
		PositionEntity horse(1),13,0,-37
		RotateEntity horse(1),0,Rnd(360),0
		ScaleEntity horse(1),1,1,1
		qanim = ((frame + Rand(0,100)) Mod 390) + 11
		SetAnimTime horse(1),qanim
		renderworld3
		tris = tris + TrisRendered()
		HideEntity horse(1)
		If doshadows<>0 Then 
		If horses(1)= 0
			horses(1) = CopyEntity(horse(1))
			ScaleEntity horses(1),1,0.001,1
			EntityAlpha horses(1),0.15
			EntityColor horses(1),0,0,0
			HideEntity horses(1)
		Else
			ShowEntity horses(1)
			HideEntity horse(1)
			PositionEntity horses(1),EntityX(horse(1)),EntityY(horse(1))+0.025,EntityZ(horse(1))
			RotateEntity horses(1),0,EntityYaw(horse(1)),0
			SetAnimTime horses(1),qanim
			For cx# = -0.25 To 0.25 Step 0.25
				For cz# = -0.25 To 0.25 Step 0.25
					PositionEntity horses(1),EntityX(horse(1))+cx,EntityY(horse(1))+0.025,EntityZ(horse(1))+cz
					renderworld3
					tris = tris + TrisRendered()
				Next
			Next	
			HideEntity horses(1)
		EndIf
		EndIf  
	EndIf
	SeedRnd 123

	For i = 1 To dda
		m = Rand(1,10)
		w = Rand(1,10)
		If woman(w)<>0 Then
			ShowEntity woman(w)
			sx# = Rnd(-50,50)
			sz# = Rnd(-50,50)
			fx# = sx + Rnd(-10,10)
			fz# = sz + Rnd(-10,10)
			inside = 1
			its = 0
			While(inside = 1)
			its = its + 1
			inside =  0
				For ent.ent = Each ent
					If (Abs(ent\x-sx)<5 And Abs(ent\z-sz)<5) Or (Abs(ent\x-fx)<5 And Abs(ent\z-fz)<5) Then inside = 1:Exit
				Next
				sx# = Rnd(-50,50)
				sz# = Rnd(-50,50)
				fx# = sx + Rnd(-10,10)
				fz# = sz + Rnd(-10,10)
				If its > 20 Then Exit
			Wend 
			If inside = 0 Then 
				walking = 0
				iframe = frame + i * 123 + m * 384
				fmax = 1200
				fstart = 200
				fwalk = 300
				If iframe Mod fmax < fstart Or iframe Mod fmax > fmax-fstart Then 
					xt# = sx
					zt# = sz
					;yaw# = Rnd(360)
					yaw# = (i + m ) Mod 360
				EndIf
				If iframe Mod fmax > fstart+fwalk And iframe Mod fmax < fstart+fwalk+fstart Then
					xt# = fx
					zt# = fz		
					;yaw# = Rnd(360)	
					yaw# = (i*5 + m*3 ) Mod 360
				EndIf 
				If iframe Mod fmax >=fstart And iframe Mod fmax<=fstart+fwalk Then
					xt# = sx + (Float((iframe Mod fmax)-fstart)/Float(fwalk)) * (fx - sx)
					zt# = sz + (Float((iframe Mod fmax)-fstart)/Float(fwalk)) * (fz - sz)
					yaw# = ATan2(fz-sz,fx-sx)
					walking = 1
				EndIf 
				If iframe Mod fmax >=fwalk+fstart*2 And iframe Mod fmax<=fmax - fstart Then
					xt# = fx + (Float((iframe Mod fmax)-(fwalk+fstart*2))/Float(fwalk)) * (sx - fx)
					zt# = fz + (Float((iframe Mod fmax)-(fwalk+fstart*2))/Float(fwalk)) * (sz - fz)
					yaw# = ATan2(sz-fz,sx-fx)
					walking = 1
				EndIf
				PositionEntity woman(w),xt,0,zt
				ScaleEntity woman(w),1.0,1.0,1.0
				RotateEntity woman(w),0,yaw+270,0
				If walking = 1 Then
					qanim = (Abs(m + i + frame) Mod 30) + 11
				Else
					qanim = (Abs(m + i + frame) Mod 410) + 381
				EndIf 
				SetAnimTime woman(w),qanim
				CameraProject camera,xt,0,zt
				If ProjectedZ()>0 And ProjectedX()>-100 And ProjectedX()<2020 And ProjectedY()>0 And ProjectedY()<1180 Then 
					If inview(xt,zt,camera) Then 
					renderworld3
					tris = tris + TrisRendered()
					If doshadows<>0 Then 
					If womans(w)=0 Then 
						womans(w) = CopyEntity(woman(w))
						ScaleEntity womans(w),1,0.001,1
						EntityAlpha womans(w),0.15
						EntityColor womans(w),0,0,0
						HideEntity womans(w)
					Else
						ShowEntity womans(w)
						HideEntity woman(w)
						PositionEntity womans(w),EntityX(woman(w)),EntityY(woman(w))+0.025,EntityZ(woman(w))
						RotateEntity womans(w),0,EntityYaw(woman(w)),0
						SetAnimTime womans(w),qanim
						For cx# = -0.25 To 0.25 Step 0.25
							For cz# = -0.25 To 0.25 Step 0.25
								PositionEntity womans(w),EntityX(woman(w))+cx,EntityY(woman(w))+0.025,EntityZ(woman(w))+cz
								renderworld3
								tris = tris + TrisRendered()
							Next
						Next	
						HideEntity womans(w)
					EndIf 
					EndIf
					EndIf 
				EndIf 
			EndIf 
			
			HideEntity woman(w)
		EndIf 
		If man(m)<>0 Then 
			ShowEntity man(m)
			
			sx# = Rnd(-50,50)
			sz# = Rnd(-50,50)
			fx# = sx + Rnd(-10,10)
			fz# = sz + Rnd(-10,10)
			inside = 1
			its = 0
			While(inside = 1)
			its = its + 1
			inside =  0
				For ent.ent = Each ent
					If (Abs(ent\x-sx)<5 And Abs(ent\z-sz)<5) Or (Abs(ent\x-fx)<5 And Abs(ent\z-fz)<5) Then inside = 1:Exit
				Next
				sx# = Rnd(-50,50)
				sz# = Rnd(-50,50)
				fx# = sx + Rnd(-10,10)
				fz# = sz + Rnd(-10,10)
				If its > 20 Then Exit
			Wend 
			If inside = 0 Then 
				walking = 0
				iframe = frame + i * 123 + m * 384
				fmax = 1200
				fstart = 200
				fwalk = 300
				If iframe Mod fmax < fstart Or iframe Mod fmax > fmax-fstart Then 
					xt# = sx
					zt# = sz
					;yaw# = Rnd(360)
					yaw# = (i + m ) Mod 360
				EndIf
				If iframe Mod fmax > fstart+fwalk And iframe Mod fmax < fstart+fwalk+fstart Then
					xt# = fx
					zt# = fz		
					;yaw# = Rnd(360)	
					yaw# = (i*5 + m*3 ) Mod 360
				EndIf 
				If iframe Mod fmax >=fstart And iframe Mod fmax<=fstart+fwalk Then
					xt# = sx + (Float((iframe Mod fmax)-fstart)/Float(fwalk)) * (fx - sx)
					zt# = sz + (Float((iframe Mod fmax)-fstart)/Float(fwalk)) * (fz - sz)
					yaw# = ATan2(fz-sz,fx-sx)
					walking = 1
				EndIf 
				If iframe Mod fmax >=fwalk+fstart*2 And iframe Mod fmax<=fmax - fstart Then
					xt# = fx + (Float((iframe Mod fmax)-(fwalk+fstart*2))/Float(fwalk)) * (sx - fx)
					zt# = fz + (Float((iframe Mod fmax)-(fwalk+fstart*2))/Float(fwalk)) * (sz - fz)
					yaw# = ATan2(sz-fz,sx-fx)
					walking = 1
				EndIf
				PositionEntity man(m),xt,0,zt
				ScaleEntity man(m),1.0,1.0,1.0
				RotateEntity man(m),0,yaw+270,0
				If walking = 1 Then
					qanim = (Abs(m + i + frame) Mod 30) + 11
				Else
					qanim = (Abs(m + i + frame) Mod 290) + 491
				EndIf 
				SetAnimTime man(m),qanim
				CameraProject camera,xt,0,zt
				If ProjectedZ()>0 And ProjectedX()>-100 And ProjectedX()<2020 And ProjectedY()>0 And ProjectedY()<1180 Then 
					If inview(xt,zt,camera)
					renderworld3
					tris = tris + TrisRendered()
					If doshadows<>0 Then 
					If mans(m)=0 Then 
						mans(m) = CopyEntity(man(m))
						ScaleEntity mans(m),1,0.001,1
						EntityAlpha mans(m),0.15
						EntityColor mans(m),0,0,0
						HideEntity mans(m)
					Else
						ShowEntity mans(m)
						HideEntity man(m)
						PositionEntity mans(m),EntityX(man(m)),EntityY(man(m))+0.025,EntityZ(man(m))
						RotateEntity mans(m),0,EntityYaw(man(m)),0
						SetAnimTime mans(m),qanim
						For cx# = -0.25 To 0.25 Step 0.25
							For cz# = -0.25 To 0.25 Step 0.25
								PositionEntity mans(m),EntityX(man(m))+cx,EntityY(man(m))+0.025,EntityZ(man(m))+cz
								renderworld3
								tris = tris + TrisRendered()
							Next
						Next	
						HideEntity mans(m)
					EndIf 
					EndIf 
					EndIf 
				EndIf 
			EndIf 
			HideEntity man(m)
		EndIf 
	Next
	EndIf 
	SeedRnd 123
	ShowEntity mesh(grassid)
	ShowEntity mesh(grassid+1)
	If dograss = 1 Then 
	ii = 0
		If grasspivot = 0 Then grasspivot = CreatePivot()
	For gx# = -32 To 47 Step 0.15
		x = Int(gx)
		If Abs(x) Mod 10 = 0 Then
;			LightColor light1,240-Rand(50),200-Rand(40),150-Rand(30)
;			LightColor light2,240-Rand(50),200-Rand(40),150-Rand(30)
;			LightColor light3,240-Rand(50),200-Rand(40),150-Rand(30)
;			LightColor light4,240-Rand(50),200-Rand(40),150-Rand(30)

			
				For c = 1 To CountChildren(lp)
					LightColor GetChild(lp,c),240/bbbb+Rand(50),200/bbbb+Rand(40),150/bbbb+Rand(30)
				Next

	
		
		EndIf
		For gz# = -90 To 20 Step 0.15
			z = Int(gz)
			If Abs(z) Mod 10 = 0 Then 
;				LightColor light1,240-Rand(50),200-Rand(40),150-Rand(30)
;				LightColor light2,240-Rand(50),200-Rand(40),150-Rand(30)
;				LightColor light3,240-Rand(50),200-Rand(40),150-Rand(30)
;				LightColor light4,240-Rand(50),200-Rand(40),150-Rand(30)
				
				For c = 1 To CountChildren(lp)
					LightColor GetChild(lp,c),240/bbbb+Rand(50),200/bbbb+Rand(40),150/bbbb+Rand(30)
				Next

	
			EndIf 
	

			inside = 0
			For ent.ent = Each ent
				If Abs(x-ent\x)<5 And Abs(z-ent\z)<5 Then inside = 1:Exit
			Next
			If Abs(x-13)<5 And Abs(z- -38)<5 Then inside = 0
			If inside = 0 Then 
			
			closeenough = 1
			ddr = Rand(0,100)
			dist# = EntityDistance(camera,grasspivot)
			PositionEntity grasspivot,gx,0,gz
			For i = 1 To 1
				ii = ii + 1
			xx# = Float(gx)
			zz# = Float(gz)

			yaw# = Rnd(360)
			sc# = Rnd(0.05,0.8)*scg
			en = mesh(grassid)
			en2 = mesh(grassid+1)
			ScaleEntity en,sc,sc,sc
			RotateEntity en,0,yaw,0
			PositionEntity en,xx,0,zz
			If doshadows<>0 And grass_s1<>0 Then 
				ShowEntity grass_s1
				PositionEntity grass_s1,xx,0.025,zz
				RotateEntity grass_s1,0,yaw,0
				ScaleEntity grass_s1,sc,0.001,sc
			EndIf 
			xx# = Float(gx) 
			zz# = Float(gz) 

			yaw# = Rnd(360)
			sc# = Rnd(0.05,0.8) *scg
			ii = ii + Abs(x)+Abs(z)
			ScaleEntity en,sc,sc,sc
			RotateEntity en,0,yaw,0
			PositionEntity en,xx,0,zz
			If doshadows<>0 And grass_s2<>0 Then 
				ShowEntity grass_s2
				PositionEntity grass_s2,xx,0.025,zz
				RotateEntity grass_s2,0,yaw,0
				ScaleEntity grass_s2,sc,0.001,sc
			EndIf 

			CameraProject camera,xx,0,zz
			If ProjectedZ()>0 And ProjectedX()>-100 And ProjectedX()<2020 And ProjectedY()>0 And ProjectedY()<1180 Then 
				closeenough = 0
				If dist < 15 Then closeenough = 1
				If doshadows<>0 And frame > 150 Then
					If grass_s1<>0 And grass_s2<>0 Then 
						If dist >15 Then 
							HideEntity grass_s1
							HideEntity grass_s2
						Else
							ShowEntity grass_s1
							ShowEntity grass_s2
						EndIf 
					EndIf 
				EndIf 
				If dist>=15 And dist < 25 Then
					If ddr>25 Then closeenough = 1
				EndIf 
				If dist>=25 And dist < 50 Then
					If ddr>50 Then closeenough = 1
				EndIf 
				If dist>=50 Then
					If ddr>66 Then closeenough = 1
				EndIf
				If dist>=75 Then
					If ddr>80 Then closeenough = 1
				EndIf
				If closeenough>0 Then 
					renderworld3
					tris = tris + TrisRendered()
				EndIf 
			EndIf 
			Next
			EndIf 
		Next
	Next
	EndIf 
;	LightColor light1,240,200,150
;	LightColor light2,240,200,150
;	LightColor light3,240,200,150
;	LightColor light4,240,200,150
	
	For c = 1 To CountChildren(lp)
		LightColor GetChild(lp,c),240/bbbb,200/bbbb,150/bbbb
	Next


	If grass_s1<>0 Then HideEntity grass_s1
	If grass_s2<>0 Then HideEntity grass_s2
	If doshadows<>0 Then 
		If grass_s1 = 0 Then 
			ScaleEntity mesh(grassid),1,1,1			
			PositionEntity mesh(grassid),0,0,0
			RotateEntity mesh(grassid),0,0,0
			grass_s1 = CopyEntity(mesh(grassid))
			EntityColor grass_s1,0,0,0
			EntityAlpha grass_s1,0.3
			ScaleEntity grass_s1,1,0.001,1
			HideEntity grass_s1
		EndIf
		If grass_s2 = 0 Then 
			ScaleEntity mesh(grassid+1),1,1,1
			PositionEntity mesh(grassid+1),0,0,0
			RotateEntity mesh(grassid+1),0,0,0
			grass_s2 = CopyEntity(mesh(grassid+1))
			EntityColor grass_s2,0,0,0
			EntityAlpha grass_s2,0.3
			ScaleEntity grass_s2,1,0.001,1
			HideEntity grass_s2
			
		EndIf 
	EndIf 

	HideEntity mesh(grassid)
	HideEntity mesh(grassid+1)
	If zonepivot=0 Then zonepivot = CreatePivot()
	For zonex# = -128 * 20 To 128 * 20 Step 128
	For zonez# = -128 * 20 To 128 * 20 Step 128
		PositionEntity zonepivot,zonex,EntityY(camera),zonez
		If EntityDistance(zonepivot,camera)>512 Then Goto skipzone
	If doskeletons = 1 Then 
		SeedRnd 48737 + Abs(zonex) + Abs(zonez)
		rrr = Rand(4,10)
		For i = 1 To rrr
			xx0# = zonex+Rnd(-64,64)
			zz0# = zonez+Rnd(-64,64)
			qqq = Rand(1,1)
			xx# = xx0
			zz# = zz0
			For j = 1 To qqq
				wizardoff = Rand(0,1)
				qq = wizardid+wizardoff
				en = mesh(qq)
				ShowEntity en
				PositionEntity en,xx,ym(xx,zz),zz
				ScaleEntity en,1,1,1
				
				qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 287) + 222
				If wizardoff = 1 Then 
					qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 205) + 11
				EndIf 
				RotateEntity en,0,Rnd(360),0
				qtype = Rand(1,10)
				qdx# = 0
				qdz# = 0
				If qtype >3 And qtype < 11 Then
					qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 28) + 12
					If wizardoff = 1 Then 
						qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 40) + 221
					EndIf 
					EntityBlend en,1
					For qa2# = -3.0 To 0.0 Step 0.5
					qaa# = Float(frame + i*123 + j + zonex + zonez)*0.25+qa2
					qdx# = -30.0 * Sin(qaa#)
					qdz# = -20.0 * Cos(qaa#)
					AlignToVector en,qdx,0,qdz,3,1
					TurnEntity en,0,-90,0
					If wizardoff = 1 Then TurnEntity en,0,180,0
					PositionEntity en,qdx+xx,ym(qdx+xx,qdz+zz),qdz+zz
					SetAnimTime en,qanim
					If EntityDistance(camera,en)<384 Then 
						CameraProject camera,xx+qdx,ym(xx+qdx,zz+qdz),zz+qdz
						If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
							EntityAlpha en,0.15+qa2*0.03
							If wizardoff = 1 Then EntityAlpha en,0.075+qa2*0.015
							If qtype<=3 Then EntityAlpha en,0
							renderworld3
							
						EndIf 
					EndIf 
					Next ;qa2
					EntityBlend en,1
					EntityAlpha en,1
				EndIf 
				SetAnimTime en,qanim
				If EntityDistance(camera,en)<384 Then 
					CameraProject camera,xx+qdx,ym(xx+qdx,zz+qdz),zz+qdz
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						
						EntityAlpha en,0.45 + 0.35 * Sin(Float(frame+i*123)*0.333)
						If wizardoff = 1 Or qtype <=3 Then EntityAlpha en,1
						renderworld3
						doanimshadow(en,qanim)
					EndIf 
				EndIf 
				HideEntity en
		
			Next

		
		Next
		SeedRnd 13411 + Abs(zonex)+ Abs(zonez)
		rrr = Rand(25,100)
		For i = 1 To rrr
			xx0# = zonex+Rnd(-64,64)
			zz0# = zonez+Rnd(-64,64)
			qqq = Rand(1,1)
			xx# = xx0
			zz# = zz0
			For j = 1 To qqq
				qq = Rand(0,1)+ warriorid
				en = mesh(qq)
				ShowEntity en
				PositionEntity en,xx,ym(xx,zz),zz
				ScaleEntity en,1,1,1
				qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 885) + 11
				RotateEntity en,0,Rnd(360),0
				qtype = Rand(1,10)
				qdx# = 0
				qdz# = 0
				If qtype >3 Then
					qanim = (Abs(frame + i*123 + j + zonex + zonez) Mod 238) + 901
					qdx# = 30.0 * Sin(Float(frame + i*123 + j + zonex + zonez)*0.1)
					qdz# = 20.0 * Cos(Float(frame + i*123 + j + zonex + zonez)*0.1)
					AlignToVector en,qdx,0,qdz,3,1
					TurnEntity en,0,90,0
					PositionEntity en,qdx+xx,ym(qdx+xx,qdz+zz),qdz+zz
				EndIf 
				SetAnimTime en,qanim
				If EntityDistance(camera,en)<384 Then 
					CameraProject camera,xx+qdx,ym(xx+qdx,zz+qdz),zz+qdz
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						renderworld3
						doanimshadow(en,qanim)
					EndIf 
				EndIf 
				HideEntity en
		
			Next

		Next
	EndIf 
	If dotrees = 1 And frame >= renderfrom And frame>=startframe Then
		dda = 60
		;If frame >1490 And frame < 2000 Then dda = 30 
		If grasson = 0 Then dda = 0 
		grass = mesh(grassid)
		ShowEntity mesh(grassid)
		ScaleEntity grass,scx*0.2,scy*0.2,scz*0.2
		grasspivot = CreatePivot()
		mmn = 0
		j = 0
		jx# = 0
		jz# = 0
		yaw# = 0
		x = 0
		z = 0
		xx4# = 2.5
		For i = 1 To dda
			x = x + 3
			If x > 80 Then x = -80
			xx4# = Rnd(0.2,2.5)
			If xx4 > 2.5 Then xx4 = 0.5
			ScaleEntity grass,scx*0.2*xx4,scy*0.2*xx4,scz*0.2*xx4

		For x3# = -9  To 9 Step 0.5
			If Abs(x) Mod 10 = 0 Then 
				
			EndIf 
			yaw# = yaw# + 33.0
			z = z + 3
			If z > 80 Then z = -80
			For z3# = -9 To 9 Step 0.5
				If Abs(z) Mod 10 = 0 Then 
				
				
				EndIf 
				r3 = z3*z3 + x3*x3

				j = j + 1
				;If debugging = 0 Or Rand(0,1000)<125
				jx# = jx# + 0.2
				If jx > 2.0 Then jx = -2
				jz# = jz# + 0.2
				If jz > 2.0 Then jz = -2
				xt# = Float(zonex+x+x3)+jx#+Rnd(-2,2)
				zt# = Float(zonez+z+z3)+jz#+Rnd(-2,2)
				yt# = ym(xt,zt)
				pitch# = 0
				
				PositionEntity grass,xt,yt,zt
				RotateEntity grass,pitch,yaw,0
				scx# =1; Rnd(0.5,1.5)*0.3
				scy# = 1;Rnd(0.75,2.25)*0.25
				scz# = 1;Rnd(0.5,1.5)*0.3
				PositionEntity grasspivot,xt,yt,zt
				If EntityDistance(camera,grasspivot)<100 Or (frame > 250 And frame < 1600) Or (frame > 2300) Then 
					CameraProject camera,xt,yt,zt
					If ProjectedZ()>-100 And ProjectedY()>-100 And ProjectedY()<1180 And ProjectedX()>-100 And ProjectedX()<2020 Then 
						If r3 < 64 Then 
							If frame > 280 And frame < 1490 Then
							Else
								If EntityDistance(camera,grasspivot)>600 Then
								Else
									;mmn = 0;
									;If frame > 1990 Or mmn Mod 4 = 0 Then 
										renderworld3
										If EntityDistance(camera,grasspivot)<40 Then doshadow(grass)
									;EndIf 
								EndIf
							EndIf 
						EndIf 
					EndIf 
				EndIf 
			Next
			If KeyHit(1) Then End
			If Abs(MilliSecs()-grasstime)>500 Then Delay 5:grasstime = MilliSecs()
		Next
		Next
		FreeEntity grasspivot
		HideEntity mesh(grassid)
		SeedRnd 883411 + Abs(zonex)+ Abs(zonez)
		For i = 1 To 189
			xx0# = zonex+Rnd(-64,64)
			zz0# = zonez+Rnd(-64,64)
			qqq = Rand(0,3)
			
			For j = 1 To qqq
				If KeyHit(1) Then End 
				If Abs(MilliSecs()-grasstime)>500 Then Delay 5:grasstime = MilliSecs()
			qq = 3;Rand(0,1)+ rockid
				xx# = xx0 + Rnd(-30,30)
				zz# = zz0 + Rnd(-30,30)
				en = mesh(qq)
				ShowEntity en
				PositionEntity en,xx,ym(xx,zz),zz
				RotateEntity en,0,Rnd(360),0
				meshsc(qq)=0.03
				xx4# = Rnd(0.8,1.4)
				ScaleEntity en,meshsc(qq)*xx4,meshsc(qq)*xx4,meshsc(qq)*xx4
				If EntityDistance(camera,en)<600 Then 
					CameraProject camera,xx,ym(xx,zz),zz
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						If frame > 280 And frame < 1490 Then 
						Else
						If EntityDistance(en,camera)<250 Then
						 	renderworld3
						Else
							If (i+j) Mod 3 = 0 Then renderworld3
						EndIf 
						
						odoshadows = doshadows
						If EntityDistance(camera,en)<20 Or frame > 1990 Then 
						doshadows = 1
					
						doshadow(en)
						doshadows = odoshadows
						EndIf 
						EndIf 
					EndIf 
				EndIf 
				HideEntity en
			en = mesh(grassid)
			ShowEntity en
			For j = 1 To 3
				xx1# = xx + Rnd(-3,3)
				zz1# = zz + Rnd(-3,3)
				PositionEntity en,xx1,ym(xx1,zz1),zz1
				RotateEntity en,0,Rand(360),0
				sc# = Rnd(0.5,1.5)*0.2
				ScaleEntity en,sc,sc,sc
				If EntityDistance(camera,en)<600 Then 
					CameraProject camera,xx1,ym(xx1,zz1),zz1
						If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						If frame > 280 And frame < 1490 Then
						Else
						renderworld3
						If EntityDistance(camera,en)<50 Or frame > 1990 Then 
						doshadow(en)
						EndIf 
						EndIf
					EndIf 
				EndIf 
			Next
			HideEntity en

			Next
		Next

	EndIf 
	If dorocks = 1 Then 
		SeedRnd 3411 ; Abs(zonex)+ Abs(zonez)
		For i = 1 To 600
			xx0# = zonex+Rnd(-64,64)
			zz0# = zonez+Rnd(-64,64)
			qqq = Rand(3,6)
			
			For j = 1 To qqq
				qq = Rand(0,1)+ rockid
				xx# = xx0 + Rnd(-3,3)
				zz# = zz0 + Rnd(-3,3)
				en = mesh(qq)
				ShowEntity en
				PositionEntity en,xx,ym(xx,zz),zz
				RotateEntity en,0,Rnd(360),0
				meshsc(qq)=0.008+Rnd(-0.004,0.003)
				ScaleEntity en,meshsc(qq),meshsc(qq),meshsc(qq)
				If EntityDistance(camera,en)<256 Then 
					CameraProject camera,xx,ym(xx,zz),zz
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						renderworld3
			;			doshadow(en)
					EndIf 
				EndIf 
				HideEntity en
				en = mesh(grassid)
				ShowEntity en
				For j = 1 To 16
					xx1# = xx + Rnd(-2,2)
					zz1# = zz + Rnd(-2,2)
					PositionEntity en,xx1,ym(xx1,zz1),zz1
					RotateEntity en,0,Rand(360),0
					sc# = Rnd(0.5,1.5)*0.2
					ScaleEntity en,sc,sc,sc
					If EntityDistance(camera,en)<256 Then 
						CameraProject camera,xx1,ym(xx1,zz1),zz1
							If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
							renderworld3
							doshadow(en)
						EndIf 
					EndIf 
				Next
				HideEntity en
			Next
		Next
	EndIf
	If doplain = 1 Then
		SeedRnd 3831 + Abs(zonex)+Abs(zonez)
		If gsp = 0 Then 
			gsp = CopyMesh(mesh(rockid))
			If gsptex = 0 Then gsptex = LoadTexture("maptex.jpg",1)
			ScaleMesh gsp,1,0.025,1
			EntityTexture gsp,gsptex
		EndIf 
		For i = 1 To 15
			xx0# = zonex + Rnd(-64,64)
			zz0# = zonez + Rnd(-64,64)
			qqq = Rand(3,8)
			For j = 1 To qqq
				xx = xx0 + Rnd(-4,4)
				zz = zz0 + Rnd(-4,4)
				en = gsp
				ShowEntity en
				PositionEntity en,xx,ym(xx,zz),zz
				RotateEntity en,0,Rand(360),0
				sc# = Rnd(1.0,4.0)*0.025
				ScaleEntity en,sc,0.1,sc
				If EntityDistance(camera,en)<256 Then 
					CameraProject camera,xx,ym(xx,zz),zz
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						renderworld3
						;doshadow(en)
					EndIf 
				EndIf 
				HideEntity en
				en = mesh(grassid)
				ShowEntity en
				For j = 1 To 25
					xx1# = xx + Rnd(-2,2)
					zz1# = zz + Rnd(-2,2)
					PositionEntity en,xx1,ym(xx1,zz1),zz1
					RotateEntity en,0,Rand(360),0
					sc# = Rnd(0.5,1.5)*0.2
					ScaleEntity en,sc,sc,sc
					If EntityDistance(camera,en)<256 Then 
						CameraProject camera,xx1,ym(xx1,zz1),zz1
							If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
							renderworld3
							doshadow(en)
						EndIf 
					EndIf 
				Next
				HideEntity en
			Next
		Next
	EndIf 
	If dostatues = 1 Then 
		SeedRnd 347831 + Abs(zonex)+Abs(zonez)
		For i = 1 To 8
			qq = Rand(0,15)+ statueid
			
			en = mesh(qq)
			ShowEntity en
			xx# = Rnd(-64,64)+zonex
			zz# = Rnd(-64,64)+zonez
			PositionEntity en,xx,ym(xx,zz),zz
			RotateEntity en,0,Rnd(360),0
			meshsc(qq)=1.0
			ScaleEntity en,meshsc(qq),meshsc(qq),meshsc(qq)
			If EntityDistance(camera,en)<256 Then 
				CameraProject camera,xx,ym(xx,zz),zz
				If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
					renderworld3
				EndIf 
			EndIf 
			HideEntity en
		Next
	EndIf 
	SeedRnd 38231 ; Abs(zonex)+Abs(zonez)
	If dobushes = 1 Then 
	If grasspivot = 0 Then grasspivot = CreatePivot()
	For i = 1 To 2000
		xx# = Rnd(-64,64)+zonex
		zz# = Rnd(-64,64)+zonez
		qqq = Rand(2,10)
		PositionEntity grasspivot,xx,EntityY(camera),zz
		If EntityDistance(grasspivot,camera) > 250 Then qqq = qqq / 3
		For j = 1 To qqq
			xx = xx + Rnd(-10,10)
			zz = zz + Rnd(-10,10)
			qq = Rand(0,11)+bushid
			en = mesh(qq)
			ShowEntity en
			PositionEntity en,xx,ym(xx,zz),zz
			RotateEntity en,0,Rnd(360),0
			meshsc(qq)=0.65*0.75
			ScaleEntity en,meshsc(qq),meshsc(qq),meshsc(qq)
			If EntityDistance(camera,en)<512 Then 
				CameraProject camera,xx,ym(xx,zz),zz
				If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
					renderworld3
			;		doshadow(en)
				EndIf 
			EndIf
			HideEntity en
			en = mesh(grassid)
			ShowEntity en
			For j = 1 To 25
				xx1# = xx + Rnd(-2,2)
				zz1# = zz + Rnd(-2,2)
				PositionEntity en,xx1,ym(xx1,zz1),zz1
				RotateEntity en,0,Rand(360),0
				sc# = Rnd(0.5,1.5)*0.2
				ScaleEntity en,sc,sc,sc
				If EntityDistance(camera,en)<512 Then 
					CameraProject camera,xx1,ym(xx1,zz1),zz1
					If ProjectedZ()>0 And ProjectedX()>-200 And ProjectedX()<2120 And ProjectedY()>-200 And ProjectedY()<1200 Then
						renderworld3
						doshadow(en)
					EndIf 
				EndIf 
			Next
			HideEntity en
		Next
	Next
	EndIf 
	.skipzone
	Next ;zonez
	Next ;zonex
	.skipzone2
	SeedRnd 48383
	If dotrees = 2 Then 
	For i = 1 To 4000
		qq = 3
		en = mesh(qq)
		ShowEntity en
		xx# = Rnd(-1280,1280)
		zz# = Rnd(-1280,1280)
		PositionEntity en,xx,ym(xx,zz),zz
		RotateEntity en,0,Rnd(360),0
		rr# = Rnd(0.8,1.2)*10.0
		gg# = Rnd(0.7,1.4)*10.0
		bb# = 0.65
		If qq = 0 Then bb = 4.5
		If qq = 3 Then bb = 0.075
		ScaleEntity en,0.022*rr*bb,0.022*gg*bb,0.022*rr*bb
		CameraProject camera,xx,ym(xx,zz),zz
		If ProjectedZ()>0 And ProjectedX()>-100 And ProjectedX()<2020 And ProjectedY()>0 And ProjectedY()<1180 Then 
			renderworld3
			doshadow(en)
			;tris = tris + TrisRendered()
			;If doshadows<>0 Then
			;	HideEntity en
			;	sh = CopyEntity(en)
			;	tex = CreateTexture(2,2,1)
			;	SetBuffer TextureBuffer(tex)
			;	Color 0,0,0
			;	Rect 0,0,2,2,1
			;	SetBuffer BackBuffer()
			;	EntityTexture sh,tex
			;	Color 255,255,255
			;	PositionEntity sh,xx,0+0.025+ym(xx,zz),zz
			;	RotateEntity sh,0,EntityYaw(en),0
			;	ScaleEntity sh,0.022*rr*bb,0.001,0.022*rr*bb
			;	EntityAlpha sh,0.1
			;	EntityColor sh,0,0,0
			;	renderworld3
			;	tris = tris + TrisRendered()
			;	FreeEntity sh
			;	FreeTexture tex
			;EndIf 
		EndIf 
		HideEntity en
	Next
	EndIf 

	If cammode = 0 Then 
		If mesh(meshindex)<>0 Then 
			ShowEntity mesh(meshindex)
			en = mesh(meshindex)
			PositionEntity en,ex,ey,ez
			RotateEntity en,0,0,0
			ScaleEntity en,meshsc(meshindex),meshsc(meshindex),meshsc(meshindex)
			renderworld3 
			tris = tris + TrisRendered()
			If Abs(MilliSecs()) Mod 500<250 Then
				EntityBlend en,3
				EntityAlpha en,0.4
				renderworld3
				EntityBlend en,1
				EntityAlpha en,1			
			EndIf
			tris = tris + TrisRendered()

			HideEntity mesh(meshindex)
 
		EndIf 
	EndIf 
	EndIf ;startframe
	ShowEntity gplane
	ShowEntity cube
	;rendering
	If record<>0 And frame Mod 2 = 0 And frame>=startframe Then
		sframe$ = Str(frame/2)
		While Len(sframe)<6
			sframe = "0" + sframe
		Wend 
		If frame >= renderfrom Then SaveBuffer BackBuffer(),"..\screenshots\of_"+sframe+".bmp"
		If frame >= maxframe Then End 
	EndIf 
	;data
	If frame < startframe Or frame < renderfrom Then Cls
		If font = 0 Then font = LoadFont("Arial",30)
	If font<>0 Then SetFont font
	;Text 0,0,"X:"+ex+ " Y:"+ey + " Z:"+ez
	;Text 0,40,"ID:"+meshindex
	;Text 0,80,"tris:"+tris
	Text 0,0,"F:"+frame+" FTIME:"+dtime
	Text 0,40,CurrentTime()
	If record = 0 Or (record<>0 And frame Mod 2 = 0) Then 
	If skipframe > 0 Then
		If frame = startframe + 1 Then Flip True: Delay 2
	Else
	If frame < startframe Then 
		Flip False
	Else
		Flip True
		Delay 2
	EndIf 

	EndIf
	EndIf  
	dtime = Abs(MilliSecs()-ftime)
	ftime = MilliSecs()
	If dtime < 20  And frame >=startframe And record = 0 Then Delay 20 - dtime
	EndIf ;frame mod 4
Until KeyHit(1)
	;savedata()
End



Function loaddata(filename$="dump.txt")
For ent.ent = Each ent
	If ent\shade<>0 Then FreeEntity ent\shade
Next
Delete Each ent
infile = ReadFile(filename)
If infile<>0 Then 
	While(Not(Eof(infile)))
		id = Int(ReadLine(infile))
		xx# = Float(ReadLine(infile))
		yy# = Float(ReadLine(infile))
		zz# = Float(ReadLine(infile))
		yawyaw# = Float(ReadLine(infile))
		scx# = Float(ReadLine(infile))
		scy# = Float(ReadLine(infile))
		scz# = Float(ReadLine(infile))
		ent.ent = New ent
		ent\index = id
		ent\x = xx
		ent\y = yy
		ent\z = zz
		ent\yaw = yawyaw
		ent\scx = scx
		ent\scy = scy
		ent\scz = scz
		ent\shade = 0		
	Wend
	CloseFile infile
EndIf 


End Function 

Function savedata(filename$="dump.txt")
	outfile = WriteFile(filename)
	For ent.ent = Each ent
		WriteLine outfile,ent\index
		WriteLine outfile,ent\x
		WriteLine outfile,ent\y
		WriteLine outfile,ent\z
		WriteLine outfile,ent\yaw
		WriteLine outfile,ent\scx
		WriteLine outfile,ent\scy
		WriteLine outfile,ent\scz
	Next
	CloseFile outfile
End Function 

Function loadmeshes()
	id = 0
	ClearTextureFilters
	dir = ReadDir("..\environment\extras\")
	Repeat
		dirfile$ = NextFile(dir)
		If dirfile="" Then Exit
		If Right(dirfile,3) = "tga" Or Right(dirfile,3) = "png" Then 
			TextureFilter dirfile,1+2
		EndIf 
	Forever
	CloseDir dir
	For j = 1 To 4
		mesh(id) = LoadMesh("..\environment\extras\tree0"+j+".b3d")
		HideEntity mesh(id)
		id = id + 1
	Next
	TextureFilter "elmleaves_DF.tga",1+2
	mesh(id) = LoadMesh("..\environment\elm.b3d")
	id = id + 1
	bushid = id
	For i = 1 To 12
		mesh(id) = LoadMesh("..\environment\extras\bush0"+i+".b3d")
		id = id + 1
	Next
	mesh(id) = LoadMesh("..\environment\rivergrass.b3d")
	grassid = id
	id = id + 1
	mesh(id) = LoadMesh("..\environment\grasstall.b3d")
	id = id + 1
	medpath$ = "C:\mattiesgames\old\conflicttmp\tools\3dmodels\fantasycavern\"
	
;	medpath$ = "C:\secondharddrive\gfx\Arteria3dMedievalModelsAndTextures\"
	dir = ReadDir(medpath)
	If dir<>0 Then 
;		i = 0
;		j = 0
;		k = 0
;		ii = 0
		Repeat
			medfile$ = NextFile(dir)
			If medfile = "" Then Exit
			If Right(medfile,2) = ".x" Then
				If Left(medfile,6) = "statue"; Or Left(medfile,6) = "column" Then
					mesh(id) = LoadMesh(medpath+medfile)
					meshsc(id) = 1.0
					EntityShininess mesh(id),0
					If statueid = 0 Then statueid = id
					id = id + 1
				EndIf 
			EndIf 
;			If Right(medfile,3) = "b3d" And Left(medfile,4) = "fenc" Then
;				ii = ii + 1
;				If ii < 6 Then 
;				mesh(id) = LoadMesh(medpath+medfile)
;				meshsc(id) = 0.022
;				EntityShininess mesh(id),0
;				id = id + 1
;			EndIf 
;		EndIf 
;		If Right(medfile,3) = "b3d" And Left(medfile,8) = "medhouse" Then
;			i = i + 1
;			mesh(id) = LoadMesh(medpath+medfile)
;			EntityShininess mesh(id),0
;			meshsc(id) = 0.022
;			id = id + 1
;		EndIf 
;		If Right(medfile,3) = "b3d" And Left(medfile,12) = "keep_wall1.b" Then
;			j = j + 1
;			If j < 4 Then 
;				mesh(id) = LoadMesh(medpath+medfile)
;				EntityShininess mesh(id),0
;				meshsc(id) = 0.022
;				id = id + 1
;			EndIf 
;		EndIf 
;		If Right(medfile,2) = ".x" And Instr(Lower(medfile),"stall")>0 Then
;			k = k + 1
;			If k < 6 Then 
;				mesh(id) = LoadMesh(medpath+medfile)
;				meshsc(id) = 0.022
;				EntityShininess mesh(id),0
;				id = id + 1
;			EndIf 
;		EndIf 
	Forever
	CloseDir dir
EndIf 
;TextureFilter "tree1_branch.png",1+4
;mesh(id) = LoadMesh(medpath+"VillageTree.b3d")
;EntityShininess mesh(id),0
;villagetree = id
;id = id + 1

rockid = id
mesh(id) = LoadMesh("rock01.b3d")
EntityShininess mesh(id),0
id = id + 1
mesh(id) = LoadMesh("rock02.b3d")
EntityShininess mesh(id),0
id = id + 1

warriorid = id
mesh(id) = LoadAnimMesh("..\skeletonwarrior\warrior1.b3d")
id = id + 1
mesh(id) = LoadAnimMesh("..\skeletonwarrior\warrior2.b3d")
id = id + 1
wizardid = id
mesh(id) = LoadAnimMesh("..\darkmage\darkmage.b3d")
id = id + 1
mesh(id) = LoadAnimMesh("C:\mattiesgames\old\conflicttmp\tools\3dmodels\characters\special\reaper\b3dgrim.b3d")
id = id + 1

For i = 0 To id
	If mesh(i)<>0 Then HideEntity mesh(i)
Next

;m = 0
;w = 0
;For i = 1 To 20
;	If i Mod 2 = 0 Then
;		m = m + 1
;		man(m) = LoadAnimMesh("..\townsfolk\p"+Str(i)+".b3d")
;		HideEntity man(m)
;		ScaleEntity man(m),1.0,1.0,1.0
;	Else
;		w = w + 1
;		woman(w) = LoadAnimMesh("..\townsfolk\p"+Str(i)+".b3d")
;		HideEntity woman(w)
;		ScaleEntity woman(w),1.0,1.0,1.0
;	EndIf 
;	If i = 1 Then
;		horse(i) = LoadAnimMesh("..\horse\horse.b3d")
;		HideEntity horse(i)
;		ScaleEntity horse(i),1,1,1
;;	EndIf 
;Next

End Function 

Function shadows(en)
	shade = CreateMesh()
	shadesurf = CreateSurface(shade)
	meshx# = EntityX(en)
	meshy# = EntityY(en)
	meshz# = EntityZ(en)
	yaw# = EntityYaw(en)
	RotateEntity en,0,0,0
	PositionEntity en,0,0,0
	ScaleEntity en,1,1,1
	mm = CopyMesh(en)
	RotateMesh mm,0,yaw,0
	
	aa# = 0.5
	For s = 1 To CountSurfaces(mm)
		surf = GetSurface(mm,s)
		For t = 0 To CountTriangles(surf) - 1
			v0 = TriangleVertex(surf,t,0)
			v1 = TriangleVertex(surf,t,1)
			v2 = TriangleVertex(surf,t,2)
			v0x# = VertexX(surf,v0)
			v0y# = VertexY(surf,v0)
			v0z# = VertexZ(surf,v0)
			TFormPoint v0x,v0y,v0z,en,0
			v00 = AddVertex( shadesurf,TFormedX()-(TFormedY())*aa ,0.0,TFormedZ()-(TFormedY())*aa)
			v1x# = VertexX(surf,v1)
			v1y# = VertexY(surf,v1)
			v1z# = VertexZ(surf,v1)
			TFormPoint v1x,v1y,v1z,en,0
			v11 = AddVertex (shadesurf,TFormedX()-(TFormedY())*aa ,0.0,TFormedZ()-(TFormedY())*aa)
			v2x# = VertexX(surf,v2)
			v2y# = VertexY(surf,v2)
			v2z# = VertexZ(surf,v2)
			TFormPoint v2x,v2y,v2z,en,0
			v22 = AddVertex (shadesurf,TFormedX()-(TFormedY())*aa ,0.0,TFormedZ()-(TFormedY())*aa)
			AddTriangle shadesurf,v00,v11,v22
		Next
	Next
	FreeEntity mm
	ScaleEntity en,0.022,0.022,0.022
	EntityFX shade,1+16
	EntityShininess shade,0
	EntityColor shade,0,0,0
	EntityAlpha shade,1
	PositionEntity en,meshx,meshy,meshz
	RotateEntity en,0,yaw,0

	Return shade
End Function 

Function inview(x#,z#,camera)
Return True ;not working as desired.
sx# = EntityX(camera)
sz# = EntityZ(camera)
d1# = Sqr((x-sx)*(x-sx)+(z-sz)*(z-sz))
If d1 = 0 Then Return False
d1dx# = (x - sx)/d1
d1dz# = (z - sz)/d1
For ent.ent = Each ent
	cx# = ent\x
	cz# = ent\z
	d2# = Sqr((sx-cx)*(sx-cx)+(sz-cz)*(sz-cz))
	If d2 < d1 Then
		If d2 = 0 Then Return False
		d2dx# = (cx-sx)/d2
		d2dz# = (cz-sz)/d2
		dot# = Abs(d1dx*d2dx + d1dz*d2dz)
		If dot > 0.95 Then Return False
	EndIf 
Next
Return True
End Function 

Function ym#(xt#,zt#)
	Return TerrainY(map,xt,0,zt)
End Function 

Function doshadow(en)
If EntityDistance(en,camera)>145 Then Return 
EntityAlpha en,0.0
If EntityDistance(en,camera)>50 Then 
shade = CreateCylinder(8,1,en)
Else
shade = CopyEntity(en,en)
EndIf
ShowEntity shade
ScaleEntity shade,1,0.001,1
PositionEntity shade,0,0.1,0,False
RotateEntity shade,0,0,0,False
EntityColor shade,0,0,0
EntityAlpha shade,0.25
camx# = EntityX(camera)
camy# = EntityY(camera)
camz# = EntityZ(camera)
If doshadows >= 1 Then 
If doshadows = 1 Or doshadows = 3 Then 
	EntityAlpha shade,0.65
	If doshadows = 3 Then EntityAlpha shade,0.2
	renderworld3
Else
For cx# = -0.25 To 0.25 Step 0.25
	For cz# = -0.25 To 0.25 Step 0.25
		PositionEntity camera,camx+cx,camy,camz+cz,True
		renderworld3	
	Next
Next
EndIf 
EndIf 
PositionEntity camera,camx,camy,camz
FreeEntity shade
EntityAlpha en,1.0

End Function 

Function doanimshadow(en,qanim)
EntityAlpha en,0.0
shade = CopyEntity(en,en)
ShowEntity shade
ScaleEntity shade,1,0.001,1
PositionEntity shade,0,0,0,False
RotateEntity shade,0,0,0,False
EntityColor shade,0,0,0
EntityAlpha shade,0.15
camx# = EntityX(camera)
camy# = EntityY(camera)
camz# = EntityZ(camera)
SetAnimTime shade,qanim
If doshadows >= 1 Then 
If doshadows = 1 Then 
	EntityAlpha shade,0.65
	renderworld3
Else
For cx# = -0.25 To 0.25 Step 0.25
	For cz# = -0.25 To 0.25 Step 0.25
		PositionEntity camera,camx+cx,camy,camz+cz,True
		renderworld3	
	Next
Next
EndIf 
EndIf 
PositionEntity camera,camx,camy,camz
FreeEntity shade
EntityAlpha en,1.0

End Function 

Function renderworld3()
If frame < renderfrom Then Return
RenderWorld
End Function 

Matty

This is a silent video of a sci fi setting rendered in Blitz3d, but not in realtime.

YouTube Link:


The video took about 6 hours to render out as individual frames on my old 2014 PC.

There is a glitch in the video, the grass shifts about at times, I know what it is - I mucked up with some random number generation in my code that meant the grass gets 'out of sync' with the landscape at times. Easy fix, but I wasn't willing to wait another 6 hours to render it all out again without that graphical error.

The character models and buildings are from 3drt.com.

The vegetation is from a company that I'm not sure is still around - bought it so long ago.

The other components are from various sources collected over many years.

thanks,
from Matt.