Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Collision and Jump help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dark_Lord
Squire

12 Posts

Posted - Jun 03 2006 :  12:44:07 PM  Show Profile  Reply with Quote
Hey Everyone, I'v started a practice game just to get used to bltbit and i have having some problems.
I would be thankful of you guys if you please help with collision detection and jump of a better kind, maybe like mario.

here are the pics for which i want the collisions detection. The whole level is only one pic. I mean the area where he places his feet.

Download Attachment: HELP.jpg
24.56 KB

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jun 03 2006 :  2:39:43 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
well, what's your problem?

Go to Top of Page

Dark_Lord
Squire

12 Posts

Posted - Jun 03 2006 :  11:50:48 PM  Show Profile  Reply with Quote
please look at the pic eric. I want to add collision detection to the walls and player and some good code for making the player jump up.

Thanks
Go to Top of Page

Dark_Lord
Squire

12 Posts

Posted - Jun 03 2006 :  11:53:54 PM  Show Profile  Reply with Quote
i have made a code for jump. i first tried the keyup and keydown codes then i added it through timer. Both doesn't give me good results.
Go to Top of Page

PW7962
Squire

USA
33 Posts

Posted - Jun 06 2006 :  2:29:19 PM  Show Profile  Visit PW7962's Homepage  Send PW7962 an AOL message  Reply with Quote
If you give me the code then I think I could help you out, but the way you are doing the background looks a little weird.

Star Fantasy Unlimited Programmer

http://starfantasy.forumer.com
Go to Top of Page

Dark_Lord
Squire

12 Posts

Posted - Jun 10 2006 :  09:41:51 AM  Show Profile  Reply with Quote
here it is PW

Download Attachment: gametry.zip
45.93 KB
Go to Top of Page

Walrus
Squire

Slovenia
34 Posts

Posted - Jun 10 2006 :  2:06:42 PM  Show Profile  Reply with Quote
Have a look at this simple program, Dark_Lord. Nothing exciting - it draws a small rectangle that jumps when you press the UP key -, but hopefully it will give you some ideas for your game. I didn't comment the code, but if you have any questions, just ask.

Download Attachment: JumpGame.zip
2.16 KB

Go to Top of Page

Dark_Lord
Squire

12 Posts

Posted - Jun 11 2006 :  01:18:38 AM  Show Profile  Reply with Quote
thanks walrus for reply and the program. I am having trouble with detection of collision. I know the code required for it but the problem is that i am using the whole level as one image. I dont know how it goes. Do we use different PictureBoxes for such stuffs.
If you guys know any good tutorials on vbgaming, Please help me out

Thanks
Go to Top of Page

PW7962
Squire

USA
33 Posts

Posted - Jun 11 2006 :  7:29:28 PM  Show Profile  Visit PW7962's Homepage  Send PW7962 an AOL message  Reply with Quote
What I was trying to use was intersectrect and then having each rectangle on the map checked with the player to look for collision but I kinda have trouble with this problem in my game, except that using intersectrect would take a while to check for a lot of walls. I'll tell you if it works for me or not, but right now I think it is better than what you have before...

Star Fantasy Unlimited Programmer

http://starfantasy.forumer.com
Go to Top of Page

Dark_Lord
Squire

12 Posts

Posted - Jun 13 2006 :  02:59:40 AM  Show Profile  Reply with Quote
PW i dont understand what you want to say. The problem is I am using one whole image for the level. i am trying to learn tiling though. I dont have any rectangles in there.

Regards
Go to Top of Page

Walrus
Squire

Slovenia
34 Posts

Posted - Jun 13 2006 :  09:09:40 AM  Show Profile  Reply with Quote
Perhaps this modified version of my code can help you. It uses the Point method to check if a pixel is black or not. The collision detection this code does is very limited(you'll probably see that if you change the level), but it's just there to give you the basic idea.

Download Attachment: JumpGame2.zip
2.88 KB
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.