%***********************************
%* *
%* Z O I D S : N E M E S I S *
%* *
%***********************************
%[ Our greatest enemy is often, ]
%[ ourselves. ]
/*
Purpose: An entertaining game based around the fictional world of ZOIDS,
a popular line of toys in Japan as well as an animated series.
The game is a 2D battle game in which one player fights another play with
a ZOID. If you are unfamiliar with ZOIDS and the ZOIDS universe I suggest
you search it @
www.wikipedia.org. Thank you.
*/
/*
Created by Joshua Williams (c) 2006
Thank you
www.compsci.ca for all your
helpful tutorials and info..........
*/
%*******************************
%* *
%* SCREEN SETTINGS *
%* *
%*******************************
% graphic setting and background
setscreen ("graphics:max;max,nocursor,title:-= Z O I D S : N E M E S I S =-")
%*******************************
%* *
%* MENU / INTERFACE *
%* *
%*******************************
% font variables
var font1 : int
var font2 : int
var font3 : int
var font4 : int
var font5 : int
% black background
colorback (black)
cls
% ZiggyGames title screen
font2 := Font.New ("arial:36")
Font.Draw ("ZiggyGames", 350, 325, font2, brightred)
delay (500)
cls
% Enigmatically Presents... title screen
delay (500)
font1 := Font.New ("arial:36")
Font.Draw ("Enigmatically Presents...", 250, 325, font1, brightred)
delay (500)
cls
delay (500)
% title logo variables
var title1 := Pic.FileNew ("logo1.bmp")
var title2 := Pic.FileNew ("logo2.bmp")
var title3 := Pic.FileNew ("logo3.bmp")
var title4 := Pic.FileNew ("logo4.bmp")
% title logo 1
colorback (black)
cls
delay (1000)
for pan1 : -400..375
Pic.Draw (title1, pan1, 250, picMerge)
delay (1)
end for
% title logo 2
for decreasing pan2 : 1000..375
Pic.Draw (title2, pan2, 250, picMerge)
delay (1)
end for
% title logo 3
for pan3 : -400..250
Pic.Draw (title3, 375, pan3, picMerge)
delay (1)
end for
% title logo 4
for decreasing pan4 : 700..250
Pic.Draw (title4, 375, pan4, picMerge)
delay (1)
end for
% top title box line
for bar1 : 350..675
drawline (bar1, 420, bar1, 420, brightred)
delay (5)
end for
% right title box line
for decreasing bar2 : 420..230
drawline (675, bar2, 675, bar2, brightred)
delay (5)
end for
% bottom title box line
for decreasing bar3 : 675..350
drawline (bar3, 230, bar3, 230, brightred)
delay (5)
end for
% left title box line
for bar4 : 230..420
drawline (350, bar4, 350, bar4, brightred)
delay (5)
end for
delay (5000)
cls
% loading screen
font4 := Font.New ("arial:16")
Font.Draw ("Loading...", 460, 450, font4, yellow)
drawbox (359, 399, 651, 426, yellow)
for horz : 360 .. 650
drawfillbox (horz, 400, horz, 425, brightred)
delay (10)
end for
delay (500)
cls
% menu
color (white)
% button text
locatexy (500, 350)
put "PLAY"
locatexy (300, 200)
put "HELP"
locatexy (700, 200)
put "EXIT"
drawbox (maxx - 75, maxy - 75, 0 + 75, 0 + 75, brightred)
drawbox (maxx - 125, maxy - 125, 0 + 125, 0 + 125, brightred)
drawfill (maxx - 110, maxy - 110, red, brightred)
% play button box
drawbox (480, 340, 545, 370, brightred)
% help button box
drawbox (280, 180, 345, 220, yellow)
% exit button box
drawbox (680, 180, 745, 220, yellow)
% menu title
var titlefont := Font.New ("system:44")
Font.Draw ("Z O I D S : N E M E S I S", 200, maxy - 200, titlefont, yellow)
delay (1000)
cls
%*******************************
%* *
%* GAMEPLAY *
%* *
%*******************************
% liger variables
var rght := Pic.FileNew ("ligerleft.bmp")
var lft := Pic.FileNew ("ligerright.bmp")
var x, y, spd, check : int
% var for input.keydown (key)
var key : array char of boolean
%sets variables x and y
x := 10
y := 50
% boolean movement variables
var right : boolean := false
var left : boolean := false
%zoid
procedure draw
% zoid left and right movement pics
Pic.Draw (rght, x, y - 40, 2)
% if's for pic.draw
if right = true then
Pic.Draw (rght, x, y - 40, 2)
end if
if left = true then
Pic.Draw (lft, x, y - 40, 2)
end if
%bottom of screen line
drawfillbox (0, 0, maxx, 18, grey)
end draw
%draw procedure (zoid + bottom line)
draw
View.Update
%var check = how high the zoid can go (0)
check := 0
%var spd = gravity force (0)
spd := 0
loop
View.Update
%sets key as var for key pressed
Input.KeyDown (key)
%check is preset to 0
if check = 0 then
%if w is pressed (Input.KeyDown), spd = 32 and check = 0
if key (' ') then
%var spd = 32
spd := 32
%var check = 0
check := 0
end if
end if
%Moves Horizontally
%d is pressed
if key ('d') then
left := true
right := false
%moves figure 5 to the right
x := x + 5
%a is pressed
elsif key ('a') then
right := true
left := false
%moves figure 5 to the left
x := x - 5
end if
%height of jump
%once y= more then 51 check = 1
if y >= 51 then
check := 1
% if y = 50 then check = 0
elsif y = 50 then
check := 0
end if
%controls the rate of fall (gravity)
%divides spd by 2 if greater than 0
if spd > 0 then
spd := spd div 2
elsif spd < 0 then
spd := spd * 2
end if
% if spd = 1 then it is = to -1
if spd = 1 then
spd := -1
end if
% adds gravity to var y
y := y + spd
%sets gravity (spd) to 0 when y = less than 50.
%if y is more than 50, then y always increases (keeping the figure afloat)
if y <= 50 then
spd := 0
y := 50
end if
%delay
delay (50)
%clear screen
cls
%procedure draw
draw
end loop