What creates collision checks?

0 favourites
  • 9 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I am working on my tile game and I did a ctrl-f to look for collision events in my game across all of my event sheets. I do not have any. So I am curious what other events cause collision checks?

    I have bullets, particles, and moveTos but they are all based on a trigger, not automatic and not repeating every X number of seconds. I also have NPCs moving based on tile movement but I don't have any sprites for them to possibly collide with. No block behaviors.

    Thanks

  • Mouse or touch events probably

  • Darn. That was going to be my guess but they are essential to me. I was hoping it wasn't that. I have loot mechanics and select a skill based on mouse clicked on object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Also, I think you're right. I removed (toggled them off) many of the loot mechanic ones and my collision detection jumped from 600 to 16,000. So the engine must be searching for them. In otherwords, I have set up some pretty disorganized triggers / events. It must be struggling to find them now that I toggled the functions off.

    Interesting...

  • Wait you turned something off and your collision checks increased? That sounds backwards to me.

    By the way, you probably won't be able to measure a difference between 0 collision checks a second and 600 collision checks a second unless you're playing on a brick from 30 years ago.

  • Yeah, I am just trying to figure out why my numbers are so different from that Demonoire game sample. That game is larger and has far less checks.

    There's something I am just not seeing. There will be a lightbulb moment coming.

    I isolated it to one of my global GUI layers. So it's not something occurring directly on the map itself.

  • You likely have an event running every tick that doesn't need to be.

  • Yep! Here is the culprit. I made a unit selected info GUI and it has all the possible buffs/debuffs in the game counting down as well as listening for mouse event on the map to open and an escape key to close. Under normal conditions, a unit would not possibly have all of these debuffs at once but I was learning how to do this so I had been keeping some test/learning kind of stuff around.

    Sidenote: I know it may not be kosher to change the thread up but all of those icons you see on the pic below are a sprite that just has different frames. Would it be better practice to make a tilemap with as much of them as possible and put a tilemap in instead of all the instances of the same sprite?

  • Ask yourself what benefits a tilemap gives you from a mechanical standpoint, as far as actions, conditions, and expressions go.

    As for performance, no difference in this case.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)