
-----------------------------------
chipanpriest
Tue Dec 06, 2011 7:18 pm

Dragon Rage
-----------------------------------
This is a program I've been working on in school, hope you enjoy it! :)

-----------------------------------
chipanpriest
Tue Dec 06, 2011 7:21 pm

Re: Dragon Rage
-----------------------------------


setscreen ("title:Dragon Rage")
setscreen ("graphics:1000,600")
buttonchoose ("multibutton")

var edgeovalx1, edgeovalx2, edgeovaly1, engeovaly2, font1, font2, font3, font4, titlepic1, titlepic2, mousex, mousey, click, score : int
var textx, pic1, pic2, pic3, pic4, linex1, linex2, liney1, liney2, ovalonex, ovaloney, ovaltwox, ovaltwoy, mainovalx, mainovaly : int
var ball1speedx, ball1speedy, ball2speedx, ball2speedy, ball3speedx, ball3speedy, ball4speedx, ball4speedy, ballspeed, speedtime : int
var dragonspeed, knightspeed, difficulty, filenumb : int
var high : int := 0
var ovalsize1 : int := 50
var ovalsize2 : int := 25
var filename : string := "Highscore.txt"

pic1 := Pic.FileNew ("Pictures/Dragon.jpg")
pic2 := Pic.FileNew ("Pictures/Dragon2.jpg")
pic3 := Pic.FileNew ("Pictures/Dragon3.jpg")
pic4 := Pic.FileNew ("Pictures/Dragon4.jpg")
titlepic1 := Pic.FileNew ("Pictures/Titledragon1.jpg")
titlepic2 := Pic.FileNew ("Pictures/Titledragon2.jpg")
font1 := Font.New ("Comic Sans MS:36:bold")
font2 := Font.New ("Arial:20:bold")
font3 := Font.New ("Arial:10")
font4 := Font.New ("Comic Sans MS:32")

procedure title
    Font.Draw ("Dragon Rage", textx + 2, 475, font1, 12)
    Font.Draw ("Dragon Rage", textx - 2, 475, font1, 12)
    Font.Draw ("Dragon Rage", textx, 475, font1, yellow)
end title

procedure edgecircles
    drawfilloval (edgeovalx1, edgeovaly1, 10, 10, 12)
    drawfilloval (edgeovalx2, engeovaly2, 10, 10, 12)
    drawoval (edgeovalx1, edgeovaly1, 10, 10, yellow)
    drawoval (edgeovalx2, engeovaly2, 10, 10, yellow)
    delay (50)
    drawfilloval (edgeovalx1, edgeovaly1, 11, 11, 7)
    drawfilloval (edgeovalx2, engeovaly2, 11, 11, 7)
end edgecircles

procedure mouse
    mousewhere (mousex, mousey, click)
    drawfillbox (150, 250, 300, 325, 12)
    drawbox (150, 250, 300, 325, yellow)
    drawfillbox (700, 250, 850, 325, 12)
    drawbox (700, 250, 850, 325, yellow)
    if mousex >= 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 150 and mousex = 250 and mousey = 700 and mousex = 250 and mousey = 700 and mousex = 250 and mousey 