vector object

New releases and general discussions.

Post » Fri Jan 09, 2009 9:28 am

Didn't see this suggestion anywhere, and I haven't found it in Construct.

I'd like to see some sort of vector object, similar to the custom collision tool in the physics behaviour.

So that you can draw a basic shape using points, then call on that object later in events.

It would be useful to make part of a background solid, for example, I have some tiles of grass and some tiles of water from the top-down perspective. There is also a half water half grass tile. It's easy enough to make the water solid so the character can't walk on it, but what about the half tile of water?

If I could draw a shape over all the water in the scene, then I could make that solid and invisible.

Bezier curves would be nice too.

It makes sense in my head I swear :D
B
10
S
4
G
5
Posts: 136
Reputation: 2,977

Post » Fri Jan 09, 2009 2:15 pm

It's been brought up before, and it's probably not going to happen for a while.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Fri Jan 09, 2009 4:41 pm

bezier curves exist, you just have to code them yourself. check out my brother quazi's blobber engine demo thread. he used a bezier for the pipe connecting to the gun.

-for your half water tile why not just use an invisible detector? its much easier than plotting a shape with points in an event..
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Jan 09, 2009 5:36 pm

I wouldn't really suggest quazi's way of doing bezier curves. His code is incredibly complex and hard to understand(he forewent the use of the Qarp expression). Here's a simple example of bezier curves: Bezier Curves.

Ultimately, I think quazi was using cubic interpolation which is why all the fancy code, but that's going to be in the next build of Construct.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Fri Jan 09, 2009 7:38 pm

As mentioned in the other thread, there's no good efficient way that I know of for drawing bezier curves with high performance in DirectX. The current best way to deal with different collision masks is to use separate invisible sprites for the colliding.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Fri Jan 16, 2009 12:32 am

create an object that draws a polygon, when you give it x amount of points and give each points position it draws the gon, with a chosen fill and line colour (or just make polygon part of canvas plz!!!)
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests