Inconsistent trail art? Bug in Hopscotch or in my code?

help_me_please
hopscotchbug

#1

I'm trying to code a trail art Groot. It's looking ok, but I try and fill it, every time it looks different. Here are pictures in case you don't understand:

Pictures

I didn't change the code once. I don't know what is happening. Here is the code:

Code

I couldn't find anything wrong with it. Is this a Hopscotch bug or am I doing something wrong?

And if you think of an easier way to code this, or feedback for the project, I'd love to know what it is.

Thank you!


#3

@CodeHelp


#4

I'm looking at it I'm sorry Trail art is my low spot I sometimes have the same problem too sorry :confused:


#5

Instead of using "Set Angle" try to just expand the move forward amount.

Like this:

Draw a trail:
Move forward 5, Move forward -5
Change y by ___
Move forward 10, Move forward -10

Etc.

Not sure if that's what you did already, but that's what I do.


#6

Would that fix the problem or is it just another way to do what I did? I don't quite understand how that code would relate to my project.

Edit: It makes a square when I try that?


#7

Sorry, that was an example you can use different numbers though. One sec let me recheck your code.


#8

Okay, make your outline first, then use the method that I showed to fill.


#9

Ohhh, I see. I'm sorry, I didn't understand. Let me try that.


#10

Probably a timing issue.


#11

Yah, most likely. Any ideas on how to fix it?


#12

Use an FPS counter and calculate how many times you need to repeat wait 0 milliseconds.


#13

Oh my goodness! That is pretty weird lol!


#14

No need to tag Liza and Rodrigo. I am pretty sure it is just a problem with the code.


#15

@TheGreenBanana, don't use a Repeat block, instead draw each straight line using a Move Forward and Set Angle block, like @MiNi said. It will make things a lot easier :)


#16

@TheGreenBanana
It's the Wait blocks (indirectly) that are causing the inconsistency. The code in Text & Text2 is executing concurrently (at the same time) but also asynchronously (the timing varies). A project's execution speed will vary but the Waits in Text2 are independent of the execution speed so the two objects get out of sync.

Also, see this topic about a restart timing bug that also might be another complication for you.