Pages: 1 2
Topic closed
More ideas: try to get access to the Scratch wiki, i think it belongs there too.
Edit your first topic post: link to other helpful articles and Scratch wikis.
Last edited by eventexception (2012-02-17 05:27:32)
Offline
AddInnovation wrote:
Great Tips - thanks for those.
Also on a point of faster processing AND Development,
I started looking at a breakout style game a while back, and one of the most frustrating elements was when making changes to the main script behind one "brick" sprite, and following that through to each other script and then personalising that script on each brick sprite.
E.g. I have one brick script I work concentrate on and refine the scripts for called R1C1, then I've got 5 rows, and 10 columns on each - 50 sprites in all. I'd refine the script on R1C1, then drag and drop onto each other sprite, and then change all of the references where necessary to the name of each sprite.
I've found a much better approach is to use one local variable with the sprite's name, and then use a list to represent the name of each visible sprite.
The upside is that it makes detections easier with a small script using a loop, the online downside could be in the extra time for loops, but overall it works faster.
I'd set up a game "Skeleteons in Wellingtons" with several scripts for the skeletons. There's a slightly different set of scripts of Skelly 1, but Skelly 2-5 are all almost exactly the same, and to add a new skelly I just duplicate the sprite and change it's "MyName" variable, then add it to the list of "monsters" - works great !
In my city game (link at the top) I had to make each individual tile a sprite and it took forever! The good thing was though that all I would have to do is change three numbers on this one sprite and it would effect the positions of everything else. It worked quite well, but I never knew you could use that script. One thing I would suggest it instead of dragging the scripts onto each one, just duplicated the script, change the necessary variables and re-duplicate so that A.You know you've done each one and B. you can quit at any time and know where you left off.
Offline
Borrego6165 wrote:
eventexception wrote:
Great guide!
Is ´Show and tell´ the best category for? Ask a mod to move it
Btw. ´ghosting´ slows down one of my projects running with the Flash player.Maybe "help with scripts" would be best. where do you go to ask? and thanks, i'll add a bit about translucency.
I agree! There is lots of useful information here. But I don't want to set a precedent of allowing advertising in Help With Scripts. Why don't you make a few changes so that you are not explicitly advertising and then let us know with the Report button again? It's okay to link to projects to demonstrate key concepts...but advertising is not what HWS is all about.
Offline
Paddle2See wrote:
Borrego6165 wrote:
eventexception wrote:
Great guide!
Is ´Show and tell´ the best category for? Ask a mod to move it
Btw. ´ghosting´ slows down one of my projects running with the Flash player.Maybe "help with scripts" would be best. where do you go to ask? and thanks, i'll add a bit about translucency.
I agree! There is lots of useful information here. But I don't want to set a precedent of allowing advertising in Help With Scripts. Why don't you make a few changes so that you are not explicitly advertising and then let us know with the Report button again? It's okay to link to projects to demonstrate key concepts...but advertising is not what HWS is all about.
I half-advertised it so that it could go in show and tell, that's the only reason i did it like that. I'll change it!
Offline
okay i see how this is useful but with my minecraft world generator do you know how this can apply to it because i don't see how it will speed it up. look at V3 for the fastest version where i have tried to speed it up but i have to keep it on turbo speed for the generation to be fast enough to look nice with the movement but do you think you could look at it and try to see how to make it look smooth on normal mode? if you could it would be a great help.
Offline
check your comments!
Offline
I understand this guide, but I have no idea how to make my project smoother. It is VERY laggy. Could you take a look at it? Here's the link.
http://scratch.mit.edu/projects/DaScratcher101/2342062
Offline
OK, I'll have a look at this later. The main reason why I am posting is so that I will remember this as it will appear when I view my posts.
Offline
bumpio
Offline
Very thorough, useful, guide. Nice work!
Offline
LiquidMetal wrote:
Very thorough, useful, guide. Nice work!
thanks!
Offline
Nice guide.
"Merging" sprites seems to be a good way of improving performance. If you have 2 different menus (a main menu and an options menu) Then you can use the "options" button in the same sprite as the "back" button. You would need something like this:
when [options/back v] clicked if <(costume#) = [1]> //Costume 1 is options and costume 2 is back. broadcast [options v] //or whatever it does switch to costume [back v] goto the right place else broadcast [title v] switch to costume [options v] goto the right place endThat way you need one less sprite. Having less sprites seems to have surprising impact on performance. You could probably do a similar thing to merge the player with the play button if you don't have an options menu. But this wouldn't have the else and, animation might get in the way.
Offline
Splodgey wrote:
Nice guide.
"Merging" sprites seems to be a good way of improving performance. If you have 2 different menus (a main menu and an options menu) Then you can use the "options" button in the same sprite as the "back" button. You would need something like this:when [options/back v] clicked if <(costume#) = [1]> //Costume 1 is options and costume 2 is back. broadcast [options v] //or whatever it does switch to costume [back v] goto the right place else broadcast [title v] switch to costume [options v] goto the right place endThat way you need one less sprite. Having less sprites seems to have surprising impact on performance. You could probably do a similar thing to merge the player with the play button if you don't have an options menu. But this wouldn't have the else and, animation might get in the way.
God I'm such an idiot! I do that all the time and I never thought of putting it in! Thanks for reminding me
Offline
I have had a lot of problems with lagging scratch projects but for some reason, they work fine online and lag when downloaded.
But this helped!
Even though, I guess there eventually is a limit because you can't just go on forever, even with really efficient programming.
Offline
bump- hope this helps!
Offline
I have seen some programs here with large numbers of event activated scripts that got stuck and actually were doing things in peculiar order. Thanks for your kind words supporting neoclassical architecture by using variables more. Also, if you had a bunch of scripts be activated by say the same keystroke, would that many of us really have the discipline to make sure all the scripts are done and really ready to move on? Some days its good to be an old fart.
Offline
Pawnfork wrote:
I have seen some programs here with large numbers of event activated scripts that got stuck and actually were doing things in peculiar order. Thanks for your kind words supporting neoclassical architecture by using variables more. Also, if you had a bunch of scripts be activated by say the same keystroke, would that many of us really have the discipline to make sure all the scripts are done and really ready to move on? Some days its good to be an old fart.
well this is an old guide and in my Rayman 4 game I scrapped the S,D,F,code and used an auto-mated one that re-shuffled the layers every time you started it. I just forgot to put it into the guide
Last edited by Borrego6165 (2012-06-23 16:51:48)
Offline
bump
Offline
SOScratch wrote:
but for some reason, they work fine online and lag when downloaded.
Flash player is a lot faster than the offline scratch player.
Offline
Topic closed
Pages: 1 2