Rem Project: Project
Rem Created: Sunday, May 08, 2016

Rem ***** Main Source File *****
//video from youtube - 
//image morph https://forum.thegamecreators.com/thread/13208

Sync On
Sync Rate 0

Backdrop Off
Color Backdrop 0,rgb(120,100,200)

Position Camera 0, 0,0,-30

//1-195
`Load Image "D:\flame\New folder\fire\FUMEFX FIRE R&D 07.jpg", 1
for i = 7 to 9
   Load Image "New folder1\fire\FUMEFX FIRE R&D 00" + str$(i)+ ".jpg", i-6
next i
for i = 10 to 29
   Load Image "New folder1\fire\FUMEFX FIRE R&D 0" + str$(i)+ ".jpg", i-6
   cls
   set cursor 0,0
   ink rgb(255,255,255), 0
   print "please wait ... " + str$(i) + "/29"
   sync
next i
`for i = 100 to 189
`   Load Image "D:\flame\New folder1\fire\FUMEFX FIRE R&D " + str$(i)+ ".jpg", i-6
`   cls
`   set cursor 0,0
`   ink rgb(255,255,255), 0
`   print "please wait ... " + str$(i) + "/201"
`   sync
`next i
`for i = 190 to 201
`   Load Image "D:\flame\New folder1\fire\FUMEFX FIRE R&D " + str$(i)+ ".jpg", i-6
`   cls
`   set cursor 0,0
`   ink rgb(255,255,255), 0
`   print "please wait ... " + str$(i) + "/201"
`   sync
`next i

Backdrop On
Color Backdrop 0,rgb(0,0,0)

Make Object sphere 3, 70, 50, 50
Color Object 3, rgb(115,0,255)
position Object 3, 100,0,0


Make Object sphere 2, 10, 50, 50
Color Object 2, rgb(15,0,0)
position Object 2, 0,0,0

Set Object Specular power 2,0
Set Object Emissive 2, rgb(255,0,0)
Set Object Ambient 2, 1
Set Object Ambience 2, rgb(155,155,0)


Make Object sphere 1, 50, 50, 50
Scale Object 1, 50,0.01,50
Rotate Object 1, 90,0,0
Fix Object Pivot 1
Texture Object 1, 1
`Scale Object Texture 1, 2, 2
 
`Scroll Object Texture 1, 0, 150
Set Object Transparency 1, 2
Fade Object 1, 40
Ghost Object On 1, 2
Disable Object Zwrite 1
Set Object cull 1, 0
`Set Object Ambient 1, 1
`Set Object Ambience 1, rgb(255,255,255)

Position Light 0,  0,50,0
Color Light 0, rgb(255,255,255)

Make Light 1
Position Light 1,  0,-50,0
Color Light 1, rgb(255,255,255)

Position Camera 0, 0,50,0
Point Camera 0, 0,0,0

Point Object 1,  Camera Position X(0), Camera Position Y(0),Camera Position Z(0)

MAKE FREQUENCY TICKER 1, 60
MAKE FREQUENCY TICKER 2, 10

tn = 10
stu# = 1
stv# = 1
do
    
    
    Ticked = Ticker(1)
    Ticked1 = Ticker(2)
    if Ticked > 0 or Ticked1 > 0
    
    iin$ = inkey$()
    if iin$ = "w" then Pitch Camera Up 0, 1
    if iin$ = "s" then Pitch Camera down 0, 1
    if iin$ = "a" then turn Camera left 0, 1
    if iin$ = "d" then turn Camera right 0, 1
    if iin$ = "r" then Scroll Object Texture 1, 0, 0.01
    if iin$ = "f" then Scroll Object Texture 1, 0, -0.01
    if iin$ = "t" then Scroll Object Texture 1, 0.01, 0
    if iin$ = "g" then Scroll Object Texture 1, -0.01, 0
    
    if iin$ = "y" 
       stu# = stu# + 0.01
       Scale Object Texture 1, stu#, 1
    endif
    if iin$ = "h" 
       stu# = stu# - 0.01
       Scale Object Texture 1, stu#, 1
    endif
    if iin$ = "u" 
       stv# = stv# + 0.01
       Scale Object Texture 1, 1, stv#
    endif
    if iin$ = "j" 
       stv# = stv# - 0.01
       Scale Object Texture 1, 1, stv#
    endif
       
    if upkey() = 1   then Move Camera 0, 1
    if downkey() = 1 then move Camera 0, -1
    
    Point Object 1,  Camera Position X(0), Camera Position Y(0),Camera Position Z(0)
       
       if Ticked1 > 0 
        tn = tn + 1
        if tn > 23 then tn = 10
        Texture Object 1, tn
        
       endif 
       
    endif

       set cursor 0,0
       print str$(Ticked) + " " + str$(stu#)+ " " + str$(stv#) + " " + str$(screen fps())+ " " + "x=" + str$(Camera Position X(0)) + " y=" + str$(Camera Position Y(0)) + " z=" + str$(Camera Position Z(0)) + " ax=" + str$(Camera angle X(0)) + " ay=" + str$(Camera angle Y(0)) + " az=" + str$(Camera angle Z(0))
       sync

Loop