REM *****************************************
RemStart
*** TITLE - Galactic Math
*** VERSION - 1.3.0 LAST UPDATED - 1.30.2014
*** DEVELOPER - Tristan Green & John Wu
*** COPYRIGHT - Nothing Yet
*** DATE CREATED - 11.22.2013
***
RemEnd
REM *** START SYSTEM SETUP SECTION
hide mouse
autocam off
REM *** STOP SYSTEM SETUP SECTION
REM *****************************************
REM *****************************************
REM *** START INTRO SECTION
REM *** INTRO SECTION HEADER
REM DECLARE VARIABLES
REM SCREEN DISPLAY
cls 0
load bitmap "E:\Edutainment Game\images\Galactic-Math.bmp"
ink rgb(255,255,255),0 : set text font "arial" : set text size 14 : set text to bold : set text transparent
center text 320,420,"Developed by Jonathan Wu"
center text 320,434,"Copyright © Omega "
REM LOAD MUSIC
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** INTRO SECTION LOOP
do
REM SCREEN DISPLAY
REM CONTROL INPUT
if Keystate(scancode())=1 then gosub MoonSection
REM REFRESH SCREEN
sync
loop
REM *** END INTRO SECTION
REM *****************************************
REM *****************************************
REM *** START OPTIONS SECTION
REM *** OPTIONS SECTION HEADER
OptionsSection:
REM DECLARE VARIABLES
REM SCREEN DISPLAY
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
REM *** OPTIONS SECTION LOOP
REM CONTROL INPUT
REM REFRESH SCREEN
REM *** END OPTIONS SECTION
REM *****************************************
REM *****************************************
REM *** START MOON SECTION
REM *** MOON SECTION HEADER
MoonSection:
REM DECLARE VARIABLES
MyScore = 0 : rem Starting score is 0
REM SCREEN DISPLAY
cls 0 : backdrop on
REM LOAD IMAGES
load image "E:\Edutainment Game\images/moon_floor.png",2
load image "E:\Edutainment Game\images/starfield-6.jpg",5
load image "E:\Edutainment Game\images/16032727.jpg",1
load image "E:\Edutainment Game\images/Coin.bmp",20
load image "E:\Edutainment Game\images/faces.bmp",10
load image "E:\Edutainment Game\images/faces.bmp",11
load image "E:\Edutainment Game\images/ghost.bmp",12
load image "E:\Edutainment Game\images/hesh.bmp",13
load image "E:\Edutainment Game\images/keegan.bmp",14
load image "E:\Edutainment Game\images/blob.bmp",16
REM OBJECT CREATION
REM FLOOR
Make object box 2, 5000,100,5000
position object 2, -5,-10,-5
color object 2,rgb(155,155,155)
texture object 2,2
scale object texture 2,10,10
REM PLAYER
make object sphere 1,50,20,50
color object 1,rgb(255,255,0)
position object 1,15,100,-1000
texture object 1,1
REM NOB #1
make object sphere 10, 50,20,50
position object 10, 15,90,200
texture object 10,10
REM NOB #2
make object sphere 11, 50,20,50
position object 11, 500,90,600
texture object 11,11
REM NOB #3
make object sphere 12, 50,20,50
position object 12, -500,90,600
texture object 12,12
REM NOB #4
make object sphere 13, 50,20,50
position object 13, 1,90,950
texture object 13,13
REM NOB #5
make object sphere 14, 50,20,50
position object 14, -500,90,950
texture object 14,14
REM NOB #5
make object sphere 16, 50,20,50
position object 16, 500,90,950
texture object 16,16
REM COINS
make object cube 20 , 25
position object 20 , 15, 100, 70
texture object 20, 20
make object cube 21 , 25
position object 21 , 180, 100,180
texture object 21, 20
make object cube 22 , 25
position object 22 , -180, 100,180
texture object 22, 20
REM LOAD MODELS
REM SET COLLISIONS
REM SET CAMERA
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** MOON SECTION LOOP
position camera -200,350,-300
point camera 15,5,15
yrotate camera -90
texture backdrop 5
do
if object collision (1,20) then MyScore = MyScore + 10
if object collision (1,20) then position object 20, 15, 1000, 50
if object collision (1,21) then MyScore = MyScore + 10
if object collision (1,21) then position object 21, 15, 1000, 50
if object collision (1,22) then MyScore = MyScore + 10
if object collision (1,22) then position object 22, 15, 1000, 50
center text 40,10, "Score:"+str$(MyScore)
center text 320,420,"KILL ALL NOBS. USE ARROW KEYS TO MOVE"
xrotate object 20, object angle x (20)+0.2
yrotate object 20, object angle y (20)+0.2
xrotate object 21, object angle x (21)+0.2
yrotate object 21, object angle y (21)+0.2
xrotate object 22, object angle x (22)+0.2
yrotate object 22, object angle y (22)+0.2
yrotate object 1, rotation# REM rotate the object
set camera to follow object position x(1), object position y(1), object position z(1), object angle y(1), 190, 290, 100, 0
if upkey() then move object 1,1
if downkey() then move object 1,-1
if rightkey() then rotation#=rotation#+.25 REM control the rotation
if leftkey() then rotation#=rotation#-.25 REM control the rotation
if object collision(1,2)=0 then inc FallSpeed#,.015 else FallSpeed#=0
if spacekey() then move object up 1,2
position object 1,object position x(1),object position y(1)-FallSpeed#,object position z(1)
scroll object texture 1,0,0.00050
if object position y(1)<-100 then position object 1, 15,100,-1000
ink rgb(0,255,0),0
if object collision (1,10) then center text 320,200, "12x12"
if object collision (1,10) then center text 320,220, "[A]144 [B]24 [C]140"
if object collision (1,10) then
if Inkey$()="a" and object collision (1,10)
MyScore = MyScore + 10
position object 10, 15,900,200
endif
if Inkey$()="b" and object collision (1,10) then gosub endsection
if Inkey$()="c" and object collision (1,10) then gosub endsection
if object collision (1,11) then center text 320,200, "3x3x3"
if object collision (1,11) then center text 320,220, "[A]9 [B]25 [C]27"
if object collision (1,11) then
if Inkey$()="c" and object collision (1,11)
MyScore = MyScore + 10
position object 11, 15,900,200
endif
if Inkey$()="b" and object collision (1,11)
MyScore = MyScore = 0
endif
if Inkey$()="a" and object collision (1,11)
MyScore = MyScore = 0
endif
if object collision (1,12) then center text 320,200, "84/2"
if object collision (1,12) then center text 320,220, "[A]42 [B]82 [C]30"
if object collision (1,12) then
if Inkey$()="a" and object collision (1,12)
MyScore = MyScore + 10
position object 12, 15,900,200
endif
if Inkey$()="b" and object collision (1,12)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (1,12)
MyScore = MyScore = 0
endif
if object collision (1,12) then center text 320,200, "84/2"
if object collision (1,12) then center text 320,220, "[A]42 [B]82 [C]30"
if object collision (1,12) then
if Inkey$()="a" and object collision (1,12)
MyScore = MyScore + 10
position object 12, 15,900,200
endif
if Inkey$()="b" and object collision (1,12)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (1,12)
MyScore = MyScore = 0
endif
if object collision (1,13) then center text 320,200, "75+75"
if object collision (1,13) then center text 320,220, "[A]135 [B]150 [C]140"
if object collision (1,13) then
if Inkey$()="b" and object collision (1,13)
MyScore = MyScore + 10
position object 13, 15,900,200
endif
if Inkey$()="a" and object collision (1,13)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (1,13)
MyScore = MyScore = 0
endif
if object collision (1,14) then center text 320,200, "13x13"
if object collision (1,14) then center text 320,220, "[A]145 [B]26 [C]169"
if object collision (1,14) then
if Inkey$()="c" and object collision (1,14)
MyScore = MyScore + 10
position object 14, 15,900,200
endif
if Inkey$()="b" and object collision (1,14)
MyScore = MyScore = 0
endif
if Inkey$()="a" and object collision (1,14)
MyScore = MyScore = 0
endif
if object collision (1,16) then center text 320,200, "14x14"
if object collision (1,16) then center text 320,220, "[A]145 [B]32 [C]196"
if object collision (1,16) then
if Inkey$()="c" and object collision (1,16)
MyScore = MyScore + 10
position object 16, 15,900,200
endif
if Inkey$()="b" and object collision (1,16)
MyScore = MyScore = 0
endif
if Inkey$()="a" and object collision (1,16)
MyScore = MyScore = 0
endif
if MyScore = 90
for x = 1 to 90
if object exist(x) = 1 then delete object x
next x
gosub RocketSection
endif
loop
REM *** STOP MOON SECTION
REM *****************************************
REM *****************************************
REM *** START ROCKET SECTION
REM *** ROCKET SECTION HEADER
RocketSection:
MyScore = 0
texture backdrop 0
REM LOAD IMAGES
load image "E:\Edutainment Game\images/gray.bmp",32
load image "E:\Edutainment Game\images/starfield-6.jpg",35
load image "E:\Edutainment Game\images/16032727.jpg",31
load image "E:\Edutainment Game\images/Coin.bmp",20
load image "E:\Edutainment Game\images/Black.bmp",21
load image "E:\Edutainment Game\images/coin.bmp",22
load image "E:\Edutainment Game\images/coin.bmp",23
load image "E:\Edutainment Game\images/bad.bmp",33
load image "E:\Edutainment Game\images/bad.bmp",36
load image "E:\Edutainment Game\images/Coin.bmp",21
load image "E:\Edutainment Game\images/key.bmp",37
REM OBJECT CREATION
REM FLOOR
Make object box 32, 3000,100,3000
position object 32, -5,-10,-5
color object 32,rgb(155,155,155)
texture object 32,32
scale object texture 32,10,10
REM PLAYER
make object sphere 31,50,20,50
color object 31,rgb(255,255,0)
position object 31,15,100,-1000
texture object 31,31
REM COINS
make object cube 21 , 25
position object 21 , 15, 100, 70
texture object 21, 21
make object cube 22 , 25
position object 22 , 65, 100, 70
texture object 22, 22
make object cube 23 , 25
position object 23 , -65, 100, 70
texture object 23, 23
REM CONTROL PANEL
make object box 37,170,50,50
position object 37, 1400,70,1470
texture object 37,37
REM NOB
make object box 33,50,50,50
position object 33, 15,90,200
texture object 33,33
REM NOB
make object box 34,50,50,50
position object 34, 100,90,300
texture object 34,33
REM NOB
make object box 35,50,50,50
position object 35,-100,90,300
texture object 35,33
REM NOB
make object box 36,50,50,50
position object 36,15,100,300
texture object 36,33
REM LOAD MODELS
REM SET COLLISIONS
REM SET CAMERA
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** ROCKET SECTION LOOP
position camera -200,350,-300
point camera 15,5,15
yrotate camera -90
texture backdrop 35
do
if upkey() then move object 31,1
if downkey() then move object 31,-1
if rightkey() then rotation#=rotation#+.25 REM control the rotation
if leftkey() then rotation#=rotation#-.25 REM control the rotation
if object collision(31,32)=0 then inc FallSpeed#,.015 else FallSpeed#=0
if spacekey() then move object up 31,2
position object 31,object position x(31),object position y(31)-FallSpeed#,object position z(31)
center text 320,420,"REACH CONTROL PANEL"
if object collision (31,21) then MyScore = MyScore + 10
if object collision (31,21) then position object 21, 15, 1000, 50
center text 40,10, "Score:"+str$(MyScore)
xrotate object 21, object angle x (21)+0.2
yrotate object 21, object angle y (21)+0.2
xrotate object 22, object angle x (22)+0.2
yrotate object 22, object angle y (22)+0.2
xrotate object 23, object angle x (23)+0.2
yrotate object 23, object angle y (23)+0.2
if object collision (31,22) then MyScore = MyScore + 10
if object collision (31,22) then position object 22, 15, 1000, 50
center text 40,10, "Score:"+str$(MyScore)
if object collision (31,23) then MyScore = MyScore + 10
if object collision (31,23) then position object 23, 15, 1000, 50
center text 40,10, "Score:"+str$(MyScore)
if object collision (31,33) then center text 320,200, "11x11"
if object collision (31,33) then center text 320,220, "[A]144 [B]121 [C]22"
if Inkey$()="b" and object collision (31,33)
MyScore = MyScore + 10
position object 33, 15,900,200
endif
if Inkey$()="a" and object collision (31,33)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (31,33)
MyScore = MyScore = 0
endif
if object collision (31,34) then center text 320,200, "1/6 + 1/6 (DO NOT SIMPLIFY)"
if object collision (31,34) then center text 320,220, "[A]2/6 [B]3/6 [C]2/12"
if Inkey$()="a" and object collision (31,34)
MyScore = MyScore + 10
position object 34, 15,900,200
endif
if Inkey$()="b" and object collision (31,34)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (31,34)
MyScore = MyScore = 0
endif
if object collision (31,35) then center text 320,200, "135-128"
if object collision (31,35) then center text 320,220, "[A]11 [B]7 [C]13"
if Inkey$()="b" and object collision (31,35)
MyScore = MyScore + 10
position object 35, 15,900,200
endif
if Inkey$()="a" and object collision (31,35)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (31,35)
MyScore = MyScore = 0
endif
if object collision (31,37) then center text 320,200, "PRESS A TO GO TO 3RD LEVEL"
if Inkey$()="a" and object collision (31,37)
MyScore = MyScore + 10
position object 37, 15,900,200
endif
if object collision (31,36) then center text 320,200, "3/3 + 3/3"
if object collision (31,36) then center text 320,220, "[A]7/8 [B]9/ 2 [C]1"
if Inkey$()="c" and object collision (31,36)
MyScore = MyScore + 10
position object 36, 15,900,200
endif
if Inkey$()="a" and object collision (31,36)
MyScore = MyScore = 0
endif
if Inkey$()="b" and object collision (31,36)
MyScore = MyScore = 0
endif
scroll object texture 31,0,0.00050
if object position y(31)<-100 then position object 31, 15,100,-1000
if MyScore = 80
for x = 1 to 80
if object exist(x) = 1 then delete object x
next x
gosub EarthSection
endif
yrotate object 31, rotation# REM rotate the object
set camera to follow object position x(31), object position y(31), object position z(31), object angle y(31), 190, 290, 100, 0
loop
REM *** STOP MOON SECTION
REM *****************************************
REM *****************************************
REM *** START Eartg SECTION
REM *** Earth SECTION HEADER
cls 0 : backdrop on
EarthSection:
MyScore = 0
REM LOAD IMAGES
load image "E:\Edutainment Game\images/16032727.jpg",40
load image "E:\Edutainment Game\images/grass.bmp",41
load image "E:\Edutainment Game\images/desert.bmp",41
load image "E:\Edutainment Game\images/cloud.bmp",50
load image "E:\Edutainment Game\images/desert.bmp",51
load image "E:\Edutainment Game\images/desert.bmp",52
load image "E:\Edutainment Game\images/desert.bmp",53
load image "E:\Edutainment Game\images/desert.bmp",54
load image "E:\Edutainment Game\images/desert.bmp",55
texture backdrop 0
REM OBJECT CREATION
Make object box 41, 3000,100,3000
position object 41, -5,-10,-5
color object 41,rgb(155,155,155)
texture object 41,41
scale object texture 41,10,10
Make object box 51, 200,50,200
position object 51, 255,10,1700
color object 51,rgb(155,155,155)
texture object 51,51
scale object texture 51,10,10
Make object box 52, 200,50,200
position object 52, 100,10,2100
color object 52,rgb(155,155,155)
texture object 52,52
scale object texture 52,10,10
Make object box 53, 200,50,200
position object 53, 255,10,2550
color object 53,rgb(155,155,155)
texture object 53,53
scale object texture 53,10,10
Make object box 54, 200,50,200
position object 54, 100,10,3000
color object 54,rgb(155,155,155)
texture object 54,54
scale object texture 54,10,10
Make object box 55, 3000,100,3000
position object 55, 100,-10,4850
color object 55,rgb(155,155,155)
texture object 55,55
scale object texture 55,10,10
REM PLAYER
make object sphere 40,50,20,50
color object 40,rgb(255,255,0)
position object 40,15,70,-1000
texture object 40,40
texture backdrop 50
REM NOB
make object box 45,50,50,50
position object 45, 15,60,200
texture object 45,45
position camera -200,300,-300
point camera 15,5,15
yrotate camera -90
autocam off
do
if upkey() then move object 40,2
if downkey() then move object 40,-1
if rightkey() then rotation#=rotation#+0.25 REM control the rotation
if leftkey() then rotation#=rotation#-0.25 REM control the rotation
if spacekey() then move object up 40,2.5
oc=0
if object collision(40,41)=1 then oc=1
if object collision(40,51)=1 then oc=1
if object collision(40,52)=1 then oc=1
if object collision(40,53)=1 then oc=1
if object collision(40,54)=1 then oc=1
if object collision(40,55)=1 then oc=1
if oc=1 then FallSpeed#=0 else inc FallSpeed#,0.025
yrotate object 40, rotation# REM rotate the object
position object 40,object position x(40),object position y(40)-FallSpeed#,object position z(40)
set camera to follow object position x(40), object position y(40), object position z(40), object angle y(40), 550, 250, 25, 15
gosub debug
sync
loop
end
debug:
set cursor 0,0
print "debug"
print oc
print FallSpeed#
print object position y(40)-FallSpeed#
return
REM *****************************************
REM *** START END SECTION
REM *** END SECTION HEADER
EndSection:
texture backdrop 0
REM DECLARE VARIABLES
REM SCREEN DISPLAY
cls 0
center text 320,240,"GAME OVER NOOB! Play Again [Y/N]?"
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** END SECTION LOOP
do
if scancode()=0 then exit
loop
do
REM CONTROL INPUT
if Inkey$()="y"
gosub OptionsSection
endif
if Inkey$()="n"
cls : end
endif
REM REFRESH SCREEN
sync
loop
end
REM *** STOP END SECTION
REM *****************************************
Hasty