Post by oxymoron on Jan 25, 2005 22:00:40 GMT -5
Heres my first game (besides tutorials)
tell me if theres anything i should change or add
tell me if theres anything i should change or add
'From the mind of Vodun Shaman
''''''''''''''''
'Ninja Warrior '
''''''''''''''''
goto menu
''''''''''''''''''''''''''''''''''''''''''''''''
menu:
color(255,0,0)
locate 11,9:print"Ninja Warrior"
locate 11,11:print"1: Play Game"
locate 11,12:print"2: View Controls"
locate 11,13:print"3: 2-player menu"
while true
if keydown("1") then
cls
goto game
endif
if keydown("2") then
cls
goto controls
endif
If keydown("3") then
cls
goto twomenu
endif
drawtext()
wend
''''''''''''''''''''''''''''''''''''''''''''''''
twomenu:
color (255,0,0)
locate 11,9:print"Multiplayer"
locate 11,11:print"1: Start Game"
locate 11,12:print"2: View Controls"
locate 11,13:print"3: Back to Single Player"
while true
if keydown("1") then
cls
goto twogame
endif
if keydown("2") then
cls
goto twocontrols
endif
If keydown("3") then
cls
goto menu
endif
drawtext()
wend
''''''''''''''''''''''''''''''''''''''''''''''''
controls:
printr"move=arrow keys"
print"----------------------------------------"
printr"throwing star = s"
print"----------------------------------------"
printr"arm spear = a"
print"----------------------------------------"
printr"The spear has no effect unless you are"
printr"moving toward your opponent"
locate 21,23:print"press b to go back"
while true
if keydown("B") then
cls
goto menu
endif
drawtext()
wend
''''''''''''''''''''''''''''''''''''''''''''''''
twocontrols:
locate 13,1:print"player 1"
locate 29,1:print"player 2"
locate 0,3:printr"right right key h"
printr"left left key f"
printr"jump up key g"
printr"throwing star l s"
printr"arm spear k a"
locate 0,10:printr"The spear has no effect unless you are"
locate 0,11:printr"moving toward your opponent"
locate 21,23:print"press b to go back"
while true
if keydown("B") then
cls
goto menu
endif
drawtext()
wend
''''''''''''''''''''''''''''''''''''''''''''''''
game:
locate 11,11:print"You Are A ninja warrior"
sleep(2000)
cls
locate 11,11:print"defeat your kamikazi enemies"
sleep(2000)
cls
dim playerx, playery
dim enemyx, enemyy, enemyonscreen
dim landx, landy
dim staronscreen, spearonscreen
dim starx, stary
dim spearx, speary
dim level, lives
dim starlimit
dim killcount, killcounttotal
playerx=0
playery=13
landx=0
landy=14
staronscreen=false
spearonscreen=false
stary=13
speary=13
enemyonscreen=true
enemyx=38
enemyy=13
level=1
killcount=0
starlimit=9
lives=9
textmode (text_buffered)
while true
'player controls
if scankeydown (vk_right) and playerx < 38 then
playerx=playerx+1
cls
endif
if scankeydown (vk_left) and playerx > 0 then
playerx=playerx-1
cls
endif
If scankeydown (vk_left) and scankeydown (vk_right) then 'so you cant cheat
playerx=playerx-1
cls
endif
'use weapon
if keydown("A") then
spearonscreen=true
if spearonscreen=true then
spearx=playerx
endif
else
if keydown("S") and starlimit>0 then
staronscreen=true
starx=playerx+1
starlimit=starlimit-1
endif
endif
If keydown("A") and scankeydown (vk_right) then 'again so you cant cheat
spearonscreen=false
endif
'Throwing Star
if staronscreen then
starx=starx+1
cls
if starx=38 then
staronscreen=false
endif
endif
'Spear
if spearonscreen=true then
spearx=playerx+1
endif
'Enemy
if enemyonscreen then
enemyx=enemyx-1
sleep(50)
cls
if enemyx=0 then
enemyx=38
endif
endif
'Level progression
If killcount=10+level then
level=level+1
color (0,255,0)
locate 11,11:print"Level"+level
killcount=0
starlimit=9
endif
'Dying
If enemyx<playerx then
lives=lives-1
enemyx=38
endif
if lives=0 then
cls
goto dead
endif
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
locate enemyx,enemyy:print"A"
color (0, 0, 255)
locate playerx,playery:print"X"
if spearonscreen=true then
locate spearx,speary:print"-"
endif
if staronscreen=true then
locate starx,stary:print"*"
endif
color (0, 255, 0)
locate landx,landy: print"----------------------------------------"
color (255,0,0)
if staronscreen and starx>=enemyx then
locate enemyx,enemyy: print">"
enemyx=38
killcount=killcount+1
killcounttotal=killcounttotal+1
staronscreen=false
endif
if spearonscreen and spearx>=enemyx and spearx-1<= enemyx and scankeydown (vk_right) then
locate enemyx,enemyy: print">"
enemyx=38
killcount=killcount+1
killcounttotal=killcounttotal+1
spearonscreen=false
endif
locate 0,24:print"enemies killed: "+killcount
locate 11,1:print"level: "+level
locate 0,20:print"Throwing Stars left: "+starlimit
locate 11,3:print"Lives: "+lives
drawtext()
wend
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''