Rem Project: New Flat Earth Rem Created: Sunday, December 13, 2015 Rem ***** Main Source File ***** bs = 127 ` (big screen adjust for sprites only) SET WINDOW LAYOUT 0, 0, 0 set display mode 1280,768,32 hide mouse create bitmap 1,1400,1050 load bitmap "media/map.png",1 get image 1, 0,0,610,610,1 make object plane 1,610,610,1 `put Map * position object 1,0,0,750 scale object 1, 142,140,100 texture object 1,1 fade object 1,175 `1.75 times brighter load bitmap "media/Moon 1.bmp",1 get image 2, 0,0,239,270 make object sphere 2,35,30,30 `put moon MAKE MOON MAKE MOON MAKE MOON texture object 2,2 position object 2,0,-150,740 load bitmap "media/Sun 3.bmp",1 get image 3, 0,0,239,270 load bitmap "media/2 Arrows 2ab.bmp",1 get image 7,0,0,677,600,1 make object plane 7,677,600,7 `Make, put arrows on moon texture object 7,7 position object 7, object position x(1), object position y(1), object position z(1) -8 ` (put arrows on moon) SET ALPHA MAPPING ON 7,99 scale object 7,95,100,1 `---------------------------------------------------Borders Load bitmap "media/View from north new 1.bmp",1 `(bottom left square blue sprite) get image 6, 0,0,223,233,1 Sprite 6,27 + bs,535,6 `blue 'border' `scale sprite 6,81 set sprite priority 6,1 Load bitmap "media/View from south new 1.bmp",1 `(bottom right square sprite) get image 106, 0,0,230,224,1 Sprite 106,800+ bs,548,106 `Red 'border' `scale sprite 106,81 set sprite priority 106,2 ` Sun and Moon 'LABELS' LABELS LABELS LABELS LABELS LABELS LABELS ` 'LABELS' LABELS LABELS LABELS LABELS LABELS LABELS Load bitmap "media/Moon label.bmp",1 `(Moon label) get image 10,0,0,50,50 make object plane 10,50,50,1: texture object 10,10 scale object 10,150,150,100 set alpha mapping on 10,100 Load bitmap "media/Sun label.bmp",1 `(Sun label) get image 11,0,0,50,50 make object plane 11,50,50,1: texture object 11,11 scale object 11,150,150,100 set alpha mapping on 11,100 Load bitmap "media/South map label.bmp",1 get image 12,0,0,80,21,1 sprite 12,160 +bs,300,12 `left map ROTATE SPRITE 12, 92 sprite 13,465+bs,615,12 ` bottom map scale sprite 13, 125 sprite 14,862+bs,368,12 ` right map ROTATE SPRITE 14, -98 sprite 115, 480+bs,72,12 `back of map `ROTATE SPRITE 115, 180 scale sprite 115,70 load bitmap "media/Intro light.bmp",1 get image 2000,0,0,1280,768,1 load bitmap "media/Day of a month.bmp",1 get image 15, 0,0,517,80 sprite 15,331+bs,681,15 scale sprite 15,80 `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set current bitmap 0 color backdrop rgb(0,0,0) AUTOCAM OFF POSITION CAMERA 0,0,0 POINT CAMERA 0,0,0 `MAKE SUN MAKE SUN MAKE SUN make object sphere 3,35,30,30 `put Sun * color object 3, rgb(255,255,255) texture object 3,3 position object 3,0,210,740 fade object 1,200 `1.75 times brighter make light 3: set light range 3, 500: set point light 3, object position x(3), object position y(3), object position z(3) +18 SET LIGHT TO OBJECT POSITION 3, 3 `for slanted view- position camera 0,-520,200 point camera object position x(1), object position y(1), object position z(1) pitch camera down 10 `**********Make Sushine**********Make Sushine**********Make Sushine**********Make Sushine load bitmap "media/Sunshine 5.bmp",1 get image 5, 0,0,619,619,1 make object plane 5,619,619 `Sunshine 2 texture object 5,5 set current bitmap 0 scale object 5,75,75,100 ` oops, make a little bigger the sunshine position object 5, object position x(3), object position y(3), object position z(3) +8 ` (put sunshine on sun) position object 11, object position x(3), object position y(3)+35, object position z(3) `(put sun label on sun) SET ALPHA MAPPING ON 5,20 CLONE OBJECT 22, 2 CLONE OBJECT 23, 2 ` make 2 balls---- `-------------------------------------------------- make camera 22 `**** position object 22, 0, -520, 1530 `North view position camera 22, 0, -750, 1030 zrotate object 22,180 `(just for starting) color backdrop 22,0 SET CAMERA VIEW 22, 119, 592, 229, 692 POINT CAMERA 22, object position X(22), object position y(22),object position z(22) move camera 22,520 make light 1:set directional light 1, object position X(22), object position y(22),object position z(22) `-------------------------------------------------- make camera 23 `**** position object 23, 200, -620, 1530 `South view `zrotate object 23,180 ` (for start view only) position camera 23, 200, -850, 1030 color backdrop 23,0 SET CAMERA VIEW 23, 823, 592, 933, 692 POINT CAMERA 23, object position X(23), object position y(23),object position z(23) move camera 23,520 make light 2:set directional light 2, object position X(23), object position y(23),object position z(23) hide light 0 set ambient light 100 gosub clone_scene `for separate camera `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `Initiate rotation of sun and moon- radius# = object position y(3) - object position y(1) `radius = sun - map middle mradius# = object position y(2) - object position y(1) `radius = moon - map middle ang# = 88 `original angle position determined of Sun at 12 o:clock mang# = 88 ` and moon at 6 o:clock `~~~~~~~~~~~~~~~~~~~~~MOVE SUN~~~~~~~~~~~~~~~~~~~~~~ day = -1 ` works better to start at day 1.. at 12 midnight do ` show mouse `print mousex() SunCenter = 0 if object position x(3) > -1 and object position x(3) < 3 and object position y(3) >200 then _ SunCenter = 1: gosub printout_and_inc_day inc ang#,1 newsunx# = object position x(1) -cos(ang#) * radius# newsuny# = object position y(1)+sin(ang#) * radius# movex# = newsunx# - object position x(3): movey# = newsuny# - object position y(3) position object 3, object position x(3) + movex#, object position y(3) + movey#, object position z(3) `Sun position object 11, object position x(3), object position y(3)+40, object position z(3) `(put sun label on sun) position object 5, object position x(5) + movex#, object position y(5) + movey#, object position z(5) `Sunshine zrotate object 5,-ang# set point light 3, object position x(3), object position y(3), object position z(3) +18 `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~now move moon:~~~~~~~~~~~~~~~~~~~~~~ MoonCenter = 0 `mang# = mang# + 1.928 (used to be 1.928) if first_mang = 0 then addmang# = 1.928/2 : first_mang = 1 mang# = mang# + addmang# new_moon_x# = object position x(1) -cos(mang#) * mradius# `__________________________________________________________ cx# = object position x(1) +cos(mang#) * 300 `south cam x cy# = object position y(1)-sin(mang#) * 300 `south cam y `____________________________________________________________ new_moon_y# = object position y(1)+sin(mang#) * mradius# moon_move_x# = new_moon_x# - object position x(2): moon_move_y# = new_moon_y# - object position y(2) position object (2), object position x(2) + moon_move_x#, object position y(2) + moon_move_y#, object position z(2) position object 10, object position x(2), object position y(2)+35, object position z(2) `(put moon label on moon) zrotate object 7,-mang# `this is the arrows over the moon . The first time it is 'z rotated' is extreme... ` (about 90 degrees) or the original mang# of 88 + an adition of 1.930. This is the arrows starting place- ` as both arrows must be pointing north and south of the moon. savex# = object position x(2):savey# = object position y(2):savez# = 740 POINT OBJECT 2, object position x(3), object position y(3), object position z(3) : pitch object down 2,90 `------------------------------------- if object position x(2) > -2 and object position x(2) < 3 _ and object position y(2) >115 `if SunCenter = 1 then print "Full Moon Full Moon Full Moon Full Moon ": wait 3000 SET OBJECT TO OBJECT ORIENTATION 22, 2, 1 endif `----------------------------------- if object position x(2) > -2 and object position x(2) < 3 _ and object position y(2) < 115 SET OBJECT TO OBJECT ORIENTATION 23, 2, 1: _ endif `PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP `PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP ` PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP if firstime = 0 then inc firstime: gosub firstprint : INK RGB(0,162,232),RGB(0,0,255) `(to print each lunar day) set text size 36 set cursor 422+bs,690: print day : set text size 12 `__________________________if abs(int(object position x(2))) <3 pausing: `(and input) if mouseclick() = 1 then goto pausing `left mouse if mouseclick() = 2 then exit sync ` next h if firstloop = 0 firstloop = 1 set cursor 80,80: print "OBJECT ANGLE X(22) = ", OBJECT ANGLE X(22) set cursor 80,100: print "OBJECT ANGLE Y(22) = ", OBJECT ANGLE y(22) set cursor 80,120: print "OBJECT ANGLE Z(22) = ", OBJECT ANGLE z(22) set cursor 800,80: print "OBJECT ANGLE X(23) = ", OBJECT ANGLE X(23) set cursor 800,100: print "OBJECT ANGLE Y(23) = ", OBJECT ANGLE y(23) set cursor 800,120: print "OBJECT ANGLE Z(23) = ", OBJECT ANGLE z(23) sync `: wait key endif gosub run_scene cont: `print timer()/1000: print time1# loop `END LOOP, END LOOP, END LOOP END LOOP, END LOOP, END LOOP printout_and_inc_day: ` if starting = 0 then inc starting: day = 1 inc day `: inc endit: if endit = 175 then goto dead_end if day = 29 if first_circle = 0 then first_circle = 1: ang_save# = ang#: mang_save# = mang# day = 1 : ang# = ang_save#: mang# = mang_save# ` to stop wandering out of syc (moon and sun) endif return firstprint:` sync_rate = 0 `delete camera 22: delete camera 23 for g = 1 to 200 if object exist (g) then hide object g if sprite exist (g) then hide sprite g NEXT g volume = 100 time1# = timer()/1000 sprite 2000,0,0,2000 : wait 20000 : hide sprite 2000 `************************************************************************************************************************************* `************************************************************************************************************************************* `*********************************************************************************************************************************** INK RGB(0,255,255),RGB(0,0,255) sync on: sync rate 50 for g = 1 to 200 if object exist (g) then show object g if sprite exist (g) then show sprite g next g return finish: sync on: sync rate 60 do set cursor 20 ,20 print "Questions or comments? send to -- bubbb@verizon.net " set cursor 20 ,40 print "This demo is updated frequently... download again later for improvements.." print "Press 'up arrow' key to exit" if scancode () = 200 or scancode () = 72 then exit: break `up quit sync loop `_______________________________________________________________ sync return clone_scene: clone object 777,7 clone object 222,2 position object 777, object position x(7), object position y(7), object position z(7)-1100 position object 222, object position x(2), object position y(2), object position z(2)-1100 make camera 222 : color backdrop 222,0 `set camera view 222, 600,50,700,150 set camera fov 222, 14 `------------------------------------------------------------------------------------------------- make camera 223 : color backdrop 223,0 `set camera view 223, 800,50,900,150 set camera fov 223, 14 hide object 777 delete camera 22: delete camera 23 `set current camera 0 return run_scene: if firstrun = 0 ff = 18 `(fat factor-- make view fatter for bs) `set camera view 222, 115+bs-ff, 592, 235+bs+ff, 692 `set camera view 223, 817+bs-ff, 595, 937+bs+ff, 695 set camera view 222, 120+bs-ff, 592, 230+bs+ff, 692 set camera view 223, 822+bs-ff, 595, 932+bs+ff, 695 firstrun = 1 endif SET OBJECT TO OBJECT ORIENTATION 777, 7 position camera 222, 0,0, object position z (7) -1042 `600 position object 222, object position x(2), object position y(2), object position z(2)-1100 SET OBJECT TO OBJECT ORIENTATION 222, 2 ROTATE CAMERA 222, 0 , 65, -mang# roll camera right 222, 90 pitch camera up 222, 47 `____________________________________________________ position camera 223, cx#,cy#,object position z(7)-1042 SET CAMERA TO OBJECT ORIENTATION 223,777 pitch camera up 223,90 turn camera left 223,90 pitch camera up 223,22 inc cntr: if cntr = 3 then wait 5000 `print mousex(): print mousey() return dead_end: