🎯 Scratch คืออะไร? (What is Scratch?)
ภาพรวมของ Scratch
Scratch เป็นภาษาโปรแกรมมิ่งแบบ visual (มองเห็นได้) ที่พัฒนาโดย MIT (Massachusetts Institute of Technology) สำหรับเด็กและผู้เริ่มต้นเรียนรู้การเขียนโปรแกรม แทนที่จะพิมพ์โค้ด คุณจะลากและวางบลอก (blocks) ที่มีสีสันต่างๆ เหมือนการต่อตัวต่อเลโก้
สิ่งที่คุณสามารถทำได้ด้วย Scratch:
- สร้างเกมส์อินเทอร์แอคทีฟ (Interactive games) เช่น เกมวิ่งกระโดด, เกมผจญภัย
- ทำแอนิเมชั่นและการ์ตูน (Animations and cartoons) ด้วยการเคลื่อนไหวของตัวละคร
- สร้างเรื่องราวแบบโต้ตอบได้ (Interactive stories) ที่ผู้ใช้สามารถเลือกทางเดินเรื่องได้
- ออกแบบศิลปะดิจิทัลและดนตรี (Digital art and music) ด้วยเอฟเฟกต์พิเศษ
- สร้างโปรเจกต์การศึกษา (Educational projects) เช่น แบบจำลองทางวิทยาศาสตร์
- พัฒนาทักษะการคิดเชิงคำนวณ (Computational thinking) และการแก้ปัญหา
- แบ่งปันผลงานกับชุมชน Scratch ทั่วโลก
English: Scratch is a visual programming language that makes coding easy and fun by using colorful blocks instead of typing code.
📚 คำศัพท์สำคัญ (Key Vocabulary)
💡 Fun Fact!
Scratch uses color-coding! Each color represents a different type of block. Blue = Movement, Purple = Looks, Pink = Sound, Yellow = Events!
Scratch ใช้สีเพื่อแยกประเภท! น้ำเงิน = การเคลื่อนไหว, ม่วง = รูปลักษณ์, ชมพู = เสียง, เหลือง = เหตุการณ์!
A character or object that can move on the stage
The white area where sprites move and perform
A puzzle piece of code that snaps together with other blocks
A group of blocks connected together to perform a task
A different appearance or pose of a sprite
The background image of the stage
Blue blocks used for movement
Purple blocks used to change appearance
Pink blocks used to play sounds and music
Yellow blocks that start scripts
Orange blocks for loops and conditions
Light blue blocks that detect interactions
Green blocks for math and comparisons
Orange blocks that store data and values
Repeating commands multiple times
Checking if something is true or false
The button that starts your program
A copy of a sprite
Great job! You've learned 18 important vocabulary words!
💬 ประโยคสำคัญ
Key Sentences
✨ Practice These Common Phrases! / ฝึกประโยคที่ใช้บ่อย!
These are sentences you'll hear and use often when learning Scratch!
เหล่านี้คือประโยคที่คุณจะได้ยินและใช้บ่อยเมื่อเรียน Scratch!
🇹🇭 ไทย: เมื่อคลิกธงเขียว โปรแกรมจะเริ่มทำงาน
🇬🇧 English: When the green flag is clicked, the program starts running.
🇹🇭 ไทย: คุณสามารถลากบลอกจากพาเลตไปยังพื้นที่เขียนสคริปต์
🇬🇧 English: You can drag blocks from the palette to the scripting area.
🇹🇭 ไทย: บลอกที่มีสีเหมือนกันจะทำหน้าที่คล้ายกัน
🇬🇧 English: Blocks with the same color have similar functions.
🇹🇭 ไทย: คุณต้องต่อบลอกเข้าด้วยกันเพื่อสร้างสคริปต์
🇬🇧 English: You need to snap blocks together to create a script.
🇹🇭 ไทย: สไปรท์สามารถมีหลายคอสตูมเพื่อสร้างแอนิเมชั่น
🇬🇧 English: Sprites can have multiple costumes to create animations.
🇹🇭 ไทย: ลูปช่วยให้คุณทำซ้ำคำสั่งโดยไม่ต้องเขียนหลายครั้ง
🇬🇧 English: Loops help you repeat commands without writing them multiple times.
🇹🇭 ไทย: ตัวแปรใช้เก็บข้อมูลเช่น คะแนนหรือชื่อผู้เล่น
🇬🇧 English: Variables are used to store data like scores or player names.
🇹🇭 ไทย: คุณสามารถเปลี่ยนฉากหลังเพื่อสร้างระดับหรือฉากที่แตกต่างกัน
🇬🇧 English: You can change backdrops to create different levels or scenes.
🇹🇭 ไทย: ใช้บลอก sensing เพื่อตรวจจับคีย์บอร์ดหรือเมาส์
🇬🇧 English: Use sensing blocks to detect keyboard or mouse input.
Excellent! Now you know important programming sentences!
⚖️ เปรียบเทียบ Scratch กับ Python
ความแตกต่างระหว่าง Scratch และ Python
🎨 Scratch
- Visual Programming: ใช้บลอกสีสันแทนการพิมพ์โค้ด
- เหมาะสำหรับ: เด็กและผู้เริ่มต้นอายุ 8-16 ปี
- ง่ายต่อการเรียนรู้: ไม่ต้องจำไวยากรณ์ซับซ้อน
- ใช้งาน: ทำเกม แอนิเมชั่น และโปรเจกต์สร้างสรรค์
- ไม่มีข้อผิดพลาดไวยากรณ์: ต่อบลอกผิดไม่ได้
- ผลลัพท์เห็นทันที: มองเห็นการเปลี่ยนแปลงแบบเรียลไทม์
- จำกัด: ไม่เหมาะสำหรับโปรแกรมขั้นสูง
🐍 Python
- Text-based Programming: เขียนโค้ดด้วยตัวอักษร
- เหมาะสำหรับ: วัยรุ่นและผู้ใหญ่ที่มีพื้นฐาน
- มีประสิทธิภาพสูง: สร้างโปรแกรมที่ซับซ้อนได้
- ใช้งาน: เว็บไซต์, AI, การวิเคราะห์ข้อมูล, วิทยาศาสตร์
- ต้องเรียนรู้ไวยากรณ์: มีกฎการเขียนที่ชัดเจน
- มีข้อผิดพลาด: ต้องแก้ไข syntax errors
- ใช้งานจริง: ใช้ในอุตสาหกรรมทั่วโลก
ความคล้ายคลึงกัน:
- ทั้งสองใช้แนวคิด: ตัวแปร (Variables), ลูป (Loops), และเงื่อนไข (Conditions)
- สอนการคิดเชิงตรรกะและการแก้ปัญหา
- สามารถสร้างเกมและโปรแกรมโต้ตอบได้
- Scratch เป็นจุดเริ่มต้นที่ดีก่อนเรียน Python
ตัวอย่างเปรียบเทียบ: การทักทายผู้ใช้
Scratch: ใช้บลอก "say Hello! for 2 seconds" (สีม่วง)
Python: ใช้คำสั่ง print("Hello!")
English: Scratch is perfect for beginners because it uses visual blocks, while Python is more powerful but requires typing code and learning syntax.
🖥️ วิธีใช้งาน Scratch Editor
ส่วนประกอบหลักของ Scratch Editor:
1. พื้นที่แสดงผล (Stage Area) - ด้านบนขวา
เป็นที่ที่คุณจะเห็นสไปรท์เคลื่อนไหวและโปรแกรมทำงาน ขนาด 480 x 360 พิกเซล
- กดธงเขียว (Green Flag) เพื่อเริ่มโปรแกรม
- กดปุ่มหยุด (Stop) รูปหกเหลี่ยมสีแดง เพื่อหยุดโปรแกรม
- สามารถเปลี่ยนโหมดเต็มจอได้
2. รายการสไปรท์ (Sprite List) - ด้านล่างขวา
แสดงสไปรท์ทั้งหมดในโปรเจกต์ของคุณ
- คลิกไอคอนแมว (Choose a Sprite) เพื่อเพิ่มสไปรท์ใหม่
- คลิกที่สไปรท์เพื่อเลือกและแก้ไข
- สไปรท์ที่เลือกจะมีกรอบสีน้ำเงิน
3. Block Palette (บล็อกพาเลต) - ด้านซ้าย
บริเวณที่มีบลอกคำสั่งทั้งหมดแบ่งเป็น 9 หมวดหมู่:
- Motion (สีน้ำเงิน) - การเคลื่อนไหว
- Looks (สีม่วง) - รูปลักษณ์
- Sound (สีชมพู) - เสียง
- Events (สีเหลือง) - เหตุการณ์
- Control (สีส้ม) - การควบคุม
- Sensing (สีฟ้า) - การรับรู้
- Operators (สีเขียว) - ตัวดำเนินการ
- Variables (สีส้มเข้ม) - ตัวแปร
- My Blocks (สีแดงอมม่วง) - ฟังก์ชันที่สร้างเอง
4. Scripting Area (พื้นที่เขียนสคริปต์) - ตรงกลาง
พื้นที่ว่างๆ ที่คุณจะลากบลอกมาต่อกันเพื่อเขียนโปรแกรม
- ลากบลอกจาก Block Palette มาวางที่นี่
- ต่อบลอกเข้าด้วยกัน จะมีเสียง "คลิก" เมื่อต่อได้
- ดับเบิลคลิกที่บลอกเพื่อทดสอบการทำงาน
- ลากบลอกกลับไปที่ Palette เพื่อลบ
5. แท็บด้านบน (Tabs)
มี 3 แท็บสำหรับแต่ละสไปรท์:
- Code: เขียนและแก้ไขสคริปต์
- Costumes: แก้ไขรูปร่างและท่าทางของสไปรท์
- Sounds: เพิ่มและแก้ไขเสียง
ขั้นตอนการใช้งานพื้นฐาน:
- เปิดเว็บไซต์ scratch.mit.edu
- คลิก "Create" เพื่อสร้างโปรเจกต์ใหม่
- เลือกหมวดบลอกจาก Block Palette
- ลากบลอกมาวางในพื้นที่เขียนสคริปต์
- ต่อบลอกเข้าด้วยกันตามที่ต้องการ
- คลิกธงเขียวเพื่อทดสอบโปรแกรม
- บันทึกงานโดยคลิก "File" > "Save now"
English: The Scratch editor has four main areas: the Stage where your program runs, the Block Palette with all available blocks, the Scripting Area where you build your code, and the Sprite List showing all characters in your project.
🎮 บทเรียน: สร้างเกมจับแมว
Tutorial: Make a Catch the Cat Game
🎯 What You'll Learn / สิ่งที่คุณจะได้เรียนรู้
English: In this tutorial, you'll create your first interactive game! You'll learn to make sprites move, detect collisions, keep score, and respond to player actions.
ไทย: ในบทเรียนนี้ คุณจะสร้างเกมแบบโต้ตอบเกมแรกของคุณ! คุณจะได้เรียนรู้การทำให้สไปรท์เคลื่อนไหว ตรวจจับการชน นับคะแนน และตอบสนองต่อการกระทำของผู้เล่น
โครงการ: เกมจับแมวอย่างง่าย 🐱
เราจะสร้างเกมที่ผู้เล่นต้องเคลื่อนที่เพื่อจับแมวที่วิ่งหนีไปมา และนับคะแนน
Project: Simple Cat Catching Game 🐱
We will create a game where the player must move to catch a cat that runs around randomly, and keep score of how many times you catch it!
1ขั้นตอนที่ 1: เตรียมสไปรท์
🇹🇭 ไทย: เพิ่มสไปรท์ที่จำเป็น
- ใช้สไปรท์แมว (Cat) ที่มีอยู่แล้ว - นี่จะเป็นตัวที่ต้องจับ
- เพิ่มสไปรท์ลูกบอล (Ball) หรือ ไม้กายสิทธิ์ (Wand) - นี่จะเป็นตัวที่เราควบคุม
- คลิก Backdrops และเลือกฉากหลังที่ชอบ เช่น สวน (Garden)
🇬🇧 English: Step 1: Prepare the Sprites
Add the necessary sprites for our game.
- Use the Cat sprite that's already there - this will be the character we need to catch
- Add a Ball sprite or Wand sprite - this will be the character we control
- Click on Backdrops and choose a background you like, such as Garden
Why? The ball or wand follows your mouse, and you try to touch the cat with it!
2ขั้นตอนที่ 2: สร้างตัวแปรคะแนน
🇹🇭 ไทย: สร้างตัวแปรเพื่อเก็บคะแนน
- ไปที่หมวด "Variables" (สีส้ม)
- คลิก "Make a Variable"
- ตั้งชื่อว่า "Score" หรือ "คะแนน"
- เลือก "For all sprites"
🇬🇧 English: Step 2: Create a Score Variable
Create a variable to store and display the score.
- Go to the "Variables" category (orange blocks)
- Click "Make a Variable"
- Name it "Score"
- Select "For all sprites"
Remember: Variables are like boxes that store information. This one will count how many times you catch the cat!
3ขั้นตอนที่ 3: เขียนโค้ดสำหรับลูกบอล
🇹🇭 ไทย: ทำให้ลูกบอลเคลื่อนไหวตามเมาส์
บลอกที่ต้องใช้:
คำอธิบายแต่ละบลอก:
- when green flag clicked - เริ่มโปรแกรมเมื่อคลิกธงเขียว
- set Score to 0 - ตั้งค่าคะแนนเป็น 0
- forever - วนซ้ำตลอด
- go to mouse-pointer - เคลื่อนที่ไปที่ตำแหน่งเมาส์
🇬🇧 English: Step 3: Code for the Ball (The Controller)
Make the ball follow the mouse pointer so you can control it.
Explanation of each block:
- when green flag clicked - This starts the program when you click the green flag
- set Score to 0 - This resets the score to zero at the beginning
- forever - This creates a loop that repeats forever
- go to mouse-pointer - This makes the ball move to wherever your mouse is
How to build it: Drag the "when green flag clicked" block first. Then snap the "set Score to 0" below it. Then wrap everything in a "forever" loop. Put "go to mouse-pointer" inside the forever loop.
4ขั้นตอนที่ 4: เขียนโค้ดสำหรับแมว (ตัวที่ต้องจับ)
🇹🇭 ไทย: ทำให้แมววิ่งหนีและนับคะแนนเมื่อถูกจับ
แมวต้องมี 2 สคริปต์ ทำงานพร้อมกัน!
🇬🇧 English: Step 4: Code for the Cat (The Target)
Make the cat run away randomly and count points when it's caught.
The cat needs 2 separate scripts running at the same time!
สคริปต์ที่ 1: การเคลื่อนไหวสุ่ม
Script 1: Random Movement
คำอธิบาย:
- move 5 steps - เคลื่อนที่ 5 ก้าว
- if on edge, bounce - เด้งกลับเมื่อชนขอบ
- turn right (random) - หมุนแบบสุ่ม 1-10 องศา
Explanation:
- move 5 steps - The cat walks forward 5 steps
- if on edge, bounce - When the cat hits the edge, it bounces back
- turn right (pick random 1 to 10) - The cat randomly turns between 1 and 10 degrees to make unpredictable movement
Tip: You can change "5 steps" to make the cat faster or slower! Try 10 for fast, or 3 for slow.
สคริปต์ที่ 2: ตรวจจับการสัมผัส
Script 2: Detect Touching (Collision Detection)
คำอธิบาย:
- if touching Ball? - ถ้าสัมผัสกับลูกบอล
- change Score by 1 - เพิ่มคะแนน 1
- play sound meow - เล่นเสียงเหมียว
- go to random position - ไปที่ตำแหน่งสุ่ม
Explanation:
- if touching Ball? - This checks if the cat is touching the ball sprite
- change Score by 1 - Add 1 point to the score
- play sound meow - Play a meow sound effect when caught
- go to random position - Move the cat to a random spot on the stage
This is how the game works! Every time your ball touches the cat, you get a point and the cat jumps to a new location!
Awesome! You just created your first game!
Beginner Level Complete!
5ขั้นตอนที่ 5: ทดสอบและปรับปรุง
🇹🇭 ไทย: ทดลองเล่นและทำให้ดีขึ้น
- คลิกธงเขียวเพื่อเริ่มเกม
- เคลื่อนเมาส์ไปจับแมว
- ดูว่าคะแนนเพิ่มขึ้นไหม
- ลองเล่นหลายครั้ง!
🇬🇧 English: Step 5: Test and Improve
Try playing your game and make it better!
- Click the green flag to start the game
- Move your mouse to catch the cat
- Watch the score increase
- Try playing multiple times!
💡 Pro Tips for Improvement / เคล็ดลับการปรับปรุง
ไอเดียการปรับปรุงเกม:
- เพิ่มความเร็วของแมวเมื่อคะแนนสูงขึ้น (เพิ่มความท้าทาย!)
- เพิ่มเวลานับถอยหลังด้วยตัวแปร Timer
- เพิ่มสไปรท์ที่สองที่วิ่งเร็วกว่าและให้คะแนนมากกว่า
- เพิ่มเสียงพื้นหลัง (Background Music)
- สร้างหน้าจอ Game Over เมื่อหมดเวลา
- เปลี่ยนคอสตูมของแมวเพื่อให้ดูเหมือนวิ่ง
Game Improvement Ideas:
- Make the cat faster when the score gets higher (more challenging!)
- Add a countdown timer with a Timer variable
- Add a second sprite that moves faster and gives more points
- Add background music
- Create a Game Over screen when time runs out
- Change the cat's costume to make it look like it's running
🎓 สิ่งที่คุณได้เรียนรู้:
- การใช้ Event blocks (when green flag clicked)
- การใช้ Motion blocks (move, go to, turn)
- การใช้ Control blocks (forever, if-then)
- การใช้ Sensing blocks (touching?)
- การใช้ Variables (Score)
- การใช้ Operators (pick random)
- การใช้ Sound blocks (play sound)
- การทำงานหลายสคริปต์พร้อมกัน
🎓 What You Learned:
- How to use Event blocks (when green flag clicked)
- How to use Motion blocks (move, go to, turn)
- How to use Control blocks (forever, if-then)
- How to use Sensing blocks (touching?)
- How to use Variables (Score)
- How to use Operators (pick random)
- How to use Sound blocks (play sound)
- How to run multiple scripts at the same time
🎯 Challenge Time! / เวลาท้าทาย!
🇹🇭 ไทย: ลองสร้างเกมของคุณเอง! คุณสามารถสร้าง:
- เกมผจญภัยที่มีหลายฉาก (Multi-scene adventure game)
- เกมเต้นตามจังหวะ (Rhythm game)
- เกมตอบคำถาม (Quiz game)
- แอนิเมชั่นเรื่องราว (Story animation)
- เกมแข่งรถ (Racing game)
- เกมจับผี (Ghost catching game)
- เกมเดินเก็บของ (Collection game)
🇬🇧 English: Try creating your own game! You can make:
- A multi-scene adventure game
- A rhythm or music game
- An educational quiz game
- An animated story
- A racing game
- A ghost catching game
- A collection or treasure hunt game
Remember: The best way to learn is by doing! Don't be afraid to experiment and try new things.
🔗 แหล่งข้อมูลเพิ่มเติม
Additional Resources
🌟 Did You Know? / รู้ไหม?
English: Over 90 million people have created projects on Scratch! It's used in more than 150 countries worldwide.
ไทย: มีผู้คนมากกว่า 90 ล้านคนสร้างโปรเจกต์บน Scratch แล้ว! และใช้งานในกว่า 150 ประเทศทั่วโลก
🌐 เว็บไซต์และทรัพยากร:
- Scratch Official Website: scratch.mit.edu - เว็บไซต์หลักของ Scratch (ฟรี 100%!)
- Scratch Wiki: คู่มือและเอกสารประกอบการเรียนรู้ภาษาอังกฤษ
- Scratch Community: แบ่งปันและเรียนรู้จากผู้อื่นทั่วโลก
- Scratch Tutorials: บทเรียนวิดีโอฟรีมากมายบน YouTube
- ScratchEd: ทรัพยากรสำหรับครูและผู้เรียน
🌐 Websites and Resources:
- Scratch Official Website: scratch.mit.edu - Main Scratch website (100% Free!)
- Scratch Wiki: Comprehensive guides and documentation
- Scratch Community: Share and learn from others worldwide
- Scratch Tutorials: Many free video tutorials on YouTube
- ScratchEd: Resources for teachers and learners
💪 เคล็ดลับการเรียนรู้:
- ฝึกฝนทุกวัน: แม้แค่ 15-30 นาที ก็จะช่วยให้คุณพัฒนาอย่างรวดเร็ว
- เริ่มง่ายๆ: เริ่มจากโปรเจกต์ง่ายๆ แล้วค่อยๆ เพิ่มความซับซ้อน
- เรียนรู้จากคนอื่น: ดู "Remix" โปรเจกต์ของคนอื่นและเรียนรู้จากโค้ด
- อย่ากลัวผิด: การทดลองและผิดพลาดคือวิธีเรียนรู้ที่ดีที่สุด!
- แบ่งปันผลงาน: อัพโหลดโปรเจกต์และรับคำแนะนำจากชุมชน
- ตั้งเป้าหมาย: สร้างโปรเจกต์ใหม่ทุกสัปดาห์
- เรียนภาษาอังกฤษไปด้วย: Scratch จะช่วยให้คุณฝึกอ่านภาษาอังกฤษด้วย!
💪 Learning Tips:
- Practice Daily: Even just 15-30 minutes a day helps you improve quickly
- Start Simple: Begin with easy projects and gradually increase complexity
- Learn from Others: "Remix" other people's projects and study their code
- Don't Fear Mistakes: Experimenting and making errors is the best way to learn!
- Share Your Work: Upload projects and get feedback from the community
- Set Goals: Try to create a new project every week
- Learn English Too: Scratch helps you practice reading English!
🎯 Your Learning Journey / เส้นทางการเรียนรู้ของคุณ
Level 1: Beginner 🌱 You're here! Learn basics
Level 2: Explorer 🔍 Create 5+ simple games
Level 3: Builder 🏗️ Make complex projects with multiple sprites
Level 4: Creator 🎨 Remix and improve others' projects
Level 5: Master 🏆 Share knowledge and help others!
🌈 สุดท้าย... / Finally...
ไทย: การเขียนโปรแกรมคือการสร้างสรรค์! ไม่มีคำตอบที่ถูกหรือผิดอย่างเดียว ลองทำให้สนุกและแสดงความคิดสร้างสรรค์ของคุณ!
English: Programming is creative! There's no single right or wrong answer. Have fun and express your creativity!
🎉 Happy Coding! / สนุกกับการเขียนโค้ด! 🎉
Made with 💙 for Thai English Learners
สร้างด้วย 💙 สำหรับคนไทยที่กำลังเรียนภาษาอังกฤษ
📱 Tap the 🔊 buttons anytime to hear English pronunciation!
กดปุ่ม 🔊 เมื่อไรก็ได้เพื่อฟังการออกเสียงภาษาอังกฤษ!