Perfect Collision mask for physics?

New releases and general discussions.

Post » Tue Apr 15, 2008 9:37 am

[quote="Hideous":2anc3sva]
http://futurepinball.com/ ;)[/quote:2anc3sva]

That program looks kind of interesting but there are two things wrong with it:

1. I'd have to learn (and master) yet another dev environment, and one that is rather limited in scope. Plus if I knew Visual Basic (which it uses for game logic scripting) I'd probably just be coding my own games from scratch.

2. It doesn't build an .exe, which means only the niche Future Pinball users would be playing my game. I'd much rather be able to reach a wider audience, and casual players wouldn't be very willing to install a separate program just to run my table.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Apr 15, 2008 11:09 am

Heh future pinball was cool. I made a few tables with that in the past, quite complicated tables in fact... I wonder where they got to?

Also, I had the same collision problems with the 3D box object, so I turned collision off on the box and made a simple sprite object that was the same dimensions/position as the box and that now works properly. I guess you could do the same thing with physics objects as well?
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Apr 15, 2008 11:57 am

[quote="SoldjahBoy":2kguyxau]I had the same collision problems with the 3D box object, so I turned collision off on the box and made a simple sprite object that was the same dimensions/position as the box and that now works properly. I guess you could do the same thing with physics objects as well?[/quote:2kguyxau]

No, the collision stuff is completely different for physics objects as it is for plain sprites. Yes, you can detect if a physics object is overlapping a per-pixel collision sprite, but it won't interact with it in a physics simulation.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Apr 15, 2008 1:08 pm

[quote="deadeye":2rm25roj][quote="SoldjahBoy":2rm25roj]I had the same collision problems with the 3D box object, so I turned collision off on the box and made a simple sprite object that was the same dimensions/position as the box and that now works properly. I guess you could do the same thing with physics objects as well?[/quote:2rm25roj]

No, the collision stuff is completely different for physics objects as it is for plain sprites. Yes, you can detect if a physics object is overlapping a per-pixel collision sprite, but it won't interact with it in a physics simulation.[/quote:2rm25roj]

Ah yes of course... my brain doesn't work at night lol XD
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Apr 15, 2008 1:21 pm

The short answer is no, physics collisions won't be per pixel, because the collision engine in Newton is substantially different - it operates on convex polygons rather than bitmap masks. Also, many bitmap masks are impossible to convert to a convex polygon. I was thinking about adding some kind of polygon editor, so you could at least approximate the object's shape with a convex polygon, but it's probably some way off.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Apr 15, 2008 7:48 pm

How sad...
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Tue Apr 15, 2008 8:12 pm

One question Ashley why did you choose Newton Dynamics for Physhics engine? There are probably pixel-collision physics engines out there.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Apr 15, 2008 8:52 pm

[quote="Ashley":gckiqdyt]The short answer is no, physics collisions won't be per pixel, because the collision engine in Newton is substantially different - it operates on convex polygons rather than bitmap masks.[/quote:gckiqdyt]

No concave shapes at all? So if I wanted to make this, I wouldn't be able to?



Also, just out of curiosity, how many vertices does the Ellipse mask have?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Apr 15, 2008 9:17 pm

If you can stick objects together you could do this...

B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Tue Apr 15, 2008 10:55 pm

[quote="Attan":13tdjc9a]If you can stick objects together you could do this...

[/quote:13tdjc9a]

I've tried that already, with very poor results. The physics simulation gets hung up on the corners where objects overlap and causes unexpected behavior. Play around with it yourself, you'll see what I mean.

And even if it did work well, that's a rather inefficient way to build a simple object that really only needs ten lines. You've gone from ten vertices in one object to 32 vertices in eight objects.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 6 guests