Hopscotch (programming language): Difference between revisions

Content deleted Content added
Preplime (talk | contribs)
remove a "when" rule that doesn't exist
Tags: Mobile edit Mobile web edit Advanced mobile edit
added notice about forum closure
 
(42 intermediate revisions by 27 users not shown)
Line 1:
{{Short description|Programming language}}
{{Multiple issues|
{{notability|date=September 2013}}
{{more citations needed|date=June 2016}}
{{Underlinked|date=June 2016}}
{{Primary sources|date=July 2019}}
{{Tone|date=December 2024}}
}}
'''Hopscotch''' is a [[visual programming language]] developed by Hopscotch Technologies, designed to allow young or beginner [[programmers]] to develop simple projects. Its simple [[User interface|UI]] allows its users to drag and drop blocks to create [[Script (computer programming)|scripts]] that can be played when activated. Although the language is easy to use for simple programming, it lacks the power to be used for more complex programs. The use of the language is through an [[iPad]] or [[iPhone]] supporting Hopscotch.<ref name="Hanselminutes PodcastPodcast2">[http://www.hanselminutes.com/417/i-am-teaching-my-daughter-to-code-with-hopscotch-fitzgerald-steele Hanselminutes Podcast, Show #417], Apr 04, 2014, titled "I am teaching my daughter to code with Hopscotch - Fitzgerald Steele", 30-minute interview with father whose daughter tried Hopscotch app on iPad.</ref>
 
'''Hopscotch''' is a [[visual programming language]] developed by Hopscotch Technologies, designed to allow young or beginner [[programmers]] to develop simple projects. Its simple [[User interface|UI]] allows its users to drag and drop blocks to create scripts that can be played when activated. Although the language is easy to use for simple programming, it lacks the power to be used for more complex programs. The use of the language is through an iPad or iPhone supporting Hopscotch.<ref name="Hanselminutes Podcast">[http://www.hanselminutes.com/417/i-am-teaching-my-daughter-to-code-with-hopscotch-fitzgerald-steele Hanselminutes Podcast, Show #417], Apr 04, 2014, titled "I am teaching my daughter to code with Hopscotch - Fitzgerald Steele", 30-minute interview with father whose daughter tried Hopscotch app on iPad.</ref>
 
==Software development==
The idea sprang from an already existing programming tool, [[Scratch (programming language)|Scratch]], where the user drags blocks into scripts in succession to create a script. ThisThe is found much easier by children than typing out the code manually like other programming languages tend to use. The[[Software developer|developers]] of Hopscotch wanted to take a step back from Scratch, making it slightly easier to grasp the concepts and easier to use, sothe removed many blocks and added some of their ownconcepts. Hopscotch's notion of events, and rules combining conditions with actions, is similar to [[AgentSheets]].
 
Hopscotch includes basic programming blocks and functionalities such as [[Variable (computer science)|variables]], [[Sprites (computer graphics)|sprites]] (called objects) and text objects, butas alsowell as features considered more advanced such as self-[[Variable (mathematics)|variables]], math[[Function (mathematics)|maths functions]] and more.
 
== Editor ==
[[File:Hopscotch iPhone editorHopscotch_iPhone_editor.png|thumb|Hopscotch iPhone editor]]
[[File:Hopscotch ipad editorHopscotch_ipad_editor.jpg|thumb|223x223px|Hopscotch iPad editor|223x223px]]
The Hopscotch app uses a UI[[Visual very similar to that of Scratch. Use of the editor is simple, all one has to do is open the editor, tap the object and script you wish to edit, open one of theprogramming language|block-based tabs,programming and drag out code blocksUI]]. Most code blocks can have [[Number|numeric]], text, or math inputs., e.g.allowing thefor "move"both blockstatic and dynamic outputs. The editor work area is mainly based on a [[Grid graph|grid]] divided into X and Y- [[Coordinate system|coordinates]].
 
=== Editor history ===
The Hopscotch Editor is available on [[iPhone]] and [[iPad]]. The iPhone version only supported viewing projects until early 2016,<ref>{{Cite web|title=Help us test the *new* iPhone app!|url=https://forum.gethopscotch.com/t/help-us-test-the-new-iphone-app/10154|titleaccess-date=Help us test the *new* iPhone app!2018-05-06|website=Hopscotch Forum|languagedate=en22 March 2016 |access-datelanguage=2018-05-06en}}</ref> when an update supporting editing and account functionality was released. The Hopscotch iPhone projects play in an iPhone format even on the iPad and web player. A version for Android is not planned for release (as of 2021).
 
=== WhenEvent blocks/inputs ===
Event blocks are conditional triggers that activate when a specific set of parameters is reached, triggering any associated Code blocks within the activated Event block. As of September 26, 2023, Hopscotch contains 40 Event blocks, including interactions, comparisons, and collision detection.
When inputs are the trigger for the script to activate, when a "when" block's input is true (the "when project starts" when the block is triggered when one opens the player or taps the refresh button)
 
<blockquote>list of "when" blocks:</blockquote><blockquote>play button is tapped</blockquote><blockquote>character is tapped</blockquote><blockquote>iPad (iPhone) is tapped</blockquote><blockquote>() is tapped</blockquote><blockquote>() is pressed</blockquote><blockquote>() bumps ()</blockquote><blockquote>() is touching ()</blockquote><blockquote>iPad (iPhone) is tilted (up, down, left, right)</blockquote><blockquote>iPad (iPhone) detects a loud noise</blockquote><blockquote>iPad is shaken</blockquote><blockquote>() is swiped (up, down, left, right)</blockquote><blockquote>when I hear</blockquote><blockquote>() equals ()</blockquote><blockquote>() > ()</blockquote><blockquote>() < ()</blockquote><blockquote>() ≠ ()</blockquote><blockquote>object is cloned</blockquote><blockquote>(>,<,=,!=) (and, or) (>,<,=,!=)</blockquote>
 
=== Code blocks ===
Code blocks are individual actions triggered upon the activation of Event blocks, activated in descending order. Code blocks fall into six categories: Abilities, Movement, Looks & Sounds, Drawing, Variables, and Controls. Abilities are containers for Code blocks, creating a function which can be duplicated and reused within a project. Movement blocks control the positioning and rotation of objects. Looks & Sounds blocks control the scale and appearance of objects, text manipulation, sound playback, and transparency of objects. Drawing blocks paint preset colors to the background layer of a project, with additional options for stroke width and [[RGB color model|RGB]]/[[HSL and HSV|HSB]] support for custom colors. Variable blocks handle data storage and modification, with support for [[String (computer science)|strings]] and numerical inputs. Control blocks provide miscellaneous functionality, such as if/else conditionals, message passing, and waiting a set amount of time.
Code blocks are the actions completed when the blocks are triggered, code blocks fall into 6 categories: abilities, movement, drawing, looks & sounds, values, and control flow.
Drag these into and out of the scripts to modify them. Movement blocks make the character move physically on the screen. Ability blocks let you make your own subprogram blocks to duplicate code in a Hopscotch project. Drawing blocks make an object draw stuff. There are 2 “draw” blocks, Draw a Trail and Clear. Draw a trail that draws a trail of selected color and width. There are HSB and RGB options for color. Width is determined by the number of pixels in that trail (citation needed). Looks & sounds blocks are blocks that change the object's looks (such as size, invisibility, and color). Value blocks are blocks that set a value to a specific number or change a value by a specific number. Finally, control flow blocks can either repeat a code multiple or infinite times or add a condition which will make the code inside it execute only if the condition is matched. There is 1 exception, the “Create a Clone” block creates a clone of the object. The clone will not execute any of the code programmed for the original object. That's the job of the “When an object is cloned” block.<!-- This section needs to be completed. -->
 
=== Drawing blocks ===
Drawing blocks in Hopscotch work similar to the [https://docs.python.org/3/library/turtle.html turtle] module in [[Python (programming language)|Python]], allowing easy and more complex art to be coded.
 
== Player ==
[[File:Hopscotch iPad playerHopscotch_iPad_player.jpg|thumb|Hopscotch iPad player, playing project]]
 
=== In-app player ===
Line 40 ⟶ 34:
 
=== Webplayer ===
The "player" is also available on the web (known as the "Webplayer"). The web player brings HopscotchsHopscotch projects to almost any browser. It is designed to work the same as the in-app player. Although, thethough webit playerhas doesa not have any functionality fordifferent coding, uploading,layout orthan likingthe projectsapp. The web version of a project is only accessible via its unique link that is formatted like this: <code><nowiki>https://c.gethopscotch.com/p/(project</nowiki>'''project id)ID'''</code>
 
Both the in-app and the webplayerweb isplayer are written in [[JavaScript]].
 
There is also currently a version being developed as of 2024 for easier access to Hopscotch through a computer.
 
== Subscription ==
Currently, there is a Hopscotch subscription. It costs $79.99 a year or $9.99 a month. The subscription allows access to adding photos or drawings, 30 “seeds” (the form of Hopscotch currency) a month, custom avatars, user variables, and more. In order to make an account, you must purchase the subscription to post or create a draft. Teacher accounts do not need the subscription, nor does signing up through the Webplayer.
 
== Hopscotch Forum ==
[https://forum.gethopscotch.comThe Hopscotch Forum] is anthe official online forum discussionfor whereHopscotch, youfor canusers askto aboutdiscuss yourHopscotch codeprojects, collaborateprogramming, onand aview project,update andinformation morefor changes made to the Hopscotch app. YouUsers canmay also discusshost aboutor theparticipate appin Competitions or Events, and alsocollaborate reporton bugsprojects.
 
As of December 2024, the Hopscotch Forum has transitioned to a Discord server and placed it on read-only mode.
== Languages ==
Supported languages: English, Simplified Chinese, Spanish.
 
== Languages ==
How to change languages in Hopscotch: iPad >> Settings >> General >> Language & Region >> iPad Language >> (Select a Hopscotch-supported language).
Supported languages: [[English language|English]], Simplified [[Chinese language|Chinese]], [[Spanish language|Spanish]].
 
== References ==
<ref>{{Cite web|url=http://www.gethopscotch.com|title=Hopscotch - Make your own game. Learn to code.|website=Hopscotch|access-date=2016-06-20}}</ref>
{{Reflist}}
* Hopscotch app: https://itunes.apple.com/us/app/hopscotch-coding-for-kids/id617098629?mt=8&ign-mpt=uo%3D4
* hopscotch website: https://www.gethopscotch.com/
 
== External links ==
* {{Official website}}
{{Authority control}}
[[Category:Visual programming languages]]
[[Category:Educational programming languages]]