
-----------------------------------
beedub
Thu May 08, 2003 9:22 pm

dissolve slide fade
-----------------------------------
hey all i was  thinking, when i change a scene in a program, i can make a dissolve or a cool scene movement. I was wondering how would i do that... locate,randint?

-----------------------------------
Tony
Thu May 08, 2003 10:24 pm


-----------------------------------
colorback (black)

var r,c:int

for i:1..3000
r:= Rand.Int(1,maxrow-1)
c:= Rand.Int(1,maxcol)

locate(r,c)
put " "
end for

randomly color the screen in. It will be more "dissolving" if you use Draw.Dot instead...

-----------------------------------
Homer_simpson
Thu May 08, 2003 10:36 pm


-----------------------------------
i think u forgot to put this in your loop 
    colorback (c)

-----------------------------------
Tony
Thu May 08, 2003 10:38 pm


-----------------------------------

colorback(i)


but no, I wanted color to remain black so its consistant. If you keep on changing the colours though, you can cause some people to have siezures (probably bad spelling)  :twisted: Fixed it. -Asok

-----------------------------------
beedub
Sun May 11, 2003 9:31 pm


-----------------------------------
ty soo much.. thats egcactly what i wanted

-----------------------------------
beedub
Thu May 15, 2003 9:07 pm


-----------------------------------
umm.. one quick question.. srry if this is newbish but.. what would the perimeters be for the drawdot ??... like drawdot (320,200,black)... or what?

-----------------------------------
void
Thu May 15, 2003 9:12 pm


-----------------------------------
drawdot (x,y,color)...ye...u were rite...

-----------------------------------
beedub
Thu May 15, 2003 9:13 pm


-----------------------------------
i know that.. but to correctly make the slide fade look proper... then what would the perimeters be?..like the coordinates... and void what school you go to??

-----------------------------------
beedub
Thu May 15, 2003 9:31 pm


-----------------------------------
nvm... i found out... this is what my final code is drawfillbox (0,0, 640, 400, black)

var r,c,r2,c2:int 

for i:1..3000 
r:= Rand.Int(1,maxrow-1) 
c:= Rand.Int(1,maxcol) 
r2:=Rand.Int (1,640)
c2:=Rand.Int (1,400)

locate(r,c) 
drawfillbox (r2,c2,r2+10,c2+10,white)
delay (1)
end for
cls
thanks for the help;)

-----------------------------------
Homer_simpson
Thu May 15, 2003 10:05 pm


-----------------------------------
was bored tried to write something short...
colorback(black)
cls
var x,y:array 1..1000 of int 

for i:1..3000 
for ii:1..1000
x(ii):=Rand.Int (1,640) 
y(ii):=Rand.Int (1,400)
end for 

for ii:1..1000
drawdot(x(ii),y(ii),white)
%drawfilloval(x(ii),y(ii),1,1,white)
end for 
end for 
cls


-----------------------------------
beedub
Thu May 15, 2003 10:08 pm


-----------------------------------
thats nice... the only problem is... it takes to long to end...

-----------------------------------
Martin
Thu May 15, 2003 10:17 pm


-----------------------------------
Whatchya making, beedub?

-----------------------------------
beedub
Fri May 16, 2003 5:17 pm


-----------------------------------
when i chage scenes in a program i want it to look cool... and make it just like a quick change of scene... so i make it dissolve..

-----------------------------------
Homer_simpson
Fri May 16, 2003 6:23 pm


-----------------------------------
this another fade to white effect...
for decreasing ii : 255 .. 1 by 5
    RGB.SetColor (black, ii, ii, ii)
    colorback (black)
    cls
    delay (10)
end for

-----------------------------------
Homer_simpson
Fri May 16, 2003 6:35 pm


-----------------------------------
this is another effect it fades the black screen to yer image...
View.Set ("offscreenonly")
var i := 257
for decreasing ii : 255 .. 1 by 1
    i -= 1
    RGB.SetColor (black, ii, ii, ii)
    colorback (black)
    cls
    RGB.SetColor (blue, i, i, 255)
    drawfillstar (1, 1, 300, 300, blue)
    View.Update
    %delay (5)
end for


-----------------------------------
beedub
Fri May 16, 2003 8:57 pm


-----------------------------------
ty homer... that last one is exactly wat i wanted.. the one i was doing didnt fade into my image... it when into a clear screen then my image... thanks alot...

-----------------------------------
DiamondDev
Mon Jun 16, 2003 8:45 pm

Fade to black?
-----------------------------------
I know this is an old thread, but this is exactly what i need....cept i need it to fade to black.......any ideas?

-----------------------------------
PHP God
Tue Jun 17, 2003 12:46 pm


-----------------------------------
you guys are lame. Lets use some arrays. Here's my idea thus far, its not working though.


var ybuff:array 0..ymax of boolean
var xpos:int
var ypos:int:=0
var flag:boolean:=false
setscreen ("graphics,nocursor,noecho")
procedure dissolve (color:int,delay:int)
 % Initialize and reset all values
  for i:0..xmax
   xbuff(i):=false
  end for
  for i:0..ymax
   ybuff(i):=false
  end for
 % Begin dissolve
  for i:0..ymax
   ypos:=ypos+1
   for j:0..xmax
    loop
    randint (xpos,0,xmax)
    if xbuff(xpos)=false then
     drawdot (xpos,ypos,color)
    end if
    xbuff(xpos):=true
    for ii:0..maxx
     if xbuff(i) = false then exit
     else flag := true
     end if
    end for
    if flag = true then exit
    end if
    end loop
   end for
  end for
end dissolve


basically, i have 2 arrays of boolean. when a dot gets colored in, its x position is TRUE, if it is uncolored it is FALSE. if an x position is already true, it will not be colored, if it is false color it. Then you check to see that all the dots in the row have been colored, if that is true then move on to the next row. I totally screwed that code up but that is my idea. I think I can make it now but my CPU class is almost over. my GR9 teacher can't help me because it is gr 11 stuff and she has to help all the newbs with MS Word :lol:

-----------------------------------
85882
Tue Jun 17, 2003 2:30 pm


-----------------------------------
That's cool.  :wink: 

Thanks!

-----------------------------------
DiamondDev
Tue Jun 17, 2003 5:52 pm

Thanks
-----------------------------------
Hey,
Thanks for the code, even though you are rude. Should help me with the game I'm making...probably post it here when I'm finished and my Comp science course is over..seeing that its a final project........side scrollers are always fun to do...except its not a very practicle way of doing it when your screen is 800X 600

Answer to my own question
Modify Homer's code slightly   :oops:  stupid me.....

for  ii : 1 .. 255 by 1 
    RGB.SetColor (black, ii, ii, ii) 
    colorback (black) 
    cls 
    delay (10) 
end for
