[Request] One Point Collision

Discussion and feedback on Construct 2

Post » Sun May 26, 2013 10:15 pm

@jayderyu


My experience with C2:

-Fake physic with falling blocks

50 objects with collision enabled for iOS is slow and bad performance.

Then, 50 objects collision disabled for iOS is great and good
performance so i used distance method to alternate collisions.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon May 27, 2013 6:09 am

@I remember that demo. I think I still have it in my downloads.

While I agree that better collision is a good idea. I still feel that in regards to a puzzle game like you were aiming for. That using collision is not the best way. A board plugin, and good animation is the best recourse. The best way is to check for an empty spot in the board. Then animate the blocks above to look like a naturual drop.

Rexrainbow has a bejewled like plugins.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Mon May 27, 2013 4:54 pm

@jayderyu You are right, but not at all if we are developing like RTS, Puzzle is not only one. We might have games that use a lot of objects.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Tue May 28, 2013 12:14 am

@Joannesalfa
Your right, full blown RTS games with lot's of bullets flyign aruond probably would be best with a better collision detection. probably could use a quadtree beaviour then as it doesn't use the platform or related behaviour.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue May 28, 2013 12:19 am

Well how many rts type games have you seen using bullet collision?
I've seen zero because they all use instant hit, and work off of probability.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Jun 17, 2013 5:48 am

I would like to get this answer if is possible to add point in collision like CC does.


@newt Have you played Starcraft?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon Jun 17, 2013 6:48 am

Actually, no.
Then again just because you see a bullet doesn't mean its doing collision detection either.

Any way, the method I suggested works on html5, and can be implemented by anybody.

However I would love to see the probability of Ashley implementing point collision.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Jun 17, 2013 7:54 am

This is a good topic, I think I'll have to move away from the standard collision system too. It impacts performance too much with a lot of objects.

Are you sure Ashley is using something as inefficient as that 500 x 500 (250,000) collision model? What if he's already doing something decent?alspal2013-06-17 08:07:23
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Jun 17, 2013 1:08 pm

Point collision isn't really a high priority. It's on the todo list but it will work about the same as just using a really small collision poly around where you want the point to be. There wouldn't be much in the way of performance or functionality benefits.

Currently the collision engine does use a brute force approach. I want to change this (another thing on the todo list), but it's not straightforward. Using datastructures like quadtrees or just simple buckets causes more overhead for moving objects, since every time an object moves its bucket or quadtree section must be maintained. Therefore it is a careful tradeoff between slowing down the ordinary operation of games, and then more than offsetting that by speeding up collisions. I believe it's a trade-off worth making, but in the mean time there's a lot of other stuff to be working on, and I don't think many games are seriously affected by the brute force approach. If objects are far away so their bounding boxes do not overlap, the engine can reject the collision test with a simple rect test. This is so fast you really do need thousands of tests to notice a change in the framerate. So the current system really isn't that bad, it's just adequate.Ashley2013-06-17 13:08:41
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Mon Jun 17, 2013 1:49 pm

Thanks for the response.

[quote]If objects are far away so their bounding boxes do not overlap, the engine can reject the collision test with a simple rect test.[/quote]

Can someone clarify what he means by "rect"?
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: supreme676, TRMG, zenox98 and 16 guests