Hopscotch (programming language): Difference between revisions

Content deleted Content added
added necessary content
Tags: Reverted Mobile edit Mobile web edit
added notice about forum closure
 
(18 intermediate revisions by 12 users not shown)
Line 1:
{{Short description|Programming language}}
{{Multiple issues|
{{notability|date=September 2013}}
{{more citations needed|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 [[Beginners|beginner]] [[programmers]] to develop simple projects. It'sIts simple [[User interface|UI]] allows its users that have no life, friends and brain or IQ- to drag and drop blocks to create [[Script (computer programming)|scripts]] that can be played when activated. The use of the language is through an [[iPad]] or [[iPhone]] supporting Hopscotch.<ref name="Hanselminutes Podcast2">[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 [[Beginners|beginner]] [[programmers]] to develop simple projects. It's simple [[User interface|UI]] allows its users that have no life, friends and brain or IQ- to drag and drop blocks to create [[Script (computer programming)|scripts]] that can be played when activated. The use of the language is through an [[iPad]] or [[iPhone]] supporting Hopscotch.<ref name="Hanselminutes Podcast2">[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 existing programming tool, [[Scratch (programming language)|Scratch]], where the user drags blocks to create a script. The [[Software developer|developers]] of Hopscotch wanted to take a step back from Scratch, making it slightly easier to grasp and use the concepts. 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]], [[Function (mathematics)|maths functions]] and more.
 
== Editor ==
[[File:Hopscotch_iPhone_editor.png|thumb|Hopscotch iPhone editor]]
[[File:Hopscotch_ipad_editor.jpg|thumb|223x223px|Hopscotch iPad editor]]
The Hopscotch app uses a UI[[Visual veryprogramming similarlanguage|block-based toprogramming that of ScratchUI]]. 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|access-date=2018-05-06|website=Hopscotch Forum|date=22 March 2016 |language=en}}</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)
 
'''Event blocks:'''<blockquote><code>When Game Starts</code></blockquote><blockquote><code>When '''(Character)''' is tapped</code>
 
<code>When '''(Character)''' is pressed</code></blockquote><blockquote><code>When '''(Character)''' bumps '''(Character)'''</code>
 
<code>When '''(Character)''' is touching '''(Character)'''</code></blockquote><blockquote><code>When iPad is tilted '''(up, left, right or down)'''</code>
 
<code>When iPad hears a loud noise</code>
 
<code>When iPad is shaken</code></blockquote><blockquote><code>When '''(Character)''' is swiped '''(up, left, right or down)'''</code>
 
<code>When I hear a message '''(Text)'''</code></blockquote>'''Comparison blocks:'''<blockquote><code>'''(Value)''' = '''(Value)'''</code>
 
<code>'''(Value)''' ≠ '''(Value)'''</code>
 
<code>'''(Value)''' < '''(Value)'''</code>
 
<code>'''(Value)''' > '''(Value)'''</code>
 
<code>'''(Condition)''' and '''(Condition)'''</code>
 
<code>'''(Condition)''' or '''(Condition)'''</code></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. These can be dragged into and out of the scripts to modify them. Movement blocks make the character move physically on the screen. Ability blocks let one make 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 colour and width. There are [[HSB colour space|HSB]] and [[RGB]] options for colour. Width is determined by the number of [[pixels]] in that trail {{citation needed|date=March 2021}}. Looks & sound blocks change the object's looks (such as size, invisibility, and colour). Value blocks 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 turtle module in [[Python (programming language)|Python]], allowing art to be coded.<ref>{{Cite web|title=Hopscotch - Make your own game. Learn to code.|url=http://www.gethopscotch.com|access-date=2016-06-20|website=Hopscotch}}</ref>
 
== Player ==
Line 58 ⟶ 34:
 
=== Webplayer ===
The player is also available on the web (known as the "Webplayer"). The web player brings Hopscotch projects to almost any browser. It is designed to work the same as the in-app player, butthough theit webhas playera does 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/</nowiki>'''project ID'''</code>
 
Both the in-app and the web player 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 ==
The Hopscotch Forum is anthe official online forum for discussionHopscotch, for users to ofdiscuss Hopscotch projects, programming help, and view update information for changes made to the Hopscotch app. bugUsers reportsmay also host or participate in Competitions or Events, and collaborate on projects.
 
As of December 2024, the Hopscotch Forum has transitioned to a Discord server and placed it on read-only mode.
 
== Languages ==
Line 69 ⟶ 52:
 
== References ==
 
{{Reflist}}