MIDP 2.0 collision detection???

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

MIDP 2.0 collision detection???

Postby f4j4r » Mon Aug 06, 2007 4:29 pm

Hi everyone.... I am new here.
I have a problem about collision detection in midp 2.
How can I detect the collison between sprites if I have more then 2 sprites ?
Please... give me the explaination.... :cry:
Thanks a lot ...

my best regards,


Fajr
f4j4r
 
Posts: 1
Joined: Mon Aug 06, 2007 4:10 pm

Postby DevelopmentTeam » Tue Aug 07, 2007 3:29 am

For collision detection I mostly use the old school method where we check 4 corners of each object. To be bit detail, check each corner of the object if it lies within the 4 corners of the other object. There is one class in game.* in MIDP 2 which is not worth using when compared to the old school method. For most of the platform games this method will be very much worth. I would recomend this if it is a simple game. In case you have furthur doubts in applying this please post you doubts here.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Postby DevelopmentTeam » Tue Aug 07, 2007 3:34 am

viewtopic.php?t=5

last post in this topic shows how to use the collision detection method using the MIDP 2 classes.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India


Return to J2ME Games

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron