Physics with irregular objects.

New releases and general discussions.

Post » Tue Oct 07, 2008 10:19 am

I think the collision choices don't give a very good result for anything that isn't a square, a circle, or otherwise polygonal. Should there not be a mask for the outline of an object, or at the very least a more advanced custom mask that does more than just place apparently immovable points that all connect only in straight lines?

And while i'm on the subject of collisions in general, how about an option for multiple simultaneous masks for sprites/frames? I had a few ideas in mind and that seemed like the most convenient way to do such a thing without working around the lack of the feature. Granted I didn't get to explore much so there may already be an easy solution for THAT problem...
B
2
G
4
Posts: 29
Reputation: 1,108

Post » Tue Oct 07, 2008 10:44 am

The custom mask has to be user defined because while it is possible to automatically generate a pixel-perfect mask, it would be incredibly wasteful on the CPU. If you just click the approximate shape by a custom mask, it is much faster than an automatic mask, and probably closer to what you want as well. As for straight lines only - that's just the way it is - straight lines are fast to process. As for different animation frames - that's true, there's currently no way to do that. But it's tricky - if you switch to a different animation frame with a different mask, which results in the object being stuck halfway through something else, what do you expect to happen?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Oct 07, 2008 11:23 am

[quote="Ashley":32y388ni]The custom mask has to be user defined because while it is possible to automatically generate a pixel-perfect mask, it would be incredibly wasteful on the CPU. If you just click the approximate shape by a custom mask, it is much faster than an automatic mask, and probably closer to what you want as well. [/quote:32y388ni] For one, the custom mask is already very frustrating to use, not the least of the reasons being that I can't edit it afterwards and there doesn't seem to be a zoom for any precision. For two, if an object happens to have a quarter circle in it or something along those lines, what do I do about that? Actual games apparently don't have any difficulty doing these things, so why should construct?

[quote="Ashley":32y388ni]As for straight lines only - that's just the way it is - straight lines are fast to process.[/quote:32y388ni]So that's it then? "It won't do it because if someone chooses to do it this way the system requirements for their game will go up and therefore nobody must be able to do anything remotely useful as long as it takes processing power"? I've already had this argument before and it makes no sense, since you're so into using pixel shaders and all that fancy stuff but you're not into anything actually useful in creating games. I prefer functionality over gimmicks.

[quote="Ashley":32y388ni] As for different animation frames - that's true, there's currently no way to do that. But it's tricky - if you switch to a different animation frame with a different mask, which results in the object being stuck halfway through something else, what do you expect to happen?[/quote:32y388ni]Then whoever made it that way just do it properly. I don't see why we shouldn't have to deal with design bugs we create on our own.

You missed the multiple mask bit that I mentioned but i'll assume it was the one thing you didn't object to.
B
2
G
4
Posts: 29
Reputation: 1,108

Post » Tue Oct 07, 2008 12:39 pm

There's not really a need to get sour at Ashley cause he isn't turning construct into what you want it to be. Give the guy a break, he already has a million things on his plate to do for construct, I'm sure he could find a way to do what you want, but construct IS currently in beta and i think, for general use purposes, the custom mask works quite well, i mean i'm glad we even HAVE a custom mask cause we didn't before.
Just be patient, I'm sure there will be some alternative/solution on its way, plus he does kinda know what he's talking about when it comes to all the cpu stuff, i trust his judgement on what should and shouldn't be in construct
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Tue Oct 07, 2008 12:54 pm

[quote="Arcticus":17nxuk4f]There's not really a need to get sour at Ashley cause he isn't turning construct into what you want it to be. Give the guy a break, he already has a million things on his plate to do for construct, I'm sure he could find a way to do what you want, but construct IS currently in beta and i think, for general use purposes, the custom mask works quite well, i mean i'm glad we even HAVE a custom mask cause we didn't before.
Just be patient, I'm sure there will be some alternative/solution on its way, plus he does kinda know what he's talking about when it comes to all the cpu stuff, i trust his judgement on what should and shouldn't be in construct[/quote:17nxuk4f] But the thing is the way it's being brought to me, it's being said "this can't and never will happen". I probably wouldn't be so ticked if the suggestions weren't being brushed off so quickly.
B
2
G
4
Posts: 29
Reputation: 1,108

Post » Tue Oct 07, 2008 12:59 pm

Well i do kinda see where ashley's coming from with the pixel perfect mask, because people are going to make games with hundreds of objects with complex pixel perfect masks flying about and then complaining to him about why the game runs so slowly, even if pixel perfect or hybrid masks do come in, i would still like the custom one too. Perhaps a slightly more user friendly version, but i can't really complain since i'm getting this program for free, plus it's still in development, maybe a better solution to pixel perfect physics collisions will come around, who knows? not me
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Tue Oct 07, 2008 1:09 pm

[quote="Cheez":15l9sxba]For one, the custom mask is already very frustrating to use, not the least of the reasons being that I can't edit it afterwards and there doesn't seem to be a zoom for any precision. For two, if an object happens to have a quarter circle in it or something along those lines, what do I do about that? Actual games apparently don't have any difficulty doing these things, so why should construct?[/quote:15l9sxba]

If you want more precision while placing the points, hold down the control button and use the scroll wheel to zoom into the layout. That will allow you to place them more precisely.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Tue Oct 07, 2008 1:43 pm

[quote="linkman2004":1ftwezeu]If you want more precision while placing the points, hold down the control button and use the scroll wheel to zoom into the layout. That will allow you to place them more precisely.[/quote:1ftwezeu]I see. That would have to do for now, but it won't do anything for curved lines.
B
2
G
4
Posts: 29
Reputation: 1,108

Post » Tue Oct 07, 2008 3:35 pm

You might be suprised how much stuff in 'actual' games is faked, including physics. Stuff that looks awesome - like the barrels in crysis - upon further inspection, there's intersecting objects everywhere if you pile a lot of them of top of each other. Every smooth rounded surface really is composed of a bunch of flat, uncurved polygons, because that's what 3D is based on. Even when working with stuff like nurbs they're converted to polys because that's what is most efficient and fastest, and 'actual' games are also all about speed. Even the smooth looking characters in animated movies are made of a bazillion flat polygons. If you want a smooth curve, zoom way in and set a whole lot of points.

One thing that would be very helpful though that you mentioned, is the ability to move points that have already been placed.

Edit: I don't mean to get anyone mad with this post - just trying to point out that even game developers in AAA studios with multi million dollar budgets need to fake stuff all the time so that their games can be playable - for example, that's what normal maps are all about! 'Faked' geometry, because graphics cards have limits on the number of polygons they can push, and as such physics gets faked too.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Tue Oct 07, 2008 4:49 pm

[quote="Cheez":rpt6xbib]For one, the custom mask is already very frustrating to use, not the least of the reasons being that I can't edit it afterwards[/quote:rpt6xbib]
Agree. David said in his original implementation that he would expand on it in the near future to properly be able to select and move around points; it is very limited at the moment, but decidedly better than not having a custom collision mask at all. It's definitely unfinished though.

[quote:rpt6xbib]if an object happens to have a quarter circle in it or something along those lines, what do I do about that?[/quote:rpt6xbib]
Approximate it with a series of straight lines. Seriously, as far as I know, all commercial games also do this. A true curve is a rare thing to come by in computing simulation - as Arima said, they're faked. The physics interactions of a surface approximated by straight lines should be comparable to if it were a true surface. The more lines you use the more accurate it will be, but the more CPU it will use.

Also, Box2D physics (the engine behind the Physics behavior) doesn't support curves anyway. So we're stuck there!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests