Jump to content


Photo

About Collision Events


  • Please log in to reply
4 replies to this topic

#1 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 12 October 2011 - 08:00 AM

I have been thinking about this for some time now...and i really want to know.

Let's say I have an object... object_A and 500 different other objects. object_A has a collision event with each of thous objects, so object_A has 500 collision events (I know I could have used a parent for thous 500 objects and have object_A check for collision only with the parent, but that's not the point).

Now in any given room I have object_A and 4 of thous 500 objects. My question:

Does object_A check for collision with only thous 4 objects that are present? or dose it still check for 500 other objects, even though 496 of them do not exist in the room...

I'm thinking it might check for all 500 each and every step (slowing down GM) just in case I decide to spawn some of thous 496 other objects... but I don't know...

Awaiting opinions :sweat:
  • 0

#2 amiel

amiel

    GMC Member

  • GMC Member
  • 1117 posts
  • Version:Unknown

Posted 12 October 2011 - 08:10 AM

Yes it checks the collision.
:whistle:
  • 0

#3 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16790 posts
  • Version:GM:Studio

Posted 12 October 2011 - 08:14 AM

Why not test it and see? Then YOU tell US what happens!!!
  • 0

#4 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 12 October 2011 - 08:19 AM

Why not test it and see? Then YOU tell US what happens!!!


I don't know how to test it :blush: I'm guessing it can be done in debug mode or something... but I'm not familiar with debug mode :sweat:
  • 0

#5 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16790 posts
  • Version:GM:Studio

Posted 12 October 2011 - 08:25 AM

Lol! Okay, it's easy... Create 20 objects (or more would be better if you have the patience!) and give them a sprite. Then create a player object (with a sprite) and give it twenty collision events (one for each other object) and add a draw event that draws the fps on the screen. Now, make two rooms, with the room speed in each at 9999. In the first room place the twenty objects and the player, and in the second room place the player and ONE object twenty times. Run the game a few times for each room and check the fps. You should also run a room with only one object once and the player too...
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users