Pizzaman,
Hey there. I don't know how to thank you for the recoding, I'm going ot study it, and see if I can use your code as a template for my code, that way I can really build on your method, as I'm so new to this I don't really have a method

. Yeah, I plan on making the shooter into about 10 levels, with at least 3 "Bosses", power-ups, and minor enemy A.I. . I figure it'll teach me a lot if I can pull it off, maybe even if I can't.

At the same time, yes, it is a "stress test" to see my bounds in DBC, and to get a feel for syntax and structure.
I'll look into that animation routine, that really sounds like a good way to go.
Also on another note: While that project has been in limbo, I decided to go to codebase and get a 2D Pong and spice it up a bit. I've added it's "AI" routine, not much but it works, some sound effects, a system of levels, and increasing difficulty each level. I'll attach the code in case anyone cares to look it over, for critique or whatnot.
sync on
sync rate 35
hide mouse
rem 2D pong tutorial
Load sound "boing_x.wav", 1
ink rgb(255,0,0),rgb(0,0,0)
rem Draw a box(paddle) to screen
Box 1,1,10,50
rem Grab the box and place it into an image slot
get image 1,1,1,10,50
rem Clear the screen
Cls
rem Draw a circle (the ball) to screen
Circle 5,5,5
rem Grab circle and make it into an image slot
Get image 2,0,0,15,15
rem clear the screen again
cls
rem Now that we've created the player objects, we have to setup the variables needed for player and ball
Dim player_x(2)
Dim player_y(2)
player_x(1) = 30
player_x(2) = 600
player_y(1) = 240
player_y(2) = 240
rem this makes player positions at 30x X 240y for player 1 and 600x X 240y for player 2
rem setup the array for player 1 score and player 2 score
Dim Player_score(2)
rem set ball x and ball y to the center of the screen
ball_x=320
ball_y=240
rem set ball speed to 5. At each loop, the ball will move in whatever direction 2pixels at a time
ball_speed = 6
rem Set the direction variables
ballx_dir = 0
bally_dir = 0
rem get a random number between 1 and 0 for each of the axis
random_direction_x = Rnd(1)
random_direction_y = Rnd(1)
ballx_dir = random_direction_x
bally_dir = random_direction_y
rem set the text to opaque so text erases itself when written over
Set Text Opaque
rem Print the words Player One Score in the left top corner
rem Print the words Player Two Score in the top right corner
ink rgb(255,255,255),rgb(0,0,0)
Text 1,1, "Player 1 Score: "
Text 500,1, "Player 2 Score: "
rem begin the game loop
DO
rem Player Control
If Keystate(17)=1 then player_y(1) = player_y(1) -10
If Keystate(31)=1 then player_y(1) = player_y(1) +10
If upkey() = 1 then player_y(2) = player_y(2) -10
If downkey() = 1 then player_y(2) = player_y(2) +10
If upkey()=0
If Downkey()=0
if player_y(2)<ball_y+rnd(5)
player_y(2)=player_y(2)+rnd(13)
endif
If player_y(2)>ball_y+rnd(5)
player_y(2)=player_y(2)-rnd(13)
endif
endif
endif
rem This, much simpler code is my New AI routine, although I feel that with a bit more tweaking, the other
rem routine(remarked below) could be more sophisticated. I just don't know how much more or if it'd be worth it
rem but it's something I may look into.
if ball_x >320
if ball_y<80
if player_y(2)>80
player_y(2) = player_y(2)-10
rem if player_y(2)<80 this was making him a bit "too smart" heh
if player_y(2)>ball_y
player_y(2) = player_y(2)+10
rem endif
endif
rem If player_y(2)<240
rem player_y(2) = player_y(2)-10
rem endif
endif
endif
endif
rem This was my first AI routine, but it left player 2 a little...dimwitted, so I experimented with other options.
rem If player_y(2)=ball_y
rem player_y(2) = player_y(2)
rem endif
remstart
If ball_x >320
If ball_y>80
If ball_y<160
player_y(2) = player_y(2)-10
endif
endif
endif
If ball_x>320
if ball_y>160
if ball_y<240
player_y(2) = Player_y(2) -10
endif
endif
endif
If ball_x>320
if ball_y>240
if ball_y<360
player_y(2)=player_y(2) +10
endif
endif
endif
If ball_x>320
if ball_y>360
if ball_y<=450
player_y(2)=player_y(2)+10
endif
endif
endif
remend
rem Now check for directions and move the ball in that direction.
If ballx_dir = 0 then dec ball_x, ball_speed
If ballx_dir = 1 then inc ball_x, ball_speed
if bally_dir = 0 then dec ball_y, ball_speed
If bally_dir = 1 then inc ball_y, ball_speed
Rem Now check if the ball is on an edge of the screen and if so switch it's direction
rem if ball goes off the screen to the left increase player 2's score
rem set throw_ball to 1 in order to make a new throw ball event.
If ball_x <1 then player_score(2) = player_score(2)+1 : Text 500,1, "Player Two Score: " +STR$(player_score(2)) : throw_ball = 1 : Delete sprite 3
Rem if ball goes off the screen to the right then increase player 1's score
rem setup new throw ball event.
If ball_x > 635 then player_score(1) = player_score(1)+1 : Text 1,1, "Player One Score: " +STR$(player_score(1)) : throw_ball = 1 : Delete sprite 3
If ball_y < 1 then bally_dir = 1
If ball_y > 475 then bally_dir = 0
rem make sure the two paddles don't go off the screen
rem to do this, a for next loop from 1 to 2 will check both player paddles
For check_y_pos = 1 to 2
If player_y(check_y_pos) < 1 then player_y(check_y_pos) =1
If Player_y(check_y_pos) > 430 then player_y(check_y_pos) = 430
Next check_y_pos
rem Now we place the paddles and ball on the screen
rem if the ball or paddles exsist already, move them to their new locations
Sprite 3, ball_x,ball_y,2
Sprite 1, Player_x(1),Player_y(1),1
Sprite 2, Player_x(2),Player_y(2),1
rem now we check to see if the ball has hit a paddle, for this we use the sprite hit
rem type of collision detection
For check_collision = 1 TO 2
If Sprite Hit(check_collision, 3) = 1
Play sound 1
If check_collision = 1 then ballx_dir = 1
If check_collision = 2 then ballx_dir = 0
Endif
Next check_collision
rem If we throw the ball, pause for 1 second to let players see what's going on.
If throw_ball =1
Sleep 200
rem set ball_x to middle of the screen
rem set ball_y to middle of the screen
ball_x = 320
ball_y = 240
rem set movement on the x and y axis either right or left
ballx_dir =rnd(1)
bally_dir =rnd(1)
rem then set throw_ball to 0 so it won't trigger again until it's needed
throw_ball=0
Endif
rem These are the level routines that I made below:
rem Level 2
If player_score(1)=15
cls
Center Text 320,420, "LEVEL 2 BEGINS!!!!!!!!!!"
rem player_score(2)=0
wait 1100
cls
player_score(1)=16
Text 1,1, "Player 1 Score :" +STR$(player_score(1))
Text 500,1,"Player 2 Score:" +STR$(player_score(2))
wait 1000
sync rate 40
endif
rem Level 3
If player_score(1)=31
cls
Center Text 320,420, "Level 3 Begins!!!!!!"
wait 1100
cls
player_score(1)=32
text 1,1, "Player 1 Score :" +STR$(player_score(1))
Text 500,1, "Player 2 Score:" +STR$(player_score(2))
wait 1000
sync rate 50
endif
rem Level 4
If player_score(1)=50
cls
Center Text 320,420, "Level 4 Begins!!!!!!"
wait 1100
cls
player_score(1)=51
text 1,1, "Player 1 Score :" +STR$(player_score(1))
Text 500,1, "Player 2 Score:" +STR$(player_score(2))
wait 1000
sync rate 60
endif
rem Beat the game!
If player_score(1)>=60
cls
Center Text 320,420, "You've Beaten The Game!, Very good!"
Player_score(1)=60
wait 1500
exit
endif
rem refresh the screen and then loop the game to beginning
sync
loop
Want to make a background for it, change the paddles to something better(texture them or something), maybe refine the A.I. if it's in my ability, but it was really good for [learning] some things.
Thanks for all the help and all your time spent on this, I'll be working on it later this evening. *crosses fingers*
Xatnys
Hello.
Goodbye.
