[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Thu Apr 28, 2016 4:09 am

why does my post keep disappearing I swear I posed a suggestion in this topic before?
please tell me where it is if it does exist I used the search topic bar for my username

anyways
@R0J0hound can you make it possible to draw a sprite at a certain layer and position with its animation playing?
this would be good for hud elements

also could you make it possible to create a seamless screen loop with this?
I was thinking the canvas object could work like a camera too and you could be able to draw canvas's to other canvas's

I'm sorry if I already posted this already I have been gone for quite a while and like I said I can't find that post or the reply's it might have had with it
B
13
S
6
G
1
Posts: 149
Reputation: 1,960

Post » Thu Apr 28, 2016 7:00 am

@shadowblitz16
Have a look at the "paste object" action, it will draw another object to the canvas in the same spot it is overlapping the canvas.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Thu Apr 28, 2016 10:14 pm

@R0J0hound
Could you make a function that allows drawing a sprite and animation at a x and y coordinate?
something like...
draw_sprite(object,animation,x,y,w,h)? < action

also the drawing parts of the canvas to parts of other canvas's would be called something like...
get_canvas_part(canvas,x,y,w,h) < expression
draw_canvas_part(canvas,x,y,w,h) < action
B
13
S
6
G
1
Posts: 149
Reputation: 1,960

Post » Fri May 13, 2016 11:59 pm

@R0J0hound re Wolf ( and even doom ) style: I looked at your old rayast4 example. But I wander wouldn't be easier to just generate walls from sprites instead of havng points and lines, many variables and still only generate flat walls. With sprites it could be set to generate a wall for each side and top and bottom, and not only that, but now variable could be used to determine z axis position. So that would be the theory, you can make doom style 3d, however I'm not skilled enough at maths to do it. If you'd be able to help, that would be so super.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
71
S
19
G
19
Posts: 1,919
Reputation: 16,910

Post » Sat May 14, 2016 3:21 am

@shadowblitz16
That's what the paste action is for. Just position and set the animation of a Sprite before calling the action. The second idea would need to be done with blend modes and the paste action as well.

@megatronix
You could use that new raycasting plugin so you can cast rays to a collision polygon. Otherwise you could also come up with a way to create the lines from the sprites. Doom style maps could be tricky since a lot of tricks are used to go from wolf3d raycasting to that. Also it's not terribly interesting to me since I didn't get good performance with just doing walls, let alone floors. I'd need a way to make it much faster to make it worthwhile.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Tue May 17, 2016 8:15 am

@R0J0hound

there is anyway to save the canvas data ?
[b][color=#FF0000]for example
if there is a color book and the kid will close the app but when he comes back to it he will find the last color he did .
B
6
S
1
Posts: 4
Reputation: 367

Post » Sun Jun 26, 2016 2:11 pm

I'm trying to procedurally generate fantasy maps in an old-fashioned parchment style (think Tolkien's maps) in my current project, and the curve drawing functions look like they'd be perfect for making natural-looking rivers, roads etc... afraid I can't quite get my head around how they work though! Is there a tutorial for using them anywhere?

Many thanks again on a fantastic plugin @R0J0hound
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Sun Jun 26, 2016 6:45 pm

@lolpaca
Look here for a visual of what they are. You can ignore the math.
https://en.wikipedia.org/wiki/B%C3%A9zier_curve
The curves made of 3 points are the "quadratic curves" and 4 points are the "bezier curves".
The first and last points are the end points and the points in between are control points.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Tue Jun 28, 2016 9:47 am

Ah, that helps a lot. Thanks!
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed Jul 13, 2016 4:12 pm

@R0J0hound

I would like to provide to the user the possibility of drawing squares and circles with any size and I don't know how to do it with your plugin. Do you have any example that I can see to understand how to implement it?

Edited: Is possible an example about how to erase the lines and shapes?
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests