Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Cleaning up some scripts... efficiency problems
- lucascucas
-
21 posts
Cleaning up some scripts... efficiency problems
http://scratch.mit.edu.ezproxyberklee.flo.org/projects/11541303/
That is the project I released recently. If you look inside, it looks somewhat large.
Even if you say it's not large (which it probably isn't), find and look at how hard it is to add new cities to the map (in the line renderer sprite)
Does anyone know how to make the program more efficient and easy to build on/easier to add new cities?
Prizes: Best solution gets:
3 love-its
3 favorites
and
a chance to collaborate on a Pocket Planes-like game in Scratch.
It's okay to decline the collab. But…
Anyways, you'll also get the joy of helping someone.
Thanks,
lucascucas
That is the project I released recently. If you look inside, it looks somewhat large.
Even if you say it's not large (which it probably isn't), find and look at how hard it is to add new cities to the map (in the line renderer sprite)
Does anyone know how to make the program more efficient and easy to build on/easier to add new cities?
Prizes: Best solution gets:
3 love-its
3 favorites
and
a chance to collaborate on a Pocket Planes-like game in Scratch.
It's okay to decline the collab. But…

Anyways, you'll also get the joy of helping someone.

Thanks,
lucascucas
- ErnieParke
-
1000+ posts
Cleaning up some scripts... efficiency problems
Well, if you're needing help on efficiency, then I'd highly recommend going to DadOfMrLog for some help, but let me see what I can do…
Okay, so I simplified your code a lot. Here it is: Line Plan Map Simplified
One thing that I changed was that you don't need to check for every possible situation. If you know the beginning point and end point of a line, then you can simply draw from one to the other.
Also, since Sprite3 is always at the beginning of a new line, you don't even need the (Start) variable. I removed it and helped simplify further.
There are a few other changes, but I'll leave them to you to find.
I hope that this helps!
With regards,
ErnieParke
Okay, so I simplified your code a lot. Here it is: Line Plan Map Simplified
One thing that I changed was that you don't need to check for every possible situation. If you know the beginning point and end point of a line, then you can simply draw from one to the other.
Also, since Sprite3 is always at the beginning of a new line, you don't even need the (Start) variable. I removed it and helped simplify further.
There are a few other changes, but I'll leave them to you to find.

I hope that this helps!
With regards,
ErnieParke
- lucascucas
-
21 posts
Cleaning up some scripts... efficiency problems
Could you post that on the Scratch website? I can't download that dropbox file. “No application can open it,” it says.
Anyways, will you accept the collab?
Anyways, will you accept the collab?
- ErnieParke
-
1000+ posts
Cleaning up some scripts... efficiency problems
Of course, it's not going to open. That was a Scratch 2.0 file, so you'll need to upload it to 2.0 to use. Anyway, I decided to make things easier and released the project: Could you post that on the Scratch website? I can't download that dropbox file. “No application can open it,” it says.Line Plan Map Simplified
Anyways, will you accept the collab?
As for the collab, sure! I need something to stretch my coding hands on, and I haven't done enough of that lately…
With regards,
ErnieParke
- lucascucas
-
21 posts
Cleaning up some scripts... efficiency problems
Thank you so much! I will publish the things I already have prepared and will put them in studio.


- lucascucas
-
21 posts
Cleaning up some scripts... efficiency problems
Whoops… forgot about love-its and favs! Will do!
- ErnieParke
-
1000+ posts
Cleaning up some scripts... efficiency problems
It's okay. You don't even need to have offered the love-it's and favorites, though still, I appreciate it. Whoops… forgot about love-its and favs! Will do!
With regards,
ErnieParke
- Discussion Forums
- » Help with Scripts
-
» Cleaning up some scripts... efficiency problems