Hi, I've just bought the DarkGAME Studio for $50. My intention after buying it was to be able to make my own first person shooter. I've searched on the internet for tutorials, but nothing came up. It would be great if someone could give me a tutorial on making one...
I've already made a REALLY simple first person shooter, and here it is:
`********************
`***My first FPS!!***
`********************
`Created by 3than
`Project was begun at 9:15pm, 6/10/2011
sync on
sync rate 0
hide mouse
`Load a texture
load image "grasstexture.bmp", 2
`Our main character
make object sphere 1, 50
position object 1, 0, 5, 0
color object 1, RGB(0, 255, 0)
`An enemy
make object sphere 2, 50
color object 2, RGB(255, 0, 0)
position object 2, 130, 0, 0
`a wall
make object box 3, 500, 400, 10
position object 3, 0, 0, 150
`make a limb attached to the player
make object triangle 9999, 0, 0, 0, 0, 0, 0, 0, 0, 0
make mesh from object 1, 9999
delete object 9999
add limb 1, 1, 1
offset limb 1, 1, 0, 0, 500
hide limb 1, 1
`add more limbs for collision
add limb 1, 2, 1
offset limb 1, 2, 0, 0, object size z(1) /2
hide limb 1, 2
add limb 1, 3, 1
offset limb 1, 3, 0, 0, -object size z(1) /2
hide limb 1, 3
add limb 1, 4, 1
offset limb 1, 4, 0, 0, object size x(1) /2
hide limb 1, 4
add limb 1, 5, 1
offset limb 1, 5, 0, 0, -object size x(1) /2
hide limb 1, 5
`make the ground
make object plain 5, 1000, 1000
xrotate object 5, 90
texture object 5, 2
`Make some health and ammo
ENEMYHP = 5000
AMMO = 800
MAXAMMO = 800
`Screen width and height variables
SWIDTH# = screen width()
SHEIGHT# = screen height()
`The "Main loop"
do
`position the mouse on the middle of the screen
position mouse SWIDTH# /2, SHEIGHT# /2
`Show the FPS on the screen
FPS = screen fps()
text 0, 0, "FPS: " + str$(FPS)
`Set some variables for the player's position
X# = object position x(1)
Y# = object position y(1)
Z# = object position z(1)
`position the camera
position camera X#, Y#, Z#
`controls for the player
if keystate(17) = 1
XANGLE# = object angle x(1)
xrotate object 1, 0
move object 1, 0.5
xrotate object 1, XANGLE#
endif
if keystate(31) = 1
XANGLE# = object angle x(1)
xrotate object 1, 0
move object 1, -0.5
xrotate object 1, XANGLE#
endif
if keystate(30) = 1 then move object left 1, 0.3
if keystate(32) = 1 then move object right 1, 0.3
`If the space key is pressed, jump!
if spacekey() = 1 and JUMPING = 0 then JUMP = 1
if JUMP = 1
JUMPSPEED# = 0.5
JUMPING = 1
JUMP = 0
endif
if JUMPING = 1
dec JUMPSPEED#, 0.001
position object 1, X# ,Y# + JUMPSPEED#, Z#
endif
`Control the camera using the mouse and prevent the camera from flipping all the way around
CAMY# = CAMY# + mousemovex() * 0.1
CAMX# = CAMX# + mousemovey() * 0.1
if CAMX# > 90 and CAMX#<135 then CAMX# = 90
if CAMX# > 270 and CAMX#<225 then CAMX# = 90
yrotate camera CAMY#
xrotate camera CAMX#
yrotate object 1, CAMY#
xrotate object 1, CAMX#
`if the user clicked the left mouse button, then...
if mouseclick()=1
`if the ammount of ammo you have is larger than 0 then...
if AMMO > 0
`decrease your amount of ammo by 1
dec AMMO, 1
endif
`if the enemy exists then...
if object exist(2) = 1
`if you're ammo is more than 0 then...
if AMMO > 0
`if the player's bullet has hit the enemy then...
if intersect object (2, limb position x(1, 1), limb position y(1, 1), limb position z(1, 1), X#, Y#, Z#)>0
`decrease the opponent's health by 1
dec ENEMYHP, 1
endif
endif
endif
endif
`if the enemy has no health...
if ENEMYHP = 0
`if the enemy exists...
if object exist(2) = 1
`kill(delete) the enemy
delete object 2
endif
endif
`Show the enemy's health above him
if object exist(2)=1
center text object screen X(2), object screen y(2) - 70, "Enemy Health: " + str$ (ENEMYHP)
endif
`press R to reload
if keystate(19) = 1 and AMMO = 0 then AMMO = MAXAMMO
`show your ammo on the screen
text 0, SHEIGHT# - 50, "Ammo: " + str$ (AMMO)
circle SWIDTH# /2, SHEIGHT# /2, 10
line SWIDTH# /2 + 15, SHEIGHT# /2, SWIDTH# /2 - 15, SHEIGHT# /2
line SWIDTH# /2, SHEIGHT# /2 + 15, SWIDTH# /2, SHEIGHT# /2 - 15
`make collision for the player and the ground
if intersect object (5, X#, (Y# - object size y(1) /2), Z#, X#, Y#, Z#) > 0
JUMPING = 0
else
if JUMPING = 0
JUMPING = 1
endif
endif
`make collision for the player using the limb created earlier
if intersect object (3, limb position x(1, 2), limb position y(1, 2), limb position z(1, 2), X#, Y#, Z#)
move object 1,-1
endif
if intersect object (3, limb position x(1, 3), limb position y(1, 3), limb position z(1, 3), X#, Y#, Z#)
move object 1, 1
endif
if intersect object (3, limb position x(1, 4), limb position y(1, 4), limb position z(1, 4), X#, Y#, Z#)
move object left 1, 1
endif
if intersect object (3, limb position x(1, 5), limb position y(1, 5), limb position z(1, 5), X#, Y#, Z#)
move object right 1, 1
endif
`update the screen
sync
loop
`Project completed at 6:23pm, 7/10/2011
Here's what I want answered

. How I can make a sprite be clicked on
. How I can cut off bits of an image(in this case, I want to cut off the white section of an image of a gun so you can only see the gun, and not the white background)
. Where I can download .X models of maps (or levels) to set my first person shooter in
. How to set collision for every single part of the model(Making limbs around the object is too much work)
. How I can make multiple DO and LOOP statements(for example, one loop would be for the main menu, and another could be for the actual gameplay)
. How I could enhance my game with Dark Physics(You don't have to answer that if you don't have dark physics)
. How I could enhance my game with Dark AI(don't answer if you don't have it)
I really want to make a First Person Shooter, and that's the main reason I got Dark Basic Pro. I know, I know, you're probably thinking "Well, then why didn't you get FPS Creator?" I don't like clicking together my games, I prefer coding them.
Any help would be greatly appreciated
*EDIT
I want a place to be able to download .X maps because I don't have any programs to make a map myself.