Battle Ballz
This is a little game I made in only as couple days using DarkBasic Pro.
A classic two player tank battle that I made for me and my kids to play and given the amount of time it took me I am quite happy with
the results. I only started the project a week ago and in all honesty I could prob reproduce this in around an hour or so now that I
know what I am doing with it.
I started off ready to make a typical platform game similar to Super Mario Smash brothers lay out but over time it morphed into the game you see here.
I wish I was able to make this into a flash game and publish it online because my kids have been begging me to do so. I found out how to convert it over to an Active X game which is pretty cool(and dangerous IMO, Ill never use Active X again after what I found out) but no browsers support Active X anymore other the Internet explorer and lets face it, people only use IE to download Chrome and Firefox anymore lol.
Play a Few rounds of it with a friend and let me know what you think. I spent more time over the past couple days trying to make sure there are no bugs or issues before I posted it so if you happen to notice anything off please let me know.
Version 1:
===========================================================================
MULTIPLE RANDOMLY SELECTED BACKGROUND AND MUSIC
HEALTH BAR
PARTICLE EXPLOSIONS
TWO PLAYER ACTION
RANDOMIZE LEVEL
===========================================================================
I plan on making a Version 2.0 some time soon getting input from my children as to what I should add and so far the consensus is that I need Missiles upgrades, Randomly placed around the level and make them Heat seeking and stronger then normal weapons. I also want a powerup system so that if someone holds the fire button it gets stronger making it a tactical move of when to fire to
encourage waiting and strategy and discourage spamming of the fire key.
I wish to add Net connection to the game to make it two player over a LAN connection and also have the option of making this a first person view which I feel would be very very cool IMO. I think I am going to add knockback as well as I think this will give a more realistic feel to the game.
___________________________________________________________________________
Coming Soon! Battle Ballz V 2.0
_____________________________________________________________________________
UPGRADES SUCH AS MISSILES
LANDMINES
NET CONNECTIONS FOR TWO PLAYER ACTION
HOLD FIRE BUTTON FOR MORE POWERFUL SHOT.
ADD KNOCKBACK
Please Give some feedback I would like to know what everyone thinks of the game, My kids seem to love it.
SOURCE CODE
Rem Project: Game
Rem Created: Monday, November 13, 2017
Rem ***** Main Source File *****
GLOBAL DEBUG = FALSE
SYNC ON:CLS 0:SYNC RATE 60
SET DISPLAY MODE 1000,800,32
COLOR BACKDROP 0,0,0
SET WINDOW POSITION 0,0
MAXIMIZE WINDOW
type Vector2
X as float
y as float
endtype
type Vector3
X as float
y as float
z as float
endtype
type Vector4
X as float
y as float
z as float
w as float
endtype
Type Physical_body
Mass as float
Friction as float
Speed as float
Angle as float
endtype
type Platform
position as vector3
Height as integer
SURFACE AS Physical_body
endtype
type player
HEALTH as integer
SCORE as integer
SPEED as float
POSITION as Vector3
VELOCITY as Vector3
FORCE AS Vector3
JUMP_FLAG as boolean
FALLING_FLAG as boolean
DELTA_TIME as float
MASS as float
endtype
type PROJECTILE
POSITION AS VECTOR3
VELOCITY AS VECTOR3
LIFE_SPAN
endtype
Dim PLAYERS(2) as player
Dim World(10) as Platform
#constant Player_1 1
#constant Player_2 2
#constant TRUE 1
#constant FALSE 0
#constant xleft = -300
#constant xright = 800
#constant ztop = 350
#constant zbottom = -420
//-------------- Physics Defines -----------------------------------------
GLOBAL GRAVITATIONAL_FORCE AS FLOAT
GLOBAL DELTA_TIME AS FLOAT
GLOBAL X_ACCELERATION AS FLOAT
GLOBAL Y_ACCELERATION AS FLOAT
GLOBAL Z_ACCELERATION AS FLOAT
GLOBAL CURRENT_TIME
GLOBAL PREVIOUS_TIME = TIMER()
//-------------- Keyboard Defines -----------------------------------------
GLOBAL SPACEKEY_SWITCH
GLOBAL LEFTKEY_SWITCH
GLOBAL RIGHTKEY_SWITCH
GLOBAL UPKEY_SWITCH
GLOBAL DOWNKEY_SWITCH
GLOBAL GLOBAL_TIMER
GLOBAL FIREKEY2_SWITCH
//-------------- Projectile Defines
#constant BULLET_OFFSET 200
GLOBAL MAX_PROJECTILES = 300
GLOBAL NUM_OF_PROJECTILES
DIM BULLETS(MAX_PROJECTILES) as PROJECTILE
//__________________LEVEL SETUP ______________________________________________________________________________________________//
#CONSTANT NUM_OF_BACKGROUNDS 5
#CONSTANT NUM_OF_MUSICS 6
GLOBAL PLAYER1WINS
GLOBAL PLAYER2WINS
GLOBAL BACK_MUSIC
GLOBAL BACK_TEXTURE
//______________________________________________________________________________________________________________________________//
// Project Creation Date: 11/13/2017
// Dependencies: SPARKY COLLISION DLL
//
//
// MAIN GAME LOOP
//______________________________________________________________________________________________________________________________//
INITIALIZE()
PLAYERS(1).JUMP_FLAG = FALSE
PLAYERS(1).VELOCITY.X = 0:PLAYERS(1).VELOCITY.Y = 0:PLAYERS(1).VELOCITY.Z = 0
SHOW SPRITE 5
SHOW SPRITE 3
SHOW SPRITE 4
while inkey$() = ""
sync
endwhile
HIDE SPRITE 3
HIDE SPRITE 4
HIDE SPRITE 5
WHILE KEYSTATE(1) = 0
// SET CURSOR SCREEN WIDTH() / 2, 10
// PRINT BACK_TEXTURE
// SET CURSOR 0,0
_INPUT_HANDLER()
_PHYSICS()
_COLLISION_HANDLER()
_UPDATE_PLAYER()
// print "Collision:";PLAYER1collision;" Frames:"; SCREEN FPS()
// PRINT "Position X:";PLAYERS(1).POSITION.X;" Y:";PLAYERS(1).POSITION.Y ; " Z:";PLAYERS(1).POSITION.Z
// PRINT "HIT:"; OBJECT COLLISION(PLAYER_1,0)
SET TEXT SIZE 60
SET TEXT FONT "POLYGON"
SET CURSOR 0, 0
PRINT PLAYER2WINS ;
if PLAYER1WINS < 10 then SET CURSOR 970, 0
if PLAYER1WINS => 10 then SET CURSOR 945, 0
PRINT PLAYER1WINS;
SET CURSOR 0,0
sync
ENDWHILE
for count = 0 to 40
DELETE IMAGE count
DELETE SOUND count
next
for count= 0 to 2000
SC_removeObject count
next
exit
function _INPUT_HANDLER()
`==================PLAYER 1============================================================================================
If spacekey() = TRUE AND PLAYERS(1).JUMP_FLAG = FALSE
SPACEKEY_SWITCH = TRUE
endif
if SPACEKEY_SWITCH = TRUE and SPACEKEY() = FALSE
SPACEKEY_SWITCH = FALSE
_FIRE_PROJECTILE(PLAYER_1)
endif
//IF KEYSTATE(50) = TRUE
// _FIRE_PROJECTILE(PLAYER_1)
// ENDIF
IF leftkey() = true
YROTATE OBJECT PLAYER_1,OBJECT ANGLE Y(PLAYER_1) - 3
endif
IF rightkey() = true
YROTATE OBJECT PLAYER_1,OBJECT ANGLE Y(PLAYER_1) + 3
endif
IF upkey() = true
MOVE OBJECT PLAYER_1,7
IF OBJECT POSITION Z(PLAYER_1) > ztop THEN POSITION OBJECT PLAYER_1, OBJECT POSITION X(PLAYER_1),OBJECT POSITION Y(PLAYER_1),ztop
IF OBJECT POSITION Z(PLAYER_1) < zbottom THEN POSITION OBJECT PLAYER_1, OBJECT POSITION X(PLAYER_1),OBJECT POSITION Y(PLAYER_1),zbottom
IF OBJECT POSITION X(PLAYER_1)> xright THEN POSITION OBJECT PLAYER_1, xright, OBJECT POSITION Y(PLAYER_1),OBJECT POSITION Z(PLAYER_1)
IF OBJECT POSITION X(PLAYER_1)< xleft THEN POSITION OBJECT PLAYER_1, xleft, OBJECT POSITION Y(PLAYER_1),OBJECT POSITION Z(PLAYER_1)
endif
IF downkey() = true
MOVE OBJECT PLAYER_1,-7
IF OBJECT POSITION Z(PLAYER_1) > ztop THEN POSITION OBJECT PLAYER_1, OBJECT POSITION X(PLAYER_1),OBJECT POSITION Y(PLAYER_1),ztop
IF OBJECT POSITION Z(PLAYER_1) < zbottom THEN POSITION OBJECT PLAYER_1, OBJECT POSITION X(PLAYER_1),OBJECT POSITION Y(PLAYER_1),zbottom
IF OBJECT POSITION X(PLAYER_1)> xright THEN POSITION OBJECT PLAYER_1, xright, OBJECT POSITION Y(PLAYER_1),OBJECT POSITION Z(PLAYER_1)
IF OBJECT POSITION X(PLAYER_1)< xleft THEN POSITION OBJECT PLAYER_1, xleft, OBJECT POSITION Y(PLAYER_1),OBJECT POSITION Z(PLAYER_1)
endif
`==================PLAYER 2============================================================================================
If KEYSTATE(33) = TRUE AND PLAYERS(2).JUMP_FLAG = FALSE ////AND PLAYERS(1).JUMP_FLAG = FALSE
FIREKEY2_SWITCH = TRUE
endif
if FIREKEY2_SWITCH = TRUE and KEYSTATE(33) = FALSE
FIREKEY2_SWITCH = FALSE //PLAYERS(1).JUMP_FLAG = TRUE
_FIRE_PROJECTILE(PLAYER_2)
endif
// IF KEYSTATE(50) = TRUE
// _FIRE_PROJECTILE(PLAYER_2)
//ENDIF
IF KEYSTATE(30) = true
YROTATE OBJECT PLAYER_2,OBJECT ANGLE Y(PLAYER_2) - 3
endif
IF KEYSTATE(32) = true
YROTATE OBJECT PLAYER_2,OBJECT ANGLE Y(PLAYER_2) + 3
endif
IF KEYSTATE(17) = true
MOVE OBJECT PLAYER_2,7
IF OBJECT POSITION Z(PLAYER_2) > ztop THEN POSITION OBJECT PLAYER_2, OBJECT POSITION X(PLAYER_2),OBJECT POSITION Y(PLAYER_2),ztop
IF OBJECT POSITION Z(PLAYER_2) < zbottom THEN POSITION OBJECT PLAYER_2, OBJECT POSITION X(PLAYER_2),OBJECT POSITION Y(PLAYER_2),zbottom
IF OBJECT POSITION X(PLAYER_2)> xright THEN POSITION OBJECT PLAYER_2, xright, OBJECT POSITION Y(PLAYER_2),OBJECT POSITION Z(PLAYER_2)
IF OBJECT POSITION X(PLAYER_2)< xleft THEN POSITION OBJECT PLAYER_2, xleft, OBJECT POSITION Y(PLAYER_2),OBJECT POSITION Z(PLAYER_2)
endif
IF KEYSTATE(31) = true
MOVE OBJECT PLAYER_2,-7
IF OBJECT POSITION Z(PLAYER_2) > ztop THEN POSITION OBJECT PLAYER_2, OBJECT POSITION X(PLAYER_2),OBJECT POSITION Y(PLAYER_2),ztop
IF OBJECT POSITION Z(PLAYER_2) < zbottom THEN POSITION OBJECT PLAYER_2, OBJECT POSITION X(PLAYER_2),OBJECT POSITION Y(PLAYER_2),zbottom
IF OBJECT POSITION X(PLAYER_2)> xright THEN POSITION OBJECT PLAYER_2, xright, OBJECT POSITION Y(PLAYER_2),OBJECT POSITION Z(PLAYER_2)
IF OBJECT POSITION X(PLAYER_2)< xleft THEN POSITION OBJECT PLAYER_2, xleft, OBJECT POSITION Y(PLAYER_2),OBJECT POSITION Z(PLAYER_2)
endif
endfunction
function _PHYSICS()
_UPDATE_PROJECTILES()
endfunction
`1.473 <--(GRAVITATIONAL_FORCE * DELTA_TIME)
function _COLLISION_HANDLER()
XPOS# = OBJECT POSITION X(PLAYER_1)
YPOS# = OBJECT POSITION Y(PLAYER_1)
ZPOS# = OBJECT POSITION Z(PLAYER_1)
HIT = OBJECT COLLISION(PLAYER_1,0)
IF HIT <> 0
DEC XPOS#, GET OBJECT COLLISION X()
DEC ZPOS#, GET OBJECT COLLISION Z()
PLAYERS(1).POSITION.X = XPOS#
PLAYERS(1).POSITION.Y = YPOS#
PLAYERS(1).POSITION.Z = ZPOS#
POSITION OBJECT PLAYER_1,XPOS#,YPOS#,ZPOS#
ENDIF
XPOS# = OBJECT POSITION X(PLAYER_2)
YPOS# = OBJECT POSITION Y(PLAYER_2)
ZPOS# = OBJECT POSITION Z(PLAYER_2)
HIT = OBJECT COLLISION(PLAYER_2,0)
IF HIT <> 0
DEC XPOS#, GET OBJECT COLLISION X()
DEC ZPOS#, GET OBJECT COLLISION Z()
PLAYERS(2).POSITION.X = XPOS#
PLAYERS(2).POSITION.Y = YPOS#
PLAYERS(2).POSITION.Z = ZPOS#
POSITION OBJECT PLAYER_2,XPOS#,YPOS#,ZPOS#
ENDIF
endfunction
function INITIALIZE()
SET GLOBAL COLLISION ON
DRAW SPRITES LAST
LOAD SOUND "FIRE.WAV",1
LOAD SOUND "HIT.WAV",2
LOAD SOUND "DEAD.WAV",3
LOAD SOUND "MUSIC.WAV",4
LOAD SOUND "TECH.WAV",5
LOAD SOUND "RETRO.WAV",6
LOAD SOUND "LOOP.WAV",7
LOAD SOUND "LOOP2.WAV",8
LOAD SOUND "RAVE.WAV",9
BACK_MUSIC = RND(NUM_OF_MUSICS -1) + 4
LOOP SOUND BACK_MUSIC
LOAD IMAGE "player1.bmp",2
LOAD IMAGE "LAVAPAR.bmp",4
LOAD IMAGE "DEAD.BMP",9
LOAD IMAGE "LAVAPAR.BMP",10
LOAD IMAGE "HEALTH.BMP",11
LOAD IMAGE "splash.png",12
LOAD IMAGE "presskey.bmp",13
LOAD IMAGE "ball.png",14
LOAD IMAGE "BLUEG.BMP",15
LOAD IMAGE "PURPLEG.BMP",16
LOAD IMAGE "GREENG.BMP",17
LOAD IMAGE "RAINBOW.BMP",18
LOAD IMAGE "WALL2.bmp",19
LOAD IMAGE "P1DEAD.BMP",30
LOAD IMAGE "P2DEAD.BMP",31
SPRITE 1, 250,500,9
SPRITE 2, 0,750,11
sprite 3,0,0,12
sprite 4,395,570,13
sprite 5,700,75,14
SPRITE 6,200,300,30
SPRITE 7,200,300,31
HIDE SPRITE 6
HIDE SPRITE 7
SHOW SPRITE 2:HIDE SPRITE 1
MAKE_LEVEL()
SET AMBIENT LIGHT 80:COLOR AMBIENT LIGHT RGB(255,255,255)
SET LIGHT RANGE 0,1000
POSITION LIGHT 0,650,10,0
COLOR LIGHT 0,RGB(0,0,255)
SET DIRECTIONAL LIGHT 0,90,90,90
AUTOCAM OFF
GLOBAL_TIMER = TIMER()
GRAVITATIONAL_FORCE = .1
POSITION CAMERA 250,800,-50
POINT CAMERA 250,0,-50
PLAYERS(1).HEALTH = 100: PLAYERS(2).HEALTH = 100
`==================PLAYER 1============================================================================================
MAKE OBJECT sphere PLAYER_1,30
TEXTURE OBJECT PLAYER_1, 2
MAKE OBJECT CYLINDER 1000,10
SET OBJECT CULL 1000,1
XROTATE OBJECT 1000,90
FIX OBJECT PIVOT 1000
ZROTATE OBJECT 1000,90
MAKE MESH FROM object 1,1000
ADD LIMB PLAYER_1,1,1
OFFSET LIMB PLAYER_1,1, 0,0,15
DELETE OBJECT 1000
`==================PLAYER 2============================================================================================
MAKE OBJECT sphere PLAYER_2,30 //,26,26
TEXTURE OBJECT PLAYER_2, 2
MAKE OBJECT CYLINDER 1000,10
SET OBJECT CULL 1000,1
XROTATE OBJECT 1000,90
FIX OBJECT PIVOT 1000
ZROTATE OBJECT 1000,90
XROTATE OBJECT PLAYER_2,180
MAKE MESH FROM object 1,1000
ADD LIMB PLAYER_2,1,1
OFFSET LIMB PLAYER_2,1, 0,0,15
DELETE OBJECT 1000
`=======================================================================================================================
POSITION OBJECT PLAYER_1,xleft,100,0
POSITION OBJECT PLAYER_2,xright,100,0
endfunction
function MAKE_LEVEL()
BACK_TEXTURE = RND(NUM_OF_BACKGROUNDS -1) + 15
for count = 0 to 10
WORLD(count).position.x = (xleft + 100) + rnd(xright - 100)
WORLD(count).position.y = 40
WORLD(count).position.z = (ztop) - rnd(screen height())
WORLD(count).Height = 150
WORLD(10).Height = 150
WORLD(0).Height = 150
MAKE OBJECT cube count + 3,100
POSITION OBJECT count + 3,WORLD(count).position.x,100,WORLD(count).position.z
SET OBJECT TEXTURE count + 3, 0, 0, 0
TEXTURE OBJECT count + 3, BACK_TEXTURE
sc_setupobject count + 3, 0, 2
NEXT
MAKE OBJECT PLANE 999,1200,1000
POSITION OBJECT 999,250,50,-100
TEXTURE OBJECT 999,BACK_TEXTURE
XROTATE OBJECT 999,90
SC_SETUPOBJECT 999,0,1
endfunction
function _UPDATE_PROJECTILES()
for count = 0 to MAX_PROJECTILES - 1
IF OBJECT EXIST(COUNT + BULLET_OFFSET) = 1
OLDX# = BULLETS(count).POSITION.X
OLDY# = BULLETS(count).POSITION.Y
OLDZ# = BULLETS(count).POSITION.Z
BULLETS(count).POSITION.X = OLDX# + (BULLETS(count).VELOCITY.X * .1)
BULLETS(count).POSITION.Y = OLDY# + (BULLETS(count).VELOCITY.Y * .1)
BULLETS(count).POSITION.Z = OLDZ# + (BULLETS(count).VELOCITY.Z * .1)
INC BULLETS(count).LIFE_SPAN
MOVE OBJECT count + BULLET_OFFSET,10
HIT = OBJECT COLLISION(count + BULLET_OFFSET,0)
IF HIT <> 0
HIDE OBJECT count + BULLET_OFFSET
SET OBJECT COLLISION OFF count + BULLET_OFFSET
ENDIF
IF HIT = 1
PLAY SOUND 2
DEC PLAYERS(1).HEALTH,5
HIDE OBJECT count + BULLET_OFFSET
IF PLAYERS(1).HEALTH =<0 THEN _PLAYER_DEAD(PLAYER_1)
ENDIF
IF HIT = 2
PLAY SOUND 2
DEC PLAYERS(2).HEALTH,5
HIDE OBJECT count + BULLET_OFFSET
IF PLAYERS(2).HEALTH =<0 THEN _PLAYER_DEAD(PLAYER_2)
ENDIF
IF BULLETS(count).LIFE_SPAN > 100
DELETE OBJECT count + BULLET_OFFSET
BULLETS(count).LIFE_SPAN= 0
DEC NUM_OF_PROJECTILES
endif
endif
next
endfunction 1
function _FIRE_PROJECTILE(PLAYER)
PLAY SOUND 1
COUNT = BULLET_OFFSET
while object exist(count) = 1
inc count
endwhile
IF COUNT - BULLET_OFFSET > MAX_PROJECTILES THEN EXITFUNCTION
MAKE OBJECT SPHERE COUNT,5
color object count, rgb(0,255,0)
ROTATE OBJECT COUNT, OBJECT ANGLE X(PLAYER) ,OBJECT ANGLE Y(PLAYER),OBJECT ANGLE Z(PLAYER)
POSITION OBJECT COUNT, OBJECT POSITION X(PLAYER),100,OBJECT POSITION Z(PLAYER)
MOVE OBJECT COUNT, 25
DEC count,BULLET_OFFSET
BULLETS(count).VELOCITY.X = 5
OLDX# = BULLETS(count).POSITION.X
OLDY# = BULLETS(count).POSITION.Y
OLDZ# = BULLETS(count).POSITION.Z
BULLETS(count).POSITION.X = OLDX# + (BULLETS(count).VELOCITY.X * .1)
BULLETS(count).POSITION.Y = OLDY# + (BULLETS(count).VELOCITY.Y * .1)
BULLETS(count).POSITION.Z = OLDZ# + (BULLETS(count).VELOCITY.Z * .1)
MOVE OBJECT count + BULLET_OFFSET,1
SET OBJECT COLLISION ON count + BULLET_OFFSET
endfunction 1
function _PLAYER_DEAD(PLAYERS AS INTEGER)
DRAW SPRITES LAST
PLAY SOUND 3
HIDE OBJECT PLAYERS
IF PLAYERS = 1 THEN SHOW SPRITE 6
IF PLAYERS = 2 THEN SHOW SPRITE 7
IF PLAYERS = 1 THEN INC PLAYER1WINS
IF PLAYERS = 2 THEN INC PLAYER2WINS
//============= RESET ALL THE PROJECTILES ======================================================================
FOR COUNT = 0 TO MAX_PROJECTILES
BULLETS(count).POSITION.X = 0
BULLETS(count).POSITION.Y = 0
BULLETS(count).POSITION.Z = 0
IF OBJECT EXIST (COUNT + BULLET_OFFSET) = 1
POSITION OBJECT (COUNT + BULLET_OFFSET),1000,1000,1000
ENDIF
NEXT
//==============================================================================================================
//====================== SHORT LOOP SO PARTICLES DISPLAY CORRECTLY =============================================
MAKE PARTICLES 1,10,100,100
POSITION PARTICLES 1, OBJECT POSITION X(PLAYERS), OBJECT POSITION Y(PLAYERS), OBJECT POSITION Z(PLAYERS)
FOR G = 0 TO 400
SET CURSOR SCREEN WIDTH() / 2 - 180,SCREEN HEIGHT() / 2
SYNC
NEXT
//==============================================================================================================
WAIT 100
DELETE PARTICLES 1
//==============================================================================================================
//====================== RANDOMIZE THE BACKGROUND + MUSIC =====================================================
BACK_TEXTURE = RND(NUM_OF_BACKGROUNDS -1) + 15
// for count = 0 to 4
// TEXTURE OBJECT COUNT + 3,BACK_TEXTURE
// NEXT
TEXTURE OBJECT 999,BACK_TEXTURE
STOP SOUND BACK_MUSIC
BACK_MUSIC = RND(NUM_OF_MUSICS - 1) + 4
LOOP SOUND BACK_MUSIC
for count = 0 to 10
WORLD(count).position.x = (xleft + 100) + rnd(xright - 100)
WORLD(count).position.z = (ztop) - rnd(screen height())
POSITION OBJECT count + 3,WORLD(count).position.x,100,WORLD(count).position.z
TEXTURE OBJECT count + 3, BACK_TEXTURE
NEXT
//====================RESET PLAYER POSITION AND HEALTH ==========================================================
PLAYERS(1).HEALTH = 100
PLAYERS(2).HEALTH = 100
POSITION OBJECT PLAYER_1,xleft,100,0
POSITION OBJECT PLAYER_2,xright,100,0
SHOW OBJECT PLAYERS
SET TEXT SIZE 20
HIDE SPRITE 6
HIDE SPRITE 7
ENDFUNCTION
function _UPDATE_PLAYER()
PLAYERS(1).POSITION.X = OBJECT POSITION X(PLAYER_1):PLAYERS(1).POSITION.Y = OBJECT POSITION Y(PLAYER_1):PLAYERS(1).POSITION.Z = OBJECT POSITION Z(PLAYER_1)
PLAYERS(2).POSITION.X = OBJECT POSITION X(PLAYER_2):PLAYERS(2).POSITION.Y = OBJECT POSITION Y(PLAYER_2):PLAYERS(2).POSITION.Z = OBJECT POSITION Z(PLAYER_2)
POSITION OBJECT PLAYER_1,PLAYERS(1).POSITION.X, PLAYERS(1).POSITION.Y, PLAYERS(1).POSITION.Z
POSITION OBJECT PLAYER_2,PLAYERS(2).POSITION.X, PLAYERS(2).POSITION.Y, PLAYERS(2).POSITION.Z
INK RGB(255,0,0):BOX 0,SCREEN HEIGHT() - 30,200,SCREEN HEIGHT() -10
INK RGB(255,0,0):BOX SCREEN WIDTH() -200, SCREEN HEIGHT() - 30,SCREEN WIDTH() ,SCREEN HEIGHT() - 10
INK RGB(0,255,0):BOX 0,SCREEN HEIGHT() - 30 ,(PLAYERS(1).HEALTH*2),SCREEN HEIGHT() - 10
INK RGB(0,255,0):BOX SCREEN WIDTH() - (PLAYERS(2).HEALTH*2),SCREEN HEIGHT() - 30,SCREEN WIDTH() ,SCREEN HEIGHT() - 10
endfunction
DOWNLOAD IS 2 POST DOWN, It Keeps Saying Its Already Attached to This Post.
PLAYER 1
ARROW KEYS AND SPACE TO FIRE
PLAYER 2
AWSD and F for fire