<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://peda.net/:static/532/atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Ping Pong -peli</title>
<id>https://peda.net/id/fde9167ebf2</id>
<updated>2022-04-18T18:27:00+03:00</updated>
<link href="https://peda.net/id/fde9167ebf2:atom" rel="self" />
<link href="https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2#top" rel="alternate" />
<logo>https://peda.net/:static/532/peda.net.logo.bg.svg</logo>
<rights type="html">&lt;div class=&quot;license&quot;&gt;Tämän sivun lisenssi &lt;a rel=&quot;license&quot; href=&quot;https://peda.net/info&quot;&gt;Peda.net-yleislisenssi&lt;/a&gt;&lt;/div&gt;&#10;</rights>

<entry>
<title>Ping Pong -peli</title>
<id>https://peda.net/id/3b41f85cbf2</id>
<updated>2022-04-19T08:14:36+03:00</updated>
<link href="https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli#top" />
<content type="html">&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;&lt;span class=&quot;TextRun SCXW165212074 BCX0&quot; lang=&quot;FI-FI&quot;&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;&lt;span class=&quot;NormalTextRun SCXW165212074 BCX0&quot;&gt;Ohjelmointi tapahtuu osoitteessa &lt;/span&gt;&lt;/span&gt;&lt;a class=&quot;Hyperlink SCXW165212074 BCX0&quot; href=&quot;https://scratch.mit.edu/&quot; rel=&quot;noreferrer noopener nofollow ugc&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;TextRun Underlined SCXW165212074 BCX0&quot; lang=&quot;FI-FI&quot;&gt;&lt;!--filtered attribute: data-contrast=&quot;none&quot;--&gt;&lt;span class=&quot;NormalTextRun SCXW165212074 BCX0&quot;&gt;&lt;!--filtered attribute: data-ccp-charstyle=&quot;Hyperlink&quot;--&gt;https://scratch.mit.edu/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;TextRun SCXW165212074 BCX0&quot; lang=&quot;FI-FI&quot;&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;&lt;span class=&quot;NormalTextRun SCXW165212074 BCX0&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;EOP SCXW165212074 BCX0&quot;&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;Ping Pong –peli on mukaelma 70 –luvun klassikkopelistä Pong. Pelissä on pallo, joka kimpoilee reunoista, ja joka ei saa osua peliruudun alareunassa olevaan värilliseen alueeseen. Alareunassa nuolinäppäimillä liikuteltavalla alustalla estetään pallon osumista värilliseen alueeseen.&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Joka kerta, kun pallo osuu alustaan, saadaan piste, ja joka kerta kun pallo osuu alareunaan, menetetään yksi elämä.&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;br/&gt;&#10;&lt;br/&gt;&#10;Testaa tässä peliä (&lt;b&gt;Peli käynnistyy välilyönti-näppäimestä&lt;/b&gt;!):&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;iframe src=&quot;https://scratch.mit.edu/projects/677195383/embed&quot; width=&quot;485&quot; height=&quot;402&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt;&lt;/iframe&gt;​&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Alkuvalmisteluja&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Aloita valitsemalla pelille haluamasi tausta. Piirrä taustan alareunaan jonkin värinen alaosa, johon pallo ei saa osua.&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/1.jpg#top&quot; title=&quot;1.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/1.jpg:file/photo/d37381276347480ac264571dbdf200248f0421cd/1.JPG&quot; alt=&quot;&quot; title=&quot;1.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Seuraavaksi luo kaksi hahmoa: pallo (Ball) ja alusta (Paddle):&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/2.jpg#top&quot; title=&quot;2.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/2.jpg:file/photo/6868069e42885e63e86b4a6d18a2bc1c5ce0252c/2.JPG&quot; alt=&quot;&quot; title=&quot;2.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Luo kaksi uutta muuttujaa: ‘Pisteet’ ja ‘Elämät’:&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/3.jpg#top&quot; title=&quot;3.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/3.jpg:file/photo/999e652f1374b60710965c6420e1e1118509ff00/3.JPG&quot; alt=&quot;&quot; title=&quot;3.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Pallon ja alustan liikkuminen&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Valitse pallolle ja alustalle aloituskohdat, josta ne lähtevät liikkeelle pelin alkaessa. Asetetaan myös muuttujille ‘Elämät’ ja ‘Pisteet’ aloitusarvot.&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Alusta:&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/4.jpg#top&quot; title=&quot;4.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/4.jpg:file/photo/da4c6ef7e5586ec6f27e4d2525f38f89408b54bb/4.JPG&quot; alt=&quot;&quot; title=&quot;4.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Laita alusta liikkumaan oikealle ja vasemmalle nuolinäppäimillä!&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Pallo:&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/5.jpg#top&quot; title=&quot;5.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/5.jpg:file/photo/6b90f17163a54b017076d0db58ebb52d9a6acfbc/5.JPG&quot; alt=&quot;&quot; title=&quot;5.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span class=&quot;TextRun SCXW267758498 BCX0&quot; lang=&quot;FI-FI&quot;&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;&lt;span class=&quot;NormalTextRun SCXW267758498 BCX0&quot;&gt;Seuraavaksi pallo pitäisi saada liikkumaan niin, että se kimpoaa seinästä ja vaihtaa suuntaa osuessaan alustaan. Asetetaan pallo lähtemään liikkeelle satunnaiseen suuntaan välilyöntiä painaessa:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;EOP SCXW267758498 BCX0&quot;&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/10.jpg#top&quot; title=&quot;10.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/10.jpg:file/photo/91a83c2f291af1214f62b5a18bcf4d85fc66a706/10.JPG&quot; alt=&quot;&quot; title=&quot;10.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Pallon suunta pitäisi saada muuttumaan, kun pallo osuu seiniin tai alustaan, ja peli alkamaan alusta, jos pallo osuu alareunaan. Nämä saadaan tehtyä jos –komennon avulla:&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;&lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/7.jpg2#top&quot; title=&quot;7.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/7.jpg2:file/photo/360320fad4f049ed48e1f88489130dc6e0cc0670/7.JPG&quot; alt=&quot;&quot; title=&quot;7.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;Mieti, mitä komentoja voisit jos –silmukan sisään laittaa (tai katso mallit alta). &lt;b&gt;Mieti itse, mitkä arvot tyhjiin kohtiin kannattaa laittaa!&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/8.jpg2#top&quot; title=&quot;8.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/8.jpg2:file/photo/1ec979441ed7b8b3cd4fb60ff598a321339ff764/8.JPG&quot; alt=&quot;&quot; title=&quot;8.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;Lopuksi lisätään jos –silmukkaan komento, joka lopettaa pelin, jos elämät menevät nollille:&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;a href=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/9.jpg#top&quot; title=&quot;9.JPG&quot;&gt;&lt;img src=&quot;https://peda.net/p/annakaisa.markkanen/scratch-peleja/ping-pong-peli2/ping-pong-peli/9.jpg:file/photo/fb116406b2e5e44af54341328f4fb01d850d5c5f/9.JPG&quot; alt=&quot;&quot; title=&quot;9.JPG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt; &lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;HIENOA, olet saanut tehtyä oman Ping Pong -pelisi! &lt;/span&gt;&lt;strong class=&quot;editor red&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;none&quot;--&gt;Näytä valmis peli opelle&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;!--filtered attribute: data-contrast=&quot;auto&quot;--&gt;!&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;&lt;!--filtered attribute: data-ccp-props=&quot;{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}&quot;--&gt; &lt;/span&gt;&lt;/p&gt;&#10;</content>
<published>2022-04-18T18:21:34+03:00</published>
</entry>


</feed>