I have been trying to make a 3D mining game, and figure the best place to start is with some deformable terrain tests.
I've been all over the forums, and it seems to be a common theme that ppl believe that outside of using a 3D modelling program, a player selecting the face of an object in game (from within DBPro) and thus cannot have its texture altered.
Is this true? Are there no plugins whatsoever that could provide this sort of support? Because I want to create a Dungeon keeper style game where the player literally moulds the very ground into a \'Treasury\' designated area etc., And does so by painting an area. I could program this using a grid and stuff, but then whats the point of all these 3D maths command in DB.
Halp. Thnx in advance.
Rem Project: DEFORMABLE TERRAIN
Rem Created: Tuesday, December 22, 2009
//load object \"C:\\Program Files\\The Game Creators\\Dark Basic Professional\\Projects\\Experiment\\Media\\coob.X\", 1
//load image \"C:\\Program Files\\The Game Creators\\Dark Basic Professional\\Projects\\DEFORMABLE TERRAIN\\Media\\EarthRough.jpg\", 1
//load image \"C:\\Program Files\\The Game Creators\\Dark Basic Professional\\Projects\\DEFORMABLE TERRAIN\\Media\\DiG_surface_2.png\", 2
//load vars
//dim KP(10,2)
//CODE THAT DOES THE SUBTRACTION
//preform csg difference 1,2
make object cube 1, 1
position object 1, 0, 0, 0
//texture object 1, 1
color object 1, RGB(0,255,128)
scale object 1, 10000, 10000, 10000
make object cube 2, 50
position object 2, 0, 0, -40
color object 2, RGB(255,87,255)
position camera 0, 0, 0, -200
make light 1
set spot light 1, 60, 270
color light 1, RGB(255,255,87)
position light 1, 0, -100, -200
point light 1, 0, 0, 0
//1 is tunnel designation
//2 is terrain
Do
if spacekey()=1 and csg=0 //the \'and csg=0\' part is not necessary its just debug code and can be removed
perform csg difference 1,2
delete object 2
csg=1 //debug
endif
control camera using arrowkeys 0,1,1
Sync
loop