-
hello,
im working on a space invaders game. i have it so your the ship. and you shoot the enemies and they blow up.
the enemies are images and when you hit them their picture changes to a blown up skull.
i need to know how to have the laser shoot past them once they've been hit. because the picture is black and the laser
just stops on the blackness. so i need to know how to get the laser to just go by. any ideas?
-
hello again,
well, i figured it out. if anyone wants to know ill tell them. but i have another problem. acutally, two.
#1. how do i get the laser(an image) to go in front of a picture box?
#2. would anyone be willing to compile my game? i can't because i have the lowly learners edition and don't know where to get the standard or professional .
-well thanks
-
Images are drawn directly on the form so you will never get it over your picturebox. Either you could use 2 images or 2 pictureboxes or draw directly on the form
-
I'll compile it if you need.
-
hey,
cool, ill e-mail you when i get it in a winzip file.
-thanks
-
hey,
i got it into a winzip file.
just follow this link. and thanks again.
http://www.genevaonline.com/~dewolf/Space Invaders.zip
-thanks
-t_dawolf
-
nice,
just instead of using the full path of the images that arent on my computer, do this
Code:
EnemyR1(4).Picture = LoadPicture(App.Path & "\Baddie Blows Up.bmp")
your orig code was this
Code:
EnemyR1(4).Picture = LoadPicture("c:\windows\my documents\my own games\space invadors\Baddie Blows Up.bmp")
or something similar...
other than that, pretty good game.
-
also, you should use some bitblt...
timers and stuff like that are slow.
bitblt is faster.
john has a good bitblt example here
http://vb-world.net/graphics/lander/
-
Or use DirectDraw (i think that's the name of the function).
-
I dont know how to use Ddraw.
and I dont have it... I have the 6.1 sdk, but I dont know how to even add it as a referance to my projects :(
till I get the latest one, and learn how to use it, I think I will stick with bitblt.
:D
-
I can recommend this site for you. It has a lot about VB and DirectX, plus there are a bunch of links leading to other great VB-DirectX sites.
http://www.cason.addr.com
-
cool,
im glad you think the game is all right. so can you compile it for me and put up a link so i can see what its like when its not running under vb? thanks
-thanks
-