One Sprite One Script Project
A One Sprite One Script Project, or 1s1s project, is a project that runs on only one Sprite and one script. There are limitations, but most can be worked around.
Contents |
Methods
Below are some of the many methods used to avoid extra scripts or sprites:
- Multiple sprite movement—The sprite will place itself at a certain set of coordinates, stamp itself, and move away, doing this at another place in a another costume to give the illusion of many sprites.
- Swift "Auto-Lines"—To draw a quick line between two points use this script:
when gf clicked clear pen up go to x:(0) y:(0)//starting position pen down go to x:(100) y:(100)//end position pen up
- Single Frame — This method is used to speed up scripts.
History
The idea of a 1s1s project is not new, but it has been noticed by the Scratch Team that 1s1s projects are becoming a big trend.[1] Although many 1s1s projects have been made before, some say that RHY3756547's LINE was the first major 1 Sprite 1 Script project — this project most likely triggered the fad. Following this project, many people made their own 1s1s projects, from games to simulations. There was also a Scratch Design Studio with 1s1s projects.[2]Difficulties
- The Wait () Secs block will slow the entire script - one solution is to have the sprite change a variable repeatedly until it has reached a certain value. This can be an advantage or disadvantage, depending on the situation — it will be measured by the amount of frames, not the amount of time. Another solution to this is to reset the timer, and have the sprite repeat its normal functions until the timer is greater than or equal to the wanted time. The best solution is to make the script Single Frame.
- A script has a limited area to show itself — once the script is long enough, it will cut its view at that point and below. The Scratch Team has noticed this problem;[3] it will probably be fixed in the next version of Scratch, Scratch 2.0.
Related Project Types
Zero Sprite One Script (0s1s)
Some users, finding One Sprite One Script Projects too easy to make, have moved on to creating a project that runs on simply one script on the Stage — no sprites included.
Some tricks for programming in this way are as follows:
- Multiple object movement—The Stage is frozen; it cannot place itself at different locations and stamp. Some backgrounds form an animation, resembling the wanted effect - but it is rather glitchy.
- Mouse detection—The stage can switch to a new background by looking at a mouse's coordinates. Using these, it can check to see if the mouse is in a certain region on the screen.
Mainly, 0s1s projects are math simulations, chatbots, console OS's, etc., mainly which do not need graphics. Main interactivity is usually by using the Ask block for input and a List display for output.
One Sprite One Script One Costume (1s1s1c)
Other users, finding One Sprite One Script projects too easy and Zero Sprite One Script projects too hard, settle for One Sprite One Script One Costume projects. With only one costume but one sprite, there are limitations to what the project can stamp, thus these projects use the Pen to draw objects. This is slow and time-consuming to program, thus these projects are often hard to make, too.
An example can be found here. Notice how the cars are drawn by a long script consisting mainly of Motion Blocks.
References
- ↑ http://scratch.mit.edu/forums/viewtopic.php?pid=337823#p337823
- ↑ http://scratch.mit.edu/galleries/view/142631
- ↑ http://scratch.mit.edu/forums/viewtopic.php?pid=337823#p337823
