update canvas object !

New releases and general discussions.

Post » Sat Sep 13, 2008 11:53 pm

the canvas object seems really basic at the moment, it cant darw elipses, or polygons between points, also perhaps set the possibility of removing from the canvas, so lets say you want to draw detructible terrain, you simply plot an elipse, and set it to erase from canvas object (value 1 is no value 2 is yes) something like that., if u were to say erase from canvas object with an ellipse/polygon that was lets say 50% transparent, it would leave a 50% transparent spot on the canvas, which you could see through.

i really believe polygons which u set the point for like draw shape with points 1.x,1.y,2.x,2.y,3.x,3.y ect ect, (no limit so you can make any number of points that youd like.)
should exist also, mmf2's overlay object is quite better than the canvas object, not enough properties are defineable. and essential features like drawing circles and erasing certain areas with those shapes or pasted sprites are inexistant.

a canvas object is really good if you want breakable terrain, and you cant do that with it!
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Sep 14, 2008 12:24 am

You can erase from the terrain by pasting in a sprite that has the erase effect applied.

As for the idea of polygons, elipses, etc. I definitely think that's a good idea.
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Sun Sep 14, 2008 2:46 pm

how does erase/mask effect work? i never understood what they do and how to use them
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Sep 14, 2008 2:50 pm

1 - Make a sprite and draw a big white circle
2 - Give the sprite the 'erase' effect
3 - Give the sprite mouse movement
4 - add a canvas object and load some random image off your computer
5 - add an event 'always - paste sprite into canvas'

Now run it and you have an eraser on your canvas

Try adding a gradient or something behind the canvas, and you will see the background appear through the image.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sun Sep 14, 2008 2:53 pm

As for elipses and polygons, as the canvas object can draw any object into itself, its more likely we'll create a polygon plugin separately (so we can get vector graphics and all that pwetty stuff)
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Sep 16, 2008 11:30 am

yea, but if u ever used mmf2 you see its pretty usefull to have polygons on the object, after all it would be HWA but vectors are not. its simply finding points, and drawing lines, then filling in the average of all the point postions right?, something like that, but its impposible to do this atm, it needs a little more work, and ellipses should be a basic drawing Op
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Tue Sep 16, 2008 12:41 pm

[quote="QuaziGNRLnose":fbo5q3j2]yea, but if u ever used mmf2 you see its pretty usefull to have polygons on the object, after all it would be HWA but vectors are not.[/quote:fbo5q3j2]

But it's the drawing that's hardware accelerated, whether it's vector or not. Vector, raster, don't make a difference. In the end it's all just telling your graphics card what pixels to make.

If there is going to be a vector object in the future, then putting polygon functionality into the canvas object as well would just be redundant, because you can just paste the vector object into the canvas.

And actually that would make the canvas' current point, line and rect actions pretty much obsolete.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Sep 16, 2008 2:32 pm

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.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Tue Sep 16, 2008 7:45 pm

[quote:2pimchfj]especially if you've got to set up an erase blend on a new layer with that thing that makes erase work ticked.[/quote:2pimchfj]

You dont need to put objects on new layers and stuff when pasting into the canvas. The object simply renders into the canvas itself, so if it has an 'erase' effect on it, it will work as expected (as canvas has an alpha channel). It should work with any object and any pixel shader.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Sep 16, 2008 7:52 pm

nice, (I didn't actually try it)

It's obviously not necessary, but I wouldn't rule it out entirely, just if you can be arsed add it ages after 1.0 and after the vector object, just as an ease of use thing.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests