|
-
Oct 2nd, 2000, 04:41 PM
#1
Thread Starter
New Member
I need some help with this. I am making a shoot'em up game you know where the guy you control is at the bottom shooting guys from the top, well I was woundering how to make the enemies come down and when I shoot them they die if anyone could help me with the guys coming down I would like it very much.
-
Oct 2nd, 2000, 05:34 PM
#2
Frenzied Member
Sounds easy, but to help me I need to know how you draw the enemys?
U use bitblt or similar? Just set vars for the coordinates na dlet them move in a loop!
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 2nd, 2000, 05:34 PM
#3
Frenzied Member
like this?
Code:
imgEnemy.top = imgEnemy.top + 40
'change the interval to change the speed
-
Oct 2nd, 2000, 07:02 PM
#4
Frenzied Member
Yes? But it sounds like you are using picture boxes to display the enemys! (of course it coul also be a type, or a rect(where you'd need to change the bottom =bottom+40 too))
Don't use pictureboxes and moving them around.
DDraw rulez, but Bitblt does a good job in most cases, too.
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 2nd, 2000, 08:48 PM
#5
Addicted Member
Picture boxes are EVIL!!....uh.. hi. I made a shooter game befoure. not too difficult and good for beginnerz. Artificial Intelligence codez are merely storing info in variables and then using BitBlt to put them on the screen. You could create a new type to store X and Y for the enemy position then make a variable array for each of the enemy ships. I did something like this:
Type Enemy
X As Integer
Y As Integer
End Type
Dim EnemyShipArray(9) As Enemy
Private Sub YourGameLoop
For MoveShips = 0 To 9
EnemyShipArray(MoveShips).X = EnemyShipArray(9).X - 5
EnemyShipArray(MoveShips).Y = EnemyShipArray(9).Y - 3
Next MoveShips
End Sub
And then of course you can use another For loop to paint them all.
BTW, how do you peoplez post segments of code on here and make it look all neat n stuff!?
To understand recursion, one must first understand the concept of recursion.
-
Oct 3rd, 2000, 12:11 AM
#6
PowerPoster
Jep DarkMoose,
Don't use Timers, Images, and not more than 1 picturebox per game. (PicBoxes are nice if you need a frame control.. and the Frame sux )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|