This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-01-18 13:21:16

itchyone
Scratcher
Registered: 2009-08-15
Posts: 100+

One huge script or tons of little ones?

My question is: One huge script or lots of little ones (linked by broadcasts)?

My games tend to use a couple huge scripts over lots of little ones, and they always lag awfully online. Should I use little ones instead?


Build your own platformer with BYOP!
Want to test some highly dangerous Wormholes? For science?

Offline

 

#2 2010-01-18 13:49:23

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: One huge script or tons of little ones?

Yes  smile  Try to split up your scripts in compartiments. But try to split a script into it's different functions. It's a matter of personal style, though.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#3 2010-01-18 13:50:58

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: One huge script or tons of little ones?

From personal experience, I find large ones work better. Why?

1. Broadcasts are confusing. They are one of the most overused blocks in Scratch. They can be pretty messy, and hard to tell apart. I usually avoid using them, and when I do I have a plan for orginazation
2. Look at RHY#####'s projects. One of his most famous games called Line is all done in one effecient script. So is his project water physics, which is one of the most complicated physic engines on Scratch.

So if I were you, I would stick with what you're doing. But ultimately it comes down to what works best for you.

Offline

 

#4 2010-01-18 14:11:40

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: One huge script or tons of little ones?

I'd say find the middle.
I do it, and I never get front page!
not comforting, is it? And I know that has nothing to do with me not getting front page.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#5 2010-01-18 16:24:10

itchyone
Scratcher
Registered: 2009-08-15
Posts: 100+

Re: One huge script or tons of little ones?

so does splitting up the scripts make it faster online?


Build your own platformer with BYOP!
Want to test some highly dangerous Wormholes? For science?

Offline

 

#6 2010-01-18 16:56:34

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: One huge script or tons of little ones?

itchyone wrote:

so does splitting up the scripts make it faster online?

It could be argued either way. It really doesn't effect the overall speed from what I've seen. It really is what is inside of the scripts.

Offline

 

#7 2010-01-18 17:25:47

pinochio
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: One huge script or tons of little ones?

Actually, the less scripts you have, the smoother it runs. I usually make a couple giant scripts, and it works a lot faster than many small scripts!


Flat Out G

Offline

 

#8 2010-01-22 01:21:04

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: One huge script or tons of little ones?

I think the biggest issue is this, and pardon me cause I'm making a lot of assumptions here. The Scratch site does the "magic" job of converting our apps into java apps BUT not all functions convert properly. Now, like so many things around here, it would be most excellent if there we were provided something like a list of these specific 'bad' function crossovers. Then people who want their stuff to run smoothly online vs. just be downloaded and run could optimize their coding methods.

So, unless some generous benefactor drops in with our list, you are gonna have to search the forums and make one yourself. Have fun and please post it for us later ?!?! Seriously though, here is an example of what I ran into...

started working on scrolling games
immediately read and discovered that they are notoriously buggy online
also found out that resizing any sprite to over 100% does NOT work online
made the decision that for the complexity of the serious games that I want to do, downloads are the only way. But to be really picky about your question, the more problems like these you can track down, the better chance that you have of making a smooth and yet relatively complex game. You have the right question in general, you just need to apply it to who knows how many variables (1 or more scripts, number of sprites used, if green flag clicked, use/don't use broadcasts / Move vs Glide / etc etc etc) Good luck!


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer