autocam off
position camera 0,0,-10
color backdrop rgb(255,255,255)
make object cube 5,1
hide object 5
set text font "times new roman"
set text size 100
ink rgb(200,200,255),0
text 0,60,"Word Rage "
get image 1,0,0,450,200
ink rgb(255,255,255),0
box 0,0,10,10
ink rgb(0,0,250),0
line 0,0,0,10
line 0,0,10,0
get image 2,0,0,10,10
ink rgb(250,0,0),0
line 0,0,0,10
line 0,0,10,0
get image 3,0,0,10,10
make object plain 1,14,3
texture object 1,1
make object plain 2,14,3
texture object 2,1
position object 2,0.1,-0.1,-0.01
set object transparency 1,3
set object transparency 2,3
set alpha mapping on 2,50
make object plain 3,14,3
texture object 3,1
position object 3,0.1,-0.1,-0.01
set object transparency 3,3
set alpha mapping on 3,30
make object plain 4,15,3
scale object texture 4,50,10
position object 4,0,0,0
set object emissive 4,rgb(0,0,250)
ghost object on 4,2
make object sphere 6,-100,30,30
texture object 6,2
scale object texture 6,50,50
 
sync on
color backdrop 0
 
read disallowedcharacterlist$
numberofdisallowedcharacters=len(disallowedcharacterlist$)
dim disallowedcharacter$(numberofdisallowedcharacters)
for checkdisallowedcharacters=1 to numberofdisallowedcharacters
  disallowedcharacter$(checkdisallowedcharacters)=right$(left$(disallowedcharacterlist$,checkdisallowedcharacters),1)
next checkdisallowedcharacters
 
read wordbank$
numberofwords=1
dim word$(numberofwords)
length=len(wordbank$)
for checkforspaces=1 to length
  checkcharacter$=right$(left$(wordbank$,checkforspaces),1)
  if checkcharacter$=" "
    inc numberofwords
    dim word$(numberofwords)
  else
    proceed=1
    for checkdisallowedcharacters=1 to numberofdisallowedcharacters
      if checkcharacter$=disallowedcharacter$(checkdisallowedcharacters)
        proceed=0
      endif
    next checkdisallowedcharacters
 
    if proceed=1
      word$(numberofwords)=word$(numberofwords)+checkcharacter$
    endif
  endif
next checkforspaces
 
restart:
for deletewordbox=10 to wordbox
if image exist(deletewordbox) then delete image deletewordbox
if object exist(deletewordbox) then delete object deletewordbox
next deletewordbox
score=0
correct=2
newword=1
 
set text size 50
 
create bitmap 1,screen width(),screen height()
set current bitmap 0
wordbox=9
starttime=timer()
 
do
 
time=(timer()-starttime)/1000
countdown=30-time
 
scroll object texture 1,0.001,0.0007
scroll object texture 2,0.0008,0.0002
scroll object texture 3,-0.0005,-0.0002
`scroll object texture 4,0,-0.01
scroll object texture 6,0,0.02
if countdown<=0 then goto gameover
 
ink rgb(0,0,255),0
text 0,0,"Timer: "+str$(countdown)
ink rgb(255,255,255),0
 
if newword=1
 
  newword=0
  do
    randomword$=lower$(word$(rnd(numberofwords-1)+1))
    if len(randomword$)>3 then exit
  loop
inc wordbox
  set current bitmap 1
  cls
  ink rgb(255,255,255),0
  box 0,0,250,50
  ink rgb(0,0,255),0
  text 0,0,randomword$
  if image exist(wordbox) then delete image wordbox
  get image wordbox,0,0,250,50,1
  set current bitmap 0
  if object exist(wordbox) then delete object wordbox
  make object box wordbox,6,1,1
  position object wordbox,0,5,2
  `set object light wordbox,0
  texture object wordbox,wordbox
endif
 
`ink rgb(0,255,0),0
 
 
for movebox=10 to wordbox
position object movebox,0,object position y(movebox)-0.01,2
next movebox
 
 
if inkey$()=""
keydown=0
else
keydown=1
endif
 
if keydown=0 and lock=1 then lock=0
 
 
if lock=0 and keydown=1
lock=1
correct=3
if returnkey()=0
inputletter$=inkey$()
inputword$=inputword$+inputletter$
endif
 
if returnkey()=1
  if inputword$=randomword$
    inc score,len(randomword$)
    inputword$=""
    newword=1
    correct=1
    x=0
    else
    correct=0
    inputword$=""
    newword=1
    x=0
  endif
endif
endif
 
text 0,150,inputword$
 
 
if correct=1
  text 0,60,"Correct"
endif
 
if correct=0
  text 0,60,"Incorrect"
endif
 
text 0,90,"Score: "+str$(score)
 
 
sync
loop
 
gameover:
cls
print "Game over. You scored ",score," points."
sync
wait 2000
cls
print "Game over. You scored ",score," points."
print "Press any key to restart"
sync
wait key
goto restart
 
data ".,:;1234567890/?\!£$%^&*()-=+_{}[]#@<>"
data "In key stage 3, in accordance with the whole school ICT policy, and in order to fulfil the requirements for the key stage 3 ICT curriculum, the emphasis of using ICT in science is to provide pupils with opportunities to make use of datalogging devices.  Pupils in key stage 3 are to be assessed on their ability to use such apparatus, to manipulate and analyse the data recorded using computer software, and to evaluate the effectiveness of such methods, culminating in an ICT level being awarded to all year 9 pupils in accordance with the ICT marking policy .  In key stages 3 and 4 and at AS and A level, pupils are to be provided with opportunities where possible to make use of all forms of ICT which may assist in their learning and presentation of science."