Posted: 29th May 2003 3:28
hi...
i made that cause...............i was not knowing what to do ^^
pretty fun

move with arrow key.....
and the controle are....with the camera i mean ..like in mario 64...it depend of the camera.....

there is some useless code.....in it cause it made from my .....mirror demo....sorry..i made that in 2 hours....then

+ Code Snippet
sync on
sync rate 0
hide mouse
backdrop on : color backdrop rgb(150,100,0)
create bitmap 1,1024,1024
ink rgb(100,0,0),0
box 0,0,512,512
ink rgb(0,100,0),0
box 512,0,1023,512
ink rgb(0,0,100),0
box 0,512,512,1023
ink rgb(0,0,0),0
box 512,512,1023,1023
get image 1,0,0,1024,1024
delete bitmap 1

make matrix 1,5000,5000,20,20
prepare matrix texture 1,1,1,1
fill matrix 1,0,0


rem ------------------------------------------------
rem corps
make object box 1,100,200,100
rem bras
make object box 2,30,100,30
make mesh from object 1,2
delete object 2
rem jambe
make object box 2,30,100,30
make mesh from object 2,2
delete object 2
rem point de rotation
make object plain 2,1,1
make mesh from object 3,2
delete object 2

rem faire un object pour le corps....pour collision
make mesh from object 4,1
make object 2,4,0
delete mesh 4

rem adder les bras/jambe au perso
make object 10,2,0
for i=1 to 4
   add limb 1,i,1
next i
rem adder les jambes au perso
for i=1 to 4
   add limb 1,i+4,2
next i
rem adder les point de rotation au perso
for i=9 to 16
   add limb 1,i,3
next i
rem fixer les bras/jambe aux point de rotation
for i=1 to 8
   link limb 1,i,i+8
next i
rem fixer les point de rotation aux.....membre ki les font bouger..
for i=1 to 4
   link limb 1,8+(2*i),(i*2)-1
next i
rem offsetter les bras/jambe de leur point de rotation
for i=1 to 8
   offset limb 1,i,0,-50,0
next i
rem offset les bras/jambe ...du bas ..par rapport..a leur bras/jambe du haut
for i=1 to 4
   offset limb 1,8+(i*2),0,-50,0
next i
rem POSITIONNEMENT FINAL: mettre les bras/jambe a la bonne place (en positionnant seulemnt leur point de rotation)
offset limb 1,9,-60,100,0
offset limb 1,11,60,100,0
offset limb 1,13,-40,-100,0
offset limb 1,15,40,-100,0
rem Tete
make mesh from object 4,10
add limb 1,17,4
offset limb 1,17,0,125,0


set object rotation ZYX 1

clear all object keyframes 1
i=1:rotate limb 1,8+((i*3)-(3-i)),45,90,0:rotate limb 1,10+((i*3)-(3-i)),45,270,0:set object keyframe 1,0
rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,10
rotate limb 1,13,0,0,0:rotate limb 1,14,0,0,0:rotate limb 1,15,45,0,0:rotate limb 1,16,315,0,0:rotate limb 1,9,45,90,0:rotate limb 1,11,315,135,0:set object keyframe 1,20
rotate limb 1,15,0,0,0:rotate limb 1,16,0,0,0:rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,30
rem -------------------------------------------
delete object 10
delete object 2
x#=2500
z#=3500
y#=0
ink rgb(255,255,255),0
Direction=0

make object plain 100,1,1
for i=1 to 4
   read facex
   read facey
   read facez
   make object plain 100+i,300,300
   glue object to limb 100+i,100,0
   position object 100+i,facex,facey,facez
   point object 100+i,0,0,0
next i
rotate object 101,0,90,180
rotate object 102,0,270,180
xrotate object 103,180
xrotate object 104,180




rem make object cube 100,200
position object 100,2500,150,4500
xrotate object 100,180

position object 1,x#,y#+90,z#
position camera x#,y#+150,z#
rotate camera 25,ay#,0
move camera -250

scale object 1,30,30,30
yrotate object 1,180
fix object pivot 1

UpdateMirroir=0
do
   UpdateMirroir=UpdateMirroir+1
   NbTouche=LeftKey()+RightKey()+Upkey()+Downkey()

   if (upkey()) and (NbTouche=1) then Direction=1
   if (downkey()) and (NbTouche=1) then Direction=5
   if (leftkey()) and (NbTouche=1)  then Direction=7
   if (rightkey()) and (NbTouche=1) then Direction=3
   if (upkey()) and (leftkey()) (NbTouche=2) then Direction=8
   if (upkey()) and (rightkey()) (NbTouche=2) then Direction=2
   if (downkey()) and (rightkey()) (NbTouche=2) then Direction=4
   if (downkey()) and (leftkey()) (NbTouche=2) then Direction=6



   Difx#=camera position x()-x#
   Difz#=camera position z()-z#
   CamAng#=atanfull(Difx#,Difz#)
   Camx#=newxvalue(x#,CamAng#,500)
   Camz#=newzvalue(z#,CamAng#,500)

   if direction<>0
      if object looping(1)=0 then loop object 1,10,30
      ay#=wrapvalue(((Direction-1)*45)+(CamAng#-180))
      x#=newxvalue(x#,ay#,10)
      z#=newzvalue(z#,ay#,10)
      direction=0
   else
      stop object 1
   endif


   yrotate object 1,ay#
   position object 1,x#,y#+90,z#

   if sqrt((camera position x()-x#)^2+(camera position z()-z#)^2)>500 then Position Camera CamX#,camera position y(),CamZ#
   point camera x#,y#+150,z#


   oldcamx#=camera position x()
   oldcamy#=camera position y()
   oldcamz#=camera position z()
   oldcamay#=camera angle y()
   oldcamax#=camera angle x()
   oldcamaz#=camera angle z()

   if UpdateMirroir=2
      for i=0 to 4
         hide object 100+i
      next i
      position camera 2500,150,4500
      restore camera
      for i=0 to 3
         rotate camera 0,wrapvalue(i*90),0
         move camera -100
         get image 100+i,64*(i*2),0,(64*(i*2))+64*2,48*2
         read objno
         texture object objno,100+i
         paste image 200+i,64*(2*i),0
         set camera view 64*(i*2),0,(64*(i*2))+64*2,48*2
      next i
      UpdateMirroir=0
      for i=0 to 4
         show object 100+i
      next i
   endif

   set cursor 0,0
   print Screen Fps()
   position camera oldcamx#,oldcamy#,oldcamz#
   rotate camera oldcamax#,oldcamay#,oldcamaz#
   position camera 2500,150,4500
   point camera x#,y#,z#
   if sqrt((2500-x#)^2+(4500-z#)^2)<330
      x#=newxvalue(2500,oldcamay#,331)
      z#=newzvalue(4500,oldcamay#,331)
   endif
   if UpdateMirroir=1
      get image 200,0,0,64*2,48*2
      get image 201,64*2,0,64*4,48*2
      get image 202,64*4,0,64*6,48*2
      get image 203,64*6,0,64*8,48*2
   endif
   set camera view 0,0,640,480
   sync
loop
data 150,0,0,-150,0,0,0,0,150,0,0,-150,0,150,0,0,-150,0
camera:
data 104,101,103,102
Posted: 29th May 2003 4:53
someone should crown you "king of no media" pretty cool mirror fx by the way
Posted: 29th May 2003 5:53
thx

and did you turned around the box?

i mean ...do a 360 around the ....camera with the guy..to see the diferent side of the ...box..

ill maybe add diferent fx..on each side of the box
Posted: 29th May 2003 8:07
works only in dbc at the moment here.

good to see more mirrors and fx of this nature being explored.
Posted: 29th May 2003 10:46
yeah its pretty cool

ill maybe make a game with this effect...i mean it will be a 3d game...but rendered in 2d

and yeah its for DB V1.13
i dont have dbpro

could i win DbPro ?
lets go ....for my beautiful fx and no media game....i should have dbpro...for free !
Posted: 29th May 2003 10:47
oki check that source... it'll run in dbpro now, but it doesn't seems to show anything - and it runs at 7fps lol

hope lee knows about the bugs for the keyframing because they just outright don't work.

i'm tired and don't feel like figuring out all the pro problems right now though
Posted: 29th May 2003 20:07


now i deleted everything that was....useless...
it was all the camera movement.....from my other "mirror" demo...


oooo and ..in DBC V1.13 .....it run at 120 FPS for me

+ Code Snippet
sync on
sync rate 0
hide mouse
backdrop on : color backdrop rgb(150,100,0)
create bitmap 1,1024,1024
ink rgb(100,0,0),0
box 0,0,512,512
ink rgb(0,100,0),0
box 512,0,1023,512
ink rgb(0,0,100),0
box 0,512,512,1023
ink rgb(0,0,0),0
box 512,512,1023,1023
get image 1,0,0,1024,1024
delete bitmap 1

make matrix 1,5000,5000,20,20
prepare matrix texture 1,1,1,1
fill matrix 1,0,0


rem ------------------------------------------------
rem corps
make object box 1,100,200,100
rem bras
make object box 2,30,100,30
make mesh from object 1,2
delete object 2
rem jambe
make object box 2,30,100,30
make mesh from object 2,2
delete object 2
rem point de rotation
make object plain 2,1,1
make mesh from object 3,2
delete object 2

rem faire un object pour le corps....pour collision
make mesh from object 4,1
make object 2,4,0
delete mesh 4

rem adder les bras/jambe au perso
make object 10,2,0
for i=1 to 4
   add limb 1,i,1
next i
rem adder les jambes au perso
for i=1 to 4
   add limb 1,i+4,2
next i
rem adder les point de rotation au perso
for i=9 to 16
   add limb 1,i,3
next i
rem fixer les bras/jambe aux point de rotation
for i=1 to 8
   link limb 1,i,i+8
next i
rem fixer les point de rotation aux.....membre ki les font bouger..
for i=1 to 4
   link limb 1,8+(2*i),(i*2)-1
next i
rem offsetter les bras/jambe de leur point de rotation
for i=1 to 8
   offset limb 1,i,0,-50,0
next i
rem offset les bras/jambe ...du bas ..par rapport..a leur bras/jambe du haut
for i=1 to 4
   offset limb 1,8+(i*2),0,-50,0
next i
rem POSITIONNEMENT FINAL: mettre les bras/jambe a la bonne place (en positionnant seulemnt leur point de rotation)
offset limb 1,9,-60,100,0
offset limb 1,11,60,100,0
offset limb 1,13,-40,-100,0
offset limb 1,15,40,-100,0
rem Tete
make mesh from object 4,10
add limb 1,17,4
offset limb 1,17,0,125,0

set object rotation ZYX 1

clear all object keyframes 1
i=1:rotate limb 1,8+((i*3)-(3-i)),45,90,0:rotate limb 1,10+((i*3)-(3-i)),45,270,0:set object keyframe 1,0
rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,10
rotate limb 1,13,0,0,0:rotate limb 1,14,0,0,0:rotate limb 1,15,45,0,0:rotate limb 1,16,315,0,0:rotate limb 1,9,45,90,0:rotate limb 1,11,315,135,0:set object keyframe 1,20
rotate limb 1,15,0,0,0:rotate limb 1,16,0,0,0:rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,30
rem -------------------------------------------
delete object 10
delete object 2
x#=2500
z#=3500
y#=0
ink rgb(255,255,255),0
Direction=0

make object plain 100,1,1
for i=1 to 4
   read facex
   read facey
   read facez
   make object plain 100+i,300,300
   glue object to limb 100+i,100,0
   position object 100+i,facex,facey,facez
   point object 100+i,0,0,0
next i
rotate object 101,0,90,180
rotate object 102,0,270,180
xrotate object 103,180
xrotate object 104,180

position object 100,2500,150,4500
xrotate object 100,180

position object 1,x#,y#+90,z#

scale object 1,30,30,30
yrotate object 1,180
fix object pivot 1

UpdateMirroir=0
do
   UpdateMirroir=UpdateMirroir+1
   NbTouche=LeftKey()+RightKey()+Upkey()+Downkey()

   if (upkey()) and (NbTouche=1) then Direction=1
   if (downkey()) and (NbTouche=1) then Direction=5
   if (leftkey()) and (NbTouche=1)  then Direction=7
   if (rightkey()) and (NbTouche=1) then Direction=3
   if (upkey()) and (leftkey()) (NbTouche=2) then Direction=8
   if (upkey()) and (rightkey()) (NbTouche=2) then Direction=2
   if (downkey()) and (rightkey()) (NbTouche=2) then Direction=4
   if (downkey()) and (leftkey()) (NbTouche=2) then Direction=6

   Difx#=camera position x()-x#
   Difz#=camera position z()-z#
   CamAng#=atanfull(Difx#,Difz#)
   Camx#=newxvalue(x#,CamAng#,500)
   Camz#=newzvalue(z#,CamAng#,500)

   if direction<>0
      if object looping(1)=0 then loop object 1,10,30
      ay#=wrapvalue(((Direction-1)*45)+(CamAng#-180))
      x#=newxvalue(x#,ay#,10)
      z#=newzvalue(z#,ay#,10)
      direction=0
   else
      stop object 1
   endif


   yrotate object 1,ay#
   position object 1,x#,y#+90,z#

   if UpdateMirroir=2
      for i=0 to 4
         hide object 100+i
      next i
      position camera 2500,150,4500
      restore camera
      for i=0 to 3
         rotate camera 0,wrapvalue(i*90),0
         move camera -100
         get image 100+i,64*(i*2),0,(64*(i*2))+64*2,48*2
         read objno
         texture object objno,100+i
         paste image 200+i,64*(2*i),0
         set camera view 64*(i*2),0,(64*(i*2))+64*2,48*2
      next i
      UpdateMirroir=0
      for i=0 to 4
         show object 100+i
      next i
   endif

   set cursor 0,0
   print "Fps=",Screen Fps()
   position camera 2500,150,4500
   point camera x#,y#,z#
   if sqrt((2500-x#)^2+(4500-z#)^2)<330
      x#=newxvalue(2500,Camera angle y(),331)
      z#=newzvalue(4500,Camera Angle Y(),331)
   endif
   if UpdateMirroir=1
      get image 200,0,0,64*2,48*2
      get image 201,64*2,0,64*4,48*2
      get image 202,64*4,0,64*6,48*2
      get image 203,64*6,0,64*8,48*2
   endif
   set camera view 0,0,640,480
   sync
loop
data 150,0,0,-150,0,0,0,0,150,0,0,-150,0,150,0,0,-150,0
camera:
data 104,101,103,102
Posted: 29th May 2003 20:30
now you can .....see what there is "behind" the...cartoon box...just press spacebar....to ghost/ghost off...

+ Code Snippet
sync on
sync rate 0
hide mouse
backdrop on : color backdrop rgb(150,100,0)
create bitmap 1,1024,1024
ink rgb(100,0,0),0
box 0,0,512,512
ink rgb(0,100,0),0
box 512,0,1023,512
ink rgb(0,0,100),0
box 0,512,512,1023
ink rgb(0,0,0),0
box 512,512,1023,1023
get image 1,0,0,1024,1024
delete bitmap 1

make matrix 1,5000,5000,20,20
prepare matrix texture 1,1,1,1
fill matrix 1,0,0


rem ------------------------------------------------
rem corps
make object box 1,100,200,100
rem bras
make object box 2,30,100,30
make mesh from object 1,2
delete object 2
rem jambe
make object box 2,30,100,30
make mesh from object 2,2
delete object 2
rem point de rotation
make object plain 2,1,1
make mesh from object 3,2
delete object 2

rem faire un object pour le corps....pour collision
make mesh from object 4,1
make object 2,4,0
delete mesh 4

rem adder les bras/jambe au perso
make object 10,2,0
for i=1 to 4
   add limb 1,i,1
next i
rem adder les jambes au perso
for i=1 to 4
   add limb 1,i+4,2
next i
rem adder les point de rotation au perso
for i=9 to 16
   add limb 1,i,3
next i
rem fixer les bras/jambe aux point de rotation
for i=1 to 8
   link limb 1,i,i+8
next i
rem fixer les point de rotation aux.....membre ki les font bouger..
for i=1 to 4
   link limb 1,8+(2*i),(i*2)-1
next i
rem offsetter les bras/jambe de leur point de rotation
for i=1 to 8
   offset limb 1,i,0,-50,0
next i
rem offset les bras/jambe ...du bas ..par rapport..a leur bras/jambe du haut
for i=1 to 4
   offset limb 1,8+(i*2),0,-50,0
next i
rem POSITIONNEMENT FINAL: mettre les bras/jambe a la bonne place (en positionnant seulemnt leur point de rotation)
offset limb 1,9,-60,100,0
offset limb 1,11,60,100,0
offset limb 1,13,-40,-100,0
offset limb 1,15,40,-100,0
rem Tete
make mesh from object 4,10
add limb 1,17,4
offset limb 1,17,0,125,0

set object rotation ZYX 1

clear all object keyframes 1
i=1:rotate limb 1,8+((i*3)-(3-i)),45,90,0:rotate limb 1,10+((i*3)-(3-i)),45,270,0:set object keyframe 1,0
rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,10
rotate limb 1,13,0,0,0:rotate limb 1,14,0,0,0:rotate limb 1,15,45,0,0:rotate limb 1,16,315,0,0:rotate limb 1,9,45,90,0:rotate limb 1,11,315,135,0:set object keyframe 1,20
rotate limb 1,15,0,0,0:rotate limb 1,16,0,0,0:rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,30
rem -------------------------------------------
delete object 10
delete object 2
x#=2500
z#=3500
y#=0
ink rgb(255,255,255),0
Direction=0

make object plain 100,1,1
for i=1 to 4
   read facex
   read facey
   read facez
   make object plain 100+i,300,300
   glue object to limb 100+i,100,0
   position object 100+i,facex,facey,facez
   point object 100+i,0,0,0
next i
rotate object 101,0,90,180
rotate object 102,0,270,180
xrotate object 103,180
xrotate object 104,180

position object 100,2500,150,4500
xrotate object 100,180

position object 1,x#,y#+90,z#

scale object 1,30,30,30
yrotate object 1,180
fix object pivot 1


For i=100 to 104
   Ghost OBject on i
next i

ghost=1
hide object 100
UpdateMirroir=0
do
   UpdateMirroir=UpdateMirroir+1
   NbTouche=LeftKey()+RightKey()+Upkey()+Downkey()

   if Spacekey()=0 then Space=0
   if (Spacekey()=1) and (Space=0)
      Space=1
      For i=100 to 104
         if Ghost=1 then ghost Object off i
         if Ghost=0 then Ghost OBject on i
      next i
      if ghost=0 then newghost=1
      if ghost=1 then newghost=0
      ghost=newghost
   endif

   if (upkey()) and (NbTouche=1) then Direction=1
   if (downkey()) and (NbTouche=1) then Direction=5
   if (leftkey()) and (NbTouche=1)  then Direction=7
   if (rightkey()) and (NbTouche=1) then Direction=3
   if (upkey()) and (leftkey()) (NbTouche=2) then Direction=8
   if (upkey()) and (rightkey()) (NbTouche=2) then Direction=2
   if (downkey()) and (rightkey()) (NbTouche=2) then Direction=4
   if (downkey()) and (leftkey()) (NbTouche=2) then Direction=6

   Difx#=camera position x()-x#
   Difz#=camera position z()-z#
   CamAng#=atanfull(Difx#,Difz#)
   Camx#=newxvalue(x#,CamAng#,500)
   Camz#=newzvalue(z#,CamAng#,500)

   if direction<>0
      if object looping(1)=0 then loop object 1,10,30
      ay#=wrapvalue(((Direction-1)*45)+(CamAng#-180))
      x#=newxvalue(x#,ay#,10)
      z#=newzvalue(z#,ay#,10)
      direction=0
   else
      stop object 1
   endif


   yrotate object 1,ay#
   position object 1,x#,y#+90,z#

   if UpdateMirroir=2
      for i=1 to 4
         hide object 100+i
      next i
      position camera 2500,150,4500
      restore camera
      for i=0 to 3
         rotate camera 0,wrapvalue(i*90),0
         move camera -100
         get image 100+i,64*(i*2),0,(64*(i*2))+64*2,48*2
         read objno
         texture object objno,100+i
         paste image 200+i,64*(2*i),0
         set camera view 64*(i*2),0,(64*(i*2))+64*2,48*2
      next i
      UpdateMirroir=0
      for i=1 to 4
         show object 100+i
      next i
   endif

   set cursor 0,0
   print "Fps=",Screen Fps()
   Print "Press SpaceBar To toggle Ghost On/Off the Cartoon Box :D"
   position camera 2500,150,4500
   point camera x#,y#,z#
   if sqrt((2500-x#)^2+(4500-z#)^2)<330
      x#=newxvalue(2500,Camera angle y(),331)
      z#=newzvalue(4500,Camera Angle Y(),331)
   endif
   if UpdateMirroir=1
      get image 200,0,0,64*2,48*2
      get image 201,64*2,0,64*4,48*2
      get image 202,64*4,0,64*6,48*2
      get image 203,64*6,0,64*8,48*2
   endif
   set camera view 0,0,640,480
   sync
loop
end
data 150,0,0,-150,0,0,0,0,150,0,0,-150,0,150,0,0,-150,0
camera:
data 104,101,103,102
Posted: 29th May 2003 21:36
whts'....with all....the .....annoy...in...g...dots.... you got...alll over....you're post.....s......
Posted: 29th May 2003 22:00
lol... shhhhhh
check my new code snippet....

message name= ""
Posted: 29th May 2003 23:47
with ghosting it now works well kinda
Posted: 30th May 2003 0:16
did you tried it...witout ghosting....i mean when you press spacebar..you will see the original (plane only...textured) ...does it work?
Posted: 30th May 2003 10:40
well it kinda works... i think for DBpro use there is a bit of redevving to do.
so erm, good luck doing that
i'm sure some poor DBPer will help you convert it, but to be honest i never got it working too fast about 40fps was my highest ... but as soon as i get home i'll be sure to try it out on this pure beastie of a new gfx card - i'm sure that'll make some difference.