Collision detection

ofahad
06-21-2001, 02:46 PM
Hello everyone. I am basically new to Visual Basic programming. But I am making a 2d adventure game. I have currently made an image which moves by pressing the direction keys. I am using Image.left if keypressed is left etc....

I want to collide this image with other images (e.g blocks) so that it doesnt get thru them. Please help. I would appreciate as much detail as possible.

Defiance
06-21-2001, 03:05 PM
I remember seeing an example like this at

www.planetsourcecode.com

maybe it can help you. Look in the game programming section for code downloads, and search for collission.

--Defiance



"Soon I will answer your questions, now you will answer mine..."<P ID="edit"><FONT class="small"><EM>Edited by Defiance on 06/21/01 04:06 PM.</EM></FONT></P>

ofahad
06-21-2001, 03:17 PM
Thanx for the quick reply. I am checking the website now. Can you also tell me how to disappear the background of the bitmap or any picture I load in my imagebox. So that the image is cut to the shape of the character not in the shape of a rectangle.

one other question. Y is everyone using picturebox instead of image? I have written the keypress code on form_load and only the image seems to be moving not the picture box. Which is why I am using image. Can u give a solution where I can move the picture box on form_load. Or where else can I write the keypress code.

Defiance
06-21-2001, 04:19 PM
I agree, I also use the Image control, I've never before had to use the Picture Box, one of the main reasons being it can't resize the picture the the Stretch property of the Image control. If you mean, by the top paragraph, making the background image of a picture see through, you need a painting program such as Paint Shop Pro 7.0 . It can make the background, or selected color in a painting, clear so you can see what's behind it. You can download a trial version for 30 days at http://www.jasc.com

--Defiance



"Soon I will answer your questions, now you will answer mine..."

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum