Help the wiki!

The Scratch Wiki is made by and for Scratchers. Do you want to contribute?

Learn more about joining as an editor!

See discussions in the Community Portal

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 an 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

History

A 1s1s project- LINE.
The idea of a 1s1s project is not new, but it was been noticed by the Scratch Team that 1s1s projects are becoming a big trend.[1] However, since the release of Scratch 2.0, their popularity has dramatically decreased.[citation needed] 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

Archive.png
The subject of this article or section has changed dramatically and requires updating. Please keep in mind that some of the information or images may not be accurate or relevant to the current version of Scratch, the Scratch website, or the article subject.
  • 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, so these projects use the Pen to draw objects. This is slow and time-consuming to program, so these projects are also difficult to make.

An example can be found here. Notice how the cars are drawn by a long script consisting mainly of Motion Blocks.

References

  1. http://scratch.mit.edu/forums/viewtopic.php?pid=337823#p337823
  2. http://scratch.mit.edu/galleries/view/142631
  3. http://scratch.mit.edu/forums/viewtopic.php?pid=337823#p337823

External Links

  • This page was last modified on 5 April 2014, at 21:50.