Drawing a line!

Just made this. It’s very easy to import and to understand.
Give credit if you’d like, you don’t have to.

5 Likes

you should also make an option for a line that follows the mouse and that isn’t just a straight line by spawning blocks where ever the mouse is (you can also put it on a slight delay to reduce lag if there is any and have it not spawn the blocks when the mouse is still holding down but not moving).

1 Like

but that’s already been done a lot, i’m pretty sure this is the only draw line example, unlike normal drawing which is not only much easier, it also already had examples.

1 Like

hadn’t checked if it had examples, was just saying you could add a button that changed the line you draw from straight to scribbles and scribbles to straight, that way you could show off both of them at once.

1 Like

I’m extremely confused, why would I want to convert a line to a scribble, that’s not possible (unless you want rng but why would that be useful) I understand the convert a scribble into a line, but that’s a difficult thing to do, and I’m not completely sure how that works.

I wasn’t talking about converting I was just saying to make an option for the hand to draw either a scribble or a line, not converting a line into a scribble (and by scribble, I just mean multiple blocks that follow the hand, like a pencil).

The problem with drawing by spawning is that you can have imperfect lines because you can only draw at a framerate of 30fps. I tried making an example last year that would help this, but the drawing is super slow to keep lines. Though I now have an idea on how to make something with much more precision, so possibly see something from me in the future. Here’s my current example:

Flowlab Game Creator - Better Drawing

But about @Galactian’s example, it’s a pretty good method of drawing lines. Normally I would think of using math to place the object in between the start and end positions, but this is a neat shortcut to do.

5 Likes

The lines would be supposed to be kind of messy because that’s the style, and there is a block to increase the frame rate to 60 fps, it’s under Game Flow named Frame Rate (you can do anything from 1-60 fps, pretty sure it caps at 60 though).

nvm, the Frame Rate is for the physics of the game, the logic and behavior already process things at 60 frames per second.

1 Like

The editor runs at 30fps and that is fixed.
Frame Rate is just for physics.

2 Likes