The Daily Click ::. Forums ::. Klik Coding Help ::. handling multiple collision simultaneosly
 

Post Reply  Post Oekaki 
 

Posted By Message

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th August, 2008 at 04:11:54 -

ok heres the problem

i have one character and multiple enemies.

if i am overlapping an enemy i want it to turn flag 0 on in the enemy i am overlapping.

this works fine. but when i am overlapping multiple enemies at the same time it sets all enemies flags on, even ones im not overlapping.

any ideas?

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th August, 2008 at 04:18:02 -

hmmm. i did a test and it should work the way im doing it. if anyone has any idea what could make this happen let me know. ill be debugging.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th August, 2008 at 04:21:09 -

Click products have always been a pain in the Bumkaplooza when it comes to multiple instances and dealing with values. It's really the only major complaint I have about the products. Yea so... Sorry, I really don't have much else to say.

 

  		
  		

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th August, 2008 at 04:39:50 -

haha found it. and fixed it.

it seems that starting a loop on the same event as detecting whether or not not a flag is on makes anything in that event apply to all objects regardless of what the event specifically says (even starting the loop at the END of the event doesnt work. you have to make it a whole new event to start the loop. lame). shame on you clickteam. thats a built in function now and its still causing problems.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th August, 2008 at 05:14:02 -

Yes, I was just thinking the other day that probably alot of nonsensical problems that made me abandon projects way-back-when could've been fixed by changing event order. Sometimes even when something shouldn't work logically by changing the order, it does.

Glad you figured it out.

 

  		
  		

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2008 at 06:31:43 -

its good practice to run a loop checking every single object for collisions one by one, instead of having a single line of code supposed to detect collisions of every object

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th August, 2008 at 06:59:42 -

at the expense of eating up my performance? ill stick with what i got. it works now.

i think its better practice to think outside the box. using the most simplistic ideal method to get something done with using the least ammont of cpu power.

edit: i think youre a little loopy right now

Image Edited by the Author.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2008 at 07:11:37 -

most modern applications run hundreds of thousands of loops per second you know. It just depends on what you're doing in those loops; MMF can do blank recursion to maximum of ~8300 recursive depth each frame of gameplay and not experience slowdown at all, but if you try to do something complicated like draw an on an overlay each frame your computer will cry from stress.

collisions aren't intensive though :0

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
16th August, 2008 at 07:41:04 -

well they are in mine then. cause thats the first thing i did. and it slowed to a near halt. you also have to understand that upon a collision i am running other loops for blood effects, etc. so it IS intensive. running a loop to create 75 particles within a loop already running 100 times per loop, causes problems. normally i wouldnt have a problem doing this in c++ c# or basic. but mmf just doesnt like it. ive always had problems with loops. good for some things not for others.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2008 at 08:13:05 -

yeah its really a case by case basis. I have no problems doing it for physics or pathfinding, but drawing 3d or loading graphics onscreen or writing to arrays can slow signicantly

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
16th August, 2008 at 19:06:39 -

haha my game only uses fast loops for the main character's movements.

 
.

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th August, 2008 at 19:21:31 -

Shnitzel!


(Sorry, I just felt like saying something.)

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click