update canvas object !

New releases and general discussions.

Post » Tue Sep 16, 2008 10:05 pm

[quote="faggatron":15j6m1a8]it's a hell of a lot quicker to have:

canvas object -> paste circle radius r at (x,y)

than to make a circle vector object and set it up loads and then paste it into it, especially if you've got to set up an erase blend on a new layer with that thing that makes erase work ticked.[/quote:15j6m1a8]

Sure it would be quicker, but it's still redundant.

If the canvas object has vector and polygon drawing functions, and the vector object has vector and polygon functions, then the vector object would basically be the canvas object without the canvas. So what would be the point?

It's like saying there should be two kinds of Sprite object... a regular sprite that you have to apply effects to by hand, and a sprite that has all the effects built in automatically that you just toggle on and off. Just doesn't make any sense to me.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Sep 16, 2008 11:52 pm

i disagree, you must realise that processing an ellipse in vector is CPU intensive, and i think its quite redundant to have to make a circle, move the circle and paste a circle, then destroy the circle, also having to edit the circle properties before you paste it, and destroy a circle, when you could just draw a circle at a point on a canvas with given params, its much cleaner and much less cpu intensive. saying a circle is redundant is like saying

"why have a line draw function on the canvas?, why not just make a 1x1 sprite which you resize to the desired length, rotate and paste into the canvas, having a line draw function is just down right redundant, heck, why even use a canvas at all, its redundant"

an ellipse function is barely redundant, its a simple drawing function which would complete the canvas object, i dont understand why it should only be for lines and pasting, it should be able to draw polys and ellipses.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Tue Sep 16, 2008 11:59 pm

I agree that more primitives should be added to the Canvas object. However, DirectX 9 has no built in way of drawing an ellipse. Any implementation we came up with would be along the lines of create a texture with a big circle in it, then draw the texture resized to how you want your ellipse. So if you're worried about the pasting-a-circle-sprite method being inefficient, it's not. It's how you have to do it!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 17, 2008 12:26 am

If I have understood this thread correctly...

I don't see what all the fuss is about really... it's easy enough to just do something like:

bomb hits ground => create bomb radius object (erase shader) => destroy bomb radius object

You can make the "explosion" any shape you want easily, and it takes 2 seconds to make the event to handle every single "bomb" or "bullet" or whatever in the event of destructible terrain.

~Sol
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 » Wed Sep 17, 2008 12:28 am

[quote="QuaziGNRLnose":3rci6bg5]i disagree, etc.[/quote:3rci6bg5]

It's redundant because one object would have the same functions as the other. That's what redundant means.

It's like having a hammer, a knife, and a hammer with a knife attached to it. One of those things has more functionality than it needs. It's just not necessary.

Plus, there are several legitimate uses for a canvas object without having to draw polygons on it.

And there would be several legitimate uses for a polygon object without having to paste the results into a canvas.

So if they have separate functionality, keep them separate. It's more efficient that way. You don't need a knife on your hammer to drive nails.

And it's not that hard to paste something into the canvas anyway. It's one action. You're making it sound as though it would be like pulling teeth to use two objects in conjunction.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Sep 17, 2008 8:16 am

If you just want to use elipses to cut out holes in a canvas I'd strongly recommend you use sprites, because you can made the holes in the scenery look more realistic and stuff.

I put together a nice little example that uses a combination of multiply and erase to create holes that leave a darkish shadow



The effect is more pleasing than an aliased perfect circle in my opinion.

What did you want to use elipses for ?
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Wed Sep 17, 2008 8:36 am

Another version of the above but adds a light shine to the bottom right of the holes to give depth

B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Wed Sep 17, 2008 3:40 pm

[quote="deadeye":xxord9q8]
You don't need a knife on your hammer to drive nails.
[/quote:xxord9q8]
And anyway, you can never find the hammer when you need it.
B
2
S
1
G
4
Posts: 60
Reputation: 1,320

Post » Thu Sep 25, 2008 2:08 pm

just add a save/load that supports the canvas and ill be happy.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Thu Sep 25, 2008 3:21 pm

You can save an image from the canvas by copying it from the canvas to the image manipulator and saving it from there. It even retains alphas for pngs. Or did you mean with the system save function?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests