Geometric primitives?

New releases and general discussions.

Post » Thu Nov 12, 2009 8:06 pm

Ill just leave this here:
[url:1id7nr6m]http://dl.dropbox.com/u/666516/polycollision.cap[/url:1id7nr6m]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Nov 13, 2009 10:26 am

Wow, unexpected surge of opinion! The thing is, it's not quite so simple as you might think, especially when it comes to circles.


[quote="Mipey":3fa4nrb2]- you can update the shape in real time, while a static texture remains the same.[/quote:3fa4nrb2]
Isn't this what mesh distortion does?

[quote:3fa4nrb2]- collision checking is easy between geometric primitives, because you can simply solve rather than check for each pixel[/quote:3fa4nrb2]
Actually, the opposite is true. Most of Construct's collision engine uses per-pixel collisions, and that makes detecting collisions between geometric primitives and per-pixel sprites extremely difficult. I don't really want to add new features unless they integrate with all other features, especially something as intuitive as collision checking (where if any combination simply didn't work the forums would be full of people asking "why doesn't my 'on collision' event work here?")

[quote:3fa4nrb2]- I mentioned transparent pixels... well, static textures, when zoomed in, have these all over the place. There would be no such "dirt" with polygons.[/quote:3fa4nrb2]
I don't see the point here. I think it is quite simple to ensure you have a clean polygon sprite on a texture.

[quote:3fa4nrb2]- low memory footprint. A huge circle (to preserve crispiness) can easily take a good chunk off memory, while a primitive circle would take substantially less (if we draw directly to the visible screen, skipping offscreen). Static texture still retains the same space, even if it is not drawn offscreen.[/quote:3fa4nrb2]
You might save one texture, yes. But the rendering of a circle is much slower. The way it'd have to be done in Construct is basically create a circle out of straight lines, which means hundreds of vertices arranged in a ring. (As I said before, DirectX can't natively draw circles, only triangles) And four vertices is equivalent to pushing a sprite to the graphics card, so you could end up with a single circle using the rendering power of a hundred sprites.

You could use a shader, but why require special pixel shader hardware for something as simple as a geometric primitive?

Given all this, I'm afraid I don't see much case for a series of geometric primitive plugins. A third-party dev could try making some, but it would still suffer the same pitfalls - probably no collisions with ordinary sprites and slow rendering of circles. Really - is there something that bad about using sprites with textures?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Nov 13, 2009 10:40 am

Thank you for your answers, Ashley. I was merely exploring my options and I appreciate your input on this topic. :)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Nov 13, 2009 7:41 pm

Perhaps, a plug, or third party program, like the mesh editor? One that was made to speed up making polygons. Then you could just import the mesh's, then for collision detection you could just use a canvas like my example above.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Nov 16, 2009 2:29 pm

and unfortunately Ashley has to waste his time explaining why their isn't a specific feature in construct, rather than touching up on the project itself :(
Damn demanding public.
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Post » Mon Nov 16, 2009 7:43 pm

It's alright, I don't mind answering questions! :P
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Nov 17, 2009 7:18 pm

[quote="Ashley":3iz87583]It's alright, I don't mind answering questions! :P[/quote:3iz87583]
Then why are you ignoring my PM?
B
7
G
3
Posts: 23
Reputation: 1,021

Post » Tue Nov 17, 2009 11:00 pm

[quote="knuckle":1v72n0g0][quote="Ashley":1v72n0g0]It's alright, I don't mind answering questions! :P[/quote:1v72n0g0]
Then why are you ignoring my PM?[/quote:1v72n0g0]

Ok, now that's funny.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Nov 19, 2009 11:31 am

[quote="knuckle":f4utgqnt][quote="Ashley":f4utgqnt]It's alright, I don't mind answering questions! :P[/quote:f4utgqnt]
Then why are you ignoring my PM?[/quote:f4utgqnt]
:lol: :lol: :lol: :lol:
B
2
S
1
G
3
Posts: 193
Reputation: 1,486

Post » Thu Nov 19, 2009 11:47 am

I just double checked my PM, sorry, must've missed that one. But it's better to post questions like that on the forum, where everyone can discuss them and put in their own inputs. I didn't have much to do with Python for example so it'd be better for David to comment on that, etc.

Thread back on track, anyone? :P
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests