Description
Laser Assault 2 is the sequal to Laser Asasult (The first game I ever made, a space game where you dodged abunch of different-colored lasers), where you shoot a bunch of alien ships. It is an old-school type side-scrolling space game in 2D. There are a few different types of ships, two of which shoot at you. This is the biggest game I have ever made so far, so I am obviously kind of new to DB.
Hope you like it!
Controls
Arrow keys - Control the ship
Space - Shoot
Shift - Brings you to the boss. This was used to debug the boss part, but I never got rid of it.
Kinds of ships
This is your ship.
This is the smallest of the alien ships, so it is hard to shoot. It automaticly homes in on your ship, but are really slow, so they aren't very dangerous. They just take space to move around from you.
Points: 20
These are the least dangerous of the ships. They are big, slow, and don't shoot.
Points: 5
These are the hardest to shoot. They quickly fly in from the right side of the screen, then stop at the left side, and quickly exit through the right side again. You only have about 1/2 a second once it has reached the left side of the screen to shoot it.
Points: 50
These are one of the ships that shoot. It flies up and down, while shooting bullets at your ship.
Points: 40
This is the other of the two that shoot. It homes in on your ship, while shooting. These are the most dangerous.
Points: 45
Powerups
+1 live
+1 multiplier
+100 score
Multiplier
The multiplier is the amount that the score is multiplied by when you gain points.
Screenshots
Features
*5 Diffrent animated alien ships to destroy
*Scrolling star background
*At the begining of the game, it is easy, but gets harder and harder...
*Live system
*Cool music sound effects
*Score system
*3 Powerups
*Cool music
*A boss ship
*Menu
Because the code structure wasn't planned very well, it is nearly impossible to continue, so the development of this game ends with only one level. I might make Laser Assault 3 sometime...
Download
here(the file attatched to this post is an earlier version. Ignore it.
Source
remstart
-------------------------------------------------------------------
program name: Laser Assault 2
-------------------------------------------------------------------
written by: UFO
date: 11/19/05
-------------------------------------------------------------------
comments:
Image Usage:
(1-3)-player ship
(4)-Player bullet
(5)-Enemy Bullet
(6) - missle
(50-55) - explosion1
(60-80) - powerups
(100^)-Aliens
Sprite Usage:
1 - Player ship
2 - powerup
(100-110) - Player Bullets
(10-99) - Aliens
(120-135) - explosions
(150-175) - Enemy Bullets
(176-200) - Missle
Sound usage:
1 - Player shoot
Arrays:
PBullet(maxnum,3) - 1=exists 2=x 3=y
Alien(maxnum,5) - 1=exists 2=x 3=y 4=type 5=frame 6 -Height 7-special 8-special2 9-special3
Explosion(maxnum,3) 1=exists 2=x 3=y 4=frame 5=sprite num
Ebullet(25,3) - 1=exists 2=x 3=y 4=speed
Powerup(5) 1=exists 2=x 3=y 4=type 5=frame
Missle(24,3) 1=exists 2=x 3=y
-------------------------------------------------------------------
remend
amountofstars=300
Dim Stars(amountofstars,3)
hide mouse
Sync on
sync rate 40
gosub Load_Images
gosub load_sounds
gosub Titlescreen
start:
Animtimer = timer()
Frame = 1
Dim Ppos(2)
Ppos(1) = 30
Ppos(2) = 240
maxplayerbullets = 10
Dim PBullet(maxplayerbullets,3)
AlienTimer = timer()
Maxaliens = 20
Dim Alien(Maxaliens,9)
Dim explosion(15,5)
level = 1000
shields = 10
Maxebullets = 25
Dim EBullet(maxebullets,4)
Score = 0
Multiplier = 1
Dim Powerup(5)
Poweruptimer = timer()
sector = 1
boss_exists = 0
dim Missle(24,3)
bossdestroyed = 0
about = 0
getready = 0
quit = 0
amountofstars=300
Dim Stars(amountofstars,3)
gosub Init_Stars
gosub Draw_Stars
gosub Draw_Ship
Do
gosub Draw_Stars
gosub Draw_Ship
gosub Move_Ship
gosub Make_Alien
gosub Move_Alien
gosub Draw_Alien
gosub Make_Alien_Shoot
gosub Enemy_bullet
gosub draw_missle
gosub Shooting
gosub Move_Bullets
gosub Draw_Bullets
gosub Bullet_Collision
gosub Enemy_Bullet_Collision
gosub Alien_Collision
gosub powerup_Collision
gosub Missle_Collision
gosub draw_explosion
gosub MAke_Powerup
gosub draw_powerup
gosub Animation
Print "Shields:";
Print shields;
Print " Danger Level:";
Print 2000-level;
Print " Score:";
Print score;
Print " Multiplier:";
Print Multiplier
If level < 150 then sector = 2
If shields <= 0 then goto lose
IF shiftkey() = 1 then sector = 2
If bossdestroyed = 1 then gosub win
sync
Loop
Init_Stars:
For I = 1 to amountofstars
Stars(I,1) = rnd(640)
Stars(I,2) = rnd(320)+80
Stars(I,3) = rnd(9)+1
next I
return
Draw_Stars:
cls
Ink rgb(255,255,255),0
For I = 1 to Amountofstars
Stars(I,1) = Stars(I,1) - Stars(I,3)
If Stars(I,1) < 0 then Stars(I,1) = 640
Dot Stars(I,1),Stars(I,2)
next I
return
Load_images:
Load image "media/Player/Ablast1.bmp",1
Load image "media/player/Ablast2.bmp",2
Load image "media/player/Ablast3.bmp",3
Load image "media/player/Bullet.bmp",4
Load image "media/aliens/bullet.bmp",5
Load image "media/aliens/missle.bmp",6
Load image "media/explosions/1.bmp",50
Load image "media/explosions/2.bmp",51
Load image "media/explosions/3.bmp",52
Load image "media/explosions/4.bmp",53
Load image "media/explosions/5.bmp",54
Load image "media/explosions/6.bmp",55
Load image "media/powerups/Live1.bmp",60
Load image "media/powerups/Live2.bmp",61
Load image "media/powerups/Multiplier1.bmp",62
Load image "media/powerups/Multiplier2.bmp",63
Load image "media/powerups/Points1.bmp",64
Load image "media/powerups/Points2.bmp",65
Load image "media/aliens/1-1.bmp",100
Load image "media/aliens/1-2.bmp",101
Load image "media/aliens/1-3.bmp",102
Load image "media/aliens/2-1.bmp",103
Load image "media/aliens/2-2.bmp",104
Load image "media/aliens/2-3.bmp",105
Load image "media/aliens/3-1.bmp",106
Load image "media/aliens/3-2.bmp",107
Load image "media/aliens/3-3.bmp",108
Load image "media/aliens/4-1.bmp",109
Load image "media/aliens/4-2.bmp",110
Load image "media/aliens/4-3.bmp",111
Load image "media/aliens/5-1.bmp",112
Load image "media/aliens/5-2.bmp",113
Load image "media/aliens/5-3.bmp",114
Load image "media/aliens/boss1.bmp",115
Load image "media/aliens/boss1.bmp",116
Load image "media/aliens/boss1.bmp",117
Load image "media/titles/Title.bmp",200
Load image "media/titles/by.bmp",201
Load image "media/titles/Laser Assault 2.bmp",202
Load image "media/titles/About.bmp",203
Load image "media/titles/Get Ready.bmp",204
Load image "media/titles/Win.bmp",205
Load image "media/titles/lose.bmp",206
return
Load_sounds:
Load sound "media/sounds/phaser.wav",1
Load sound "media/sounds/lasergun.wav",2
Load sound "media/sounds/explode.wav",5
Load sound "media/sounds/explode3.wav",6
Load sound "media/sounds/scifi1.wav",10
Load sound "media/sounds/Scifi4.wav",11
Load sound "media/sounds/Scifi5.wav",12
Load music "media/bgplay.mid",1
Loop music 1
return
Draw_SHip:
Sprite 1,ppos(1),ppos(2),frame
return
Move_Ship:
If upkey() = 1 then ppos(2) = curvevalue(ppos(2)-25,ppos(2),4)
If downkey() = 1 then ppos(2) = curvevalue(ppos(2)+25,ppos(2),4)
If leftkey() = 1 then ppos(1) = curvevalue(ppos(1)-25,ppos(1),4)
If rightkey() = 1 then ppos(1) = curvevalue(ppos(1)+25,ppos(1),4)
If ppos(1)<0 then ppos(1) = 1
If ppos(1)>640-sprite width(1) then ppos(1) = 639-sprite width(1)
If ppos(2)<80 then ppos(2) = 81
If ppos(2)>400-sprite height(1) then ppos(2) = 399-sprite height(1)
return
Animation:
If Animtimer < timer() - 50
Frame = Frame + 1
For I = 1 to maxaliens
Alien(I,5) = Alien(I,5) + 1
If Alien(I,5) = 4 then Alien(I,5) = 1
next I
For I = 1 to 15
If explosion(I,1) = 1 then Explosion(I,4) = Explosion(I,4) + 1
If explosion(I,4) = 6
explosion(I,1) = 0
sprite explosion(I,5),640,480,1
endif
next I
If powerup(1) = 1
Powerup(5) = powerup(5) + 1
If powerup(5) = 3 then powerup(5) = 1
endif
animtimer = timer()
endif
If Frame = 4 then Frame = 1
return
Shooting:
If spacekey() = 1 and shoot = 1
shoot = 0
Play sound 1
For I = 1 to maxplayerbullets
If PBullet(I,1) = 0
PBullet(I,1) = 1
PBullet(I,2) = Ppos(1)+sprite width(1)-20
PBullet(I,3) = Ppos(2)+(sprite height(1)/2)-2
Goto leave
endif
next I
leave:
endif
If spacekey() = 0 then shoot = 1
return
Move_Bullets:
For I = 1 to maxplayerbullets
If PBullet(I,1) = 1
PBullet(I,2) = curvevalue(PBullet(I,2)+50,PBullet(I,2),3)
If PBullet(I,2) > 700 then PBullet(I,1) = 0
endif
next I
return
Draw_Bullets:
For I = 1 to maxplayerbullets
If PBullet(I,1) = 1
Sprite 99+I,PBullet(I,2),PBullet(I,3),4
endif
next I
return
Make_Alien_Shoot:
For I = 1 to maxaliens
If Alien(I,1) = 1
If Alien(I,4) = 10
If Alien(I,8) < timer() - 600
For N = 1 to maxebullets
If Ebullet(N,1) = 0
Ebullet(N,1) = 1
Ebullet(N,2) = Alien(I,2)
Ebullet(N,3) = Alien(I,3) + (Alien(I,6)/2)-2
Ebullet(N,4) = 10
goto Imgoingtodie
endif
next I
Imgoingtodie:
Play sound 2
Alien(I,8) = timer()
endif
endif
If Alien(I,4) = 13
If Alien(I,7) < timer() - 700
For N = 1 to maxebullets
If Ebullet(N,1) = 0
Ebullet(N,1) = 1
Ebullet(N,2) = Alien(I,2)+25
Ebullet(N,3) = Alien(I,3) + (Alien(I,6)/2)-2
Ebullet(N,4) = 10
goto Hellonstuff
endif
next N
Hellonstuff:
Play sound 2
Alien(I,7) = timer()
endif
endif
If Alien(I,4) = 16
If ALien(I,7) < timer() - 500
ALien(I,7) = timer()
thingy = rnd(3)+1
If thingy = 1
Play sound 2
For X = 1 to 80 step 20
For N = 1 to maxebullets
If Ebullet(N,1) = 0
Ebullet(N,1) = 1
Ebullet(N,2) = Alien(I,2) + 20
Ebullet(N,3) = Alien(I,3) + X
Ebullet(N,4) = 10
goto computersarecool
endif
next N
Computersarecool:
next X
thingy = 0
endif
If thingy = 2
Play sound 2
For x = 0 to 80 step 40
For N = 1 to maxebullets
If Ebullet(N,1) = 0
Ebullet(N,1) = 1
Ebullet(N,2) = Alien(I,2) + 20
Ebullet(N,3) = Alien(I,3) + X
Ebullet(N,4) = 7
goto IfIwerearichman
endif
next N
IfIwerearichman:
next X
For x = 20 to 60 step 40
For N = 1 to maxebullets
If Ebullet(N,1) = 0
Ebullet(N,1) = 1
Ebullet(N,2) = Alien(I,2) + 20
Ebullet(N,3) = Alien(I,3) + X
Ebullet(N,4) = 10
goto bleeblah
endif
next N
bleeblah:
next X
endif
If thingy = 3
Play sound 2
gosub Shoot_Missles
endif
endif
endif
endif
next I
return
Shoot_Missles:
For I = 1 to maxaliens
If alien(I,4) = 16
For x = 1 to 24
If Missle(x,1) = 0
Missle(x,1) = 1
Missle(x,2) = Alien(I,2)-20
Missle(x,3) = Alien(I,3) + Alien(I,6)/2-29
goto onceuponatime
endif
next x
onceuponatime:
For x = 1 to 24
If missle(x,1) = 0
Missle(x,1) = 1
Missle(x,2) = alien(I,2)-20
Missle(x,3) = Alien(I,3) + Alien(I,6)/2+20
goto christmas
endif
next x
christmas:
endif
next I
return
Draw_Missle:
For I = 1 to 24
IF missle(I,1) = 1 then sprite 175+I,Missle(I,2),Missle(I,3),6
Missle(I,2) = Missle(I,2) - 12
If Missle(I,3) < ppos(2) - 25 then Missle(I,3) = Missle(I,3) + 5
If missle(I,3) > ppos(2) + 25 then Missle(I,3) = Missle(I,3) - 5
If missle(I,2) < -30 then missle(I,1) = 0
next I
return
Enemy_Bullet:
For I = 1 to maxebullets
If Ebullet(I,1) = 1
Ebullet(I,2) = Ebullet(I,2) - Ebullet(I,4)
Sprite 149+I,Ebullet(I,2),Ebullet(I,3),5
If Ebullet(I,2) < -10 then Ebullet(I,1) = 0
endif
next I
return
Bullet_Collision:
For I = 1 to maxplayerbullets
If Sprite exist(99+I) = 1
For N = 1 to maxaliens
If sprite exist(9+N) = 1
If Sprite hit(I+99,9+N) = 1
If Alien(N,4) <> 16
Alien(N,1) = 0
PBullet(I,1) = 0
Make_explosion(Sprite x(99+I)+sprite width(99+I)-30,Sprite y(99+I)-30)
Play sound 5
sprite I+99,640,480,1
sprite N+9,0,480,1
If Alien(I,4) = 1 then score = score + 20*multiplier
If alien(I,4) = 4 then score = score + 5*multiplier
If alien(I,4) = 7 then score = score + 50*multiplier
If alien(I,4) = 10 then score = score + 40*multiplier
If alien(I,4) = 13 then score = score + 45*multiplier
endif
If ALien(N,4) = 16
Alien(N,8) = Alien(N,8) - 1
PBullet(I,1) = 0
Make_explosion(Sprite x(99+I)+sprite width(99+I)-30,Sprite y(99+I)-30)
Play sound 5
Sprite I+99,640,480,1
Score = score + 20*multiplier
If Alien(N,8) =< 0
For X = 1 to 10
Make_explosion(Sprite x(9+N)+rnd(80),Sprite y(9+N)+rnd(68))
next I
Play sound 6
Sprite N+9,0,480,1
Alien(N,1) = 0
bossdestroyed = 1
endif
endif
endif
endif
Next N
endif
Next I
return
Enemy_Bullet_Collision:
For I = 1 to maxebullets
If sprite exist(I+149) = 1
If Sprite hit(1,I+149) = 1
Ebullet(I,1) = 0
Sprite I+149,640,480,1
shields = shields - 1
multiplier = 1
Play sound 6
Make_Explosion(sprite x(1)-10,sprite y(1)-10)
endif
endif
next I
return
Missle_Collision:
For I = 1 to 24
If sprite exist(I+175)
IF sprite hit(1,175+I) = 1
Missle(I,1) = 0
Shields = Shields - 2
multiplier = 1
Sprite I+175,-50,-50,1
Play sound 6
Make_Explosion(sprite x(1)-10,sprite y(1)-10)
endif
endif
next I
return
Alien_Collision:
For I = 10 to 99
If sprite exist(I) = 1
If sprite hit(1,I) = 1
If alien(I-9,4) <> 16
Sprite I,0,480,1
alien(I-9,1) = 0
make_explosion(Sprite x(1)-10,Sprite y(1)-10)
Play sound 6
shields = shields - 1
multiplier = 1
endif
If alien(I-9,4) = 16
Alien(I-9,8) = Alien(I-9,8) - 2
Sheilds = sheilds - 1
multiplier = 1
Play sound 6
make_explosion(Sprite x(1)-10,Sprite y(1)-10)
endif
endif
endif
next I
return
Powerup_Collision:
If sprite exist(2)
If sprite hit(1,2) = 1
If powerup(4) = 59
shields = shields + 1
Play sound 10
endif
If powerup(4) = 61
multiplier = multiplier + 1
Play sound 11
endif
If powerup(4) = 63
Score = Score + 100*multiplier
Play sound 12
endif
sprite 2,640,480,1
Powerup(1) = 0
endif
endif
return
Make_Alien:
If sector = 2 and Boss_exists = 1 then goto leavethisplace
If alientimer < timer() - level
level = level - 5
alientimer = timer()
For I = 1 to maxaliens
If Alien(I,1) = 0
Alien(I,1) = 1
Alien(I,2) = 640
If sector = 1 then Alien(I,4) = rnd(4)+1
If sector = 2 and Boss_exists = 0
Alien(I,4) = 16
Boss_exists = 1
endif
If alien(I,4) = 5 then Alien(I,4) = 13
If alien(I,4) = 4 then Alien(I,4) = 10
If Alien(I,4) = 3 then Alien(I,4) = 7
If alien(I,4) = 2 then Alien(I,4) = 4
Alien(I,5) = 1
If alien(I,4) = 1 then Alien(I,6) = 21
If alien(I,4) = 4 then Alien(I,6) = 39
IF alien(I,4) = 7 then Alien(I,6) = 32
If alien(I,4) = 10 then Alien(I,6) = 31
If alien(I,4) = 13 then Alien(I,6) = 33
If alien(I,4) = 16 then Alien(I,6) = 77
IF alien(I,4) = 7 then Alien(I,7) = 50
If alien(I,4) = 10 then Alien(I,7) = rnd(1)+1
IF Alien(I,4) = 10 and Alien(I,7) = 1 then Alien(I,7) = 3
IF Alien(I,4) = 10 and Alien(I,7) = 2 then Alien(I,7) = -3
If alien(I,4) = 10 then Alien(I,8) = timer()
If alien(I,4) = 13 then Alien(I,7) = timer()
If alien(I,4) = 16 then Alien(I,7) = timer()
If alien(I,4) = 16 then Alien(I,8) = 50
If alien(I,4) = 16 then Alien(I,9) = 2
If Alien(I,4) <> 16 then Alien(I,3) = rnd(320-Alien(I,6))+80
If Alien(I,4) = 16 then Alien(I,3) = 150
goto leavethisplace
endif
next I
Leavethisplace:
endif
return
Move_Alien:
For I = 1 to maxaliens
If Alien(I,1) = 1
If Alien(I,4) = 1
Alien(I,2) = Alien(I,2) - 4
If ppos(2) > Alien(I,3) then Alien(I,3) = Alien(I,3) + 1
If ppos(2) < Alien(I,3) then Alien(I,3) = Alien(I,3) - 1
If Alien(I,2) < -30 then Alien(I,1) = 0
endif
If Alien(I,4) = 4
Alien(I,2) = Alien(I,2) - 10
If Alien(I,2) < -50 then Alien(I,1) = 0
endif
If Alien(I,4) = 7
Alien(I,2) = Alien(I,2) - int(Alien(I,7)/2)
Alien(I,7) = Alien(I,7) - 1
If Alien(I,2) > 645 then Alien(I,1) = 0
endif
If alien(I,4) = 10
Alien(I,2) = Alien(I,2) - 4
Alien(I,3) = Alien(I,3) + Alien(I,7)
If Alien(I,3) < 75 then Alien(I,7) = 3
If Alien(I,3) > 415-Alien(I,6) then Alien(I,7) = -3
If Alien(I,2) < -50 then Alien(I,1) = 0
endif
If alien(I,4) = 13
Alien(I,2) = Alien(I,2) - 10
If ppos(2) > Alien(I,3)+10 then Alien(I,3) = Alien(I,3) + 2
If ppos(2) < Alien(I,3)-10 then Alien(I,3) = Alien(I,3) - 2
If Alien(I,2) < -50 then Alien(I,1) = 0
endif
If alien(I,4) = 16
If Alien(I,2) > 500 then Alien(I,2) = Alien(I,2) - 4
ALien(I,3) = Alien(I,3) + Alien(I,9)
If Alien(I,3) < 85 then Alien(I,9) = 2
If Alien(I,3) > 390-Alien(I,6) then Alien(I,9) = -2
endif
endif
next I
return
Draw_Alien:
For I = 1 to maxaliens
If Alien(I,1) = 1 then Sprite 9+I,Alien(I,2),Alien(I,3),98+Alien(I,4)+Alien(I,5)
next I
return
Draw_Explosion:
For I = 1 to 15
If explosion(I,1) = 1 then Sprite explosion(I,5),explosion(I,2),explosion(I,3),explosion(I,4)+49
next I
return
Make_Powerup:
If Poweruptimer < timer() - 10000 and rnd(100) = 1
If powerup(1) = 0
Powerup(1) = 1
Powerup(2) = 640
Powerup(3) = rnd(320-20)+80
Powerup(4) = rnd(2)+1
If Powerup(4) = 3 then Powerup(4) = 59
If powerup(4) = 2 then Powerup(4) = 61
If powerup(4) = 1 then Powerup(4) = 63
Powerup(5) = 1
endif
Poweruptimer = timer()
endif
return
Draw_Powerup:
If Powerup(1) = 1
Powerup(2) = Powerup(2) - 5
Sprite 2,Powerup(2),Powerup(3),Powerup(4)+Powerup(5)
If powerup(2) < -20
powerup(1) = 0
sprite 2,640,480,1
endif
endif
return
function Make_explosion(x,y)
For I = 1 to 15
If explosion(I,1) = 0
explosion(I,1) = 1
explosion(I,2) = x
explosion(I,3) = y
explosion(I,4) = 1
explosion(I,5) = I+119
goto Ihatethis
endif
next I
Ihatethis:
endfunction
Titlescreen:
Paste image 200,0,80
fadein
sync
fadeout
Paste image 201,0,80
fadein
sync
fadeout
sync
cls 0
AAABBBCCC:
gosub Init_Stars
gosub Draw_Stars
Sprite 1,0,80,202
show sprite 1
set text size 30
Center text 320,200,"Play"
Center text 320,250,"About"
Center text 320,300,"Credits"
Center text 320,350,"Quit"
fadein
show mouse
Do
gosub draw_stars
Sprite 1,0,80,202
show sprite 1
If mousex() < 360 and mousex() > 280 and mousey() > 200 and mousey() < 230
Ink rgb(255,0,0), 0
If mouseclick() = 1 then getready = 1
else
Ink rgb(255,255,255), 0
endif
Center text 320,200,"Play"
If mousex() < 350 and mousex() > 270 and mousey() > 250 and mousey() < 280
Ink rgb(255,0,0), 0
If mouseclick() = 1 then about = 1
else
Ink rgb(255,255,255), 0
endif
Center text 320,250,"About"
If mousex() < 380 and mousex() > 260 and mousey() > 300 and mousey() < 330
Ink rgb(255,0,0), 0
If mouseclick() = 1 then end
else
Ink rgb(255,255,255), 0
endif
Center text 320,300,"Credits"
If mousex() < 360 and mousex() > 280 and mousey() > 350 and mousey() < 380
Ink rgb(255,0,0), 0
If mouseclick() = 1 then quit = 1
else
Ink rgb(255,255,255), 0
endif
Center text 320,350,"Quit"
sync
If about = 1
about = 0
hide mouse
goto about
endif
If getready = 1
getready = 0
hide mouse
goto getready
endif
IF quit = 1
end
endif
Loop
beginthegame:
hide mouse
show sprite 1
goto start
About:
fadeout
hide sprite 1
sync
Paste image 203,0,80
fadein
sync
repeat
until returnkey() = 1
fadeout
goto AAABBBCCC
Getready:
fadeout
hide sprite 1
sync
paste image 204,0,80
fadein
sync
fadeout
cls 0
sync
fadein
goto beginthegame
Win:
fadeout
sync
for I = 1 to 200
If sprite exist(I) then delete sprite I
next I
cls
Paste image 205,0,80
sync
fadein
end
goto AAABBBCCC
Lose:
fadeout
sync
for I = 1 to 200
If sprite exist(I) then delete sprite I
next I
cls
Paste image 206,0,80
sync
fadein
end
goto aaabbbccc
Function FadeOut
Done=0
T=Timer()
EndTime#=T+(2000): Rem 1000=1 second 2000=2 seconds and so on
Step#=EndTime#-T
Repeat
CurT#=Timer()-T
Ratio#=CurT#/Step#
RGBVal=255-(255*Ratio#)
If RGBVal<0 then RGBVal=0 : Done=1
Set Gamma RGBVal,RGBVal,RGBVal
Sync
Until Done=1
endfunction
Function FadeIn
Done=0
T=Timer()
EndTime#=T+(2000): Rem 1000=1 second 2000=2 seconds and so on
Step#=EndTime#-T
Repeat
CurT#=Timer()-T
Ratio#=CurT#/Step#
RGBVal=(255*Ratio#)
If RGBVal>255 then RGBVal=255 : Done=1
Set Gamma RGBVal,RGBVal,RGBVal
Sync
Until Done=1
endfunction
Media
The media to go with the source will be posted soon.