Code a LEVEL EDITOR in Scratch | RPG Tutorial #4

283,862
0
Published 2022-09-24
How to code a Level Editor for your Scratch RPG game - This scrolling, tile based editor is the best level designer ever featured in a Griffpatch tutorial.
A Scratch Game of any size is much easier to create if you have a level editor built in. Learn how to snap to grid, display your brush tile, place new blocks, draw a palette / side panel of tiles to choose from, and more in this feature packed episode!

🚀 Boost Your Creativity with Griffpatch
The Griffpatch Academy will take you from "Gamer to Game Creator"
Learn more at 👉 griffpatch.academy/ 👈

😺 Scratch was developed by the Lifelong Kindergarten Group at the MIT Media Lab. See scratch.mit.edu/

👀 Episodes in the series:
Ep.1 - Craft your dream Scratch Game -    • RPG Tutorial | Craft your dream Scrat...  
Ep.2 - Infinite Scrolling & Tiles -    • 🐱 Infinite Scrolling & Tiles - Scratc...  
Ep.3 - I AM SPEED -    • ⚠️ LAG FREE Scrolling in Scratch 🐱 RP...  
Ep. 4 - Build a LEVEL EDITOR in Scratch -    • Code a LEVEL EDITOR in Scratch | RPG ...  
Ep. 5 - Split Screen & Multi Tile Assets -    • EDIT FASTER ⚡ Tile Tracing | Scratch ...  
Ep. 6 - Layers & Onion Skinning -    • LAYERS 🧅 "Onion Skinning" in Scratch ...  

🐱 Scratch Starter Projects with Assets - Remix this!
scratch.mit.edu/projects/725577493/

🐱 Scratch Studio for Your projects
scratch.mit.edu/studios/32038156/comments

-------------Video Chapters-------------
0:00 Intro
1:00 Save as a copy
1:20 Toggle Level Editor On & Off
3:22 Show Editor Cursor
7:17 Click to paint a tile
9:46 Brushes
11:53 Tile Picker – E key
13:10 Tile Palette Positioning
15:35 Camera Positioning changes for the Editor
19:54 Drawing the Tile Palette
24:15 Highlight Selected Tile
26:37 Select a new active brush from the palette
29:36

All Comments (21)
  • @griffpatch
    If you are using an ipad and want to continue, then instead of triggering the level editor off the 0 key, why not make a new sprite (a small button that you place in the top left of the screen perhaps), and when sprite clicked, put the level editing toggle code (the same as the when 0 key pressed scripts) in their instead! :_cool::_flag::_bug:
  • @ndukauzor6183
    Someone get this man an award for best YouTuber/Scratcher in the world because of how much time and effort he puts into his videos
  • @IamSamisMe
    Hey, I found a mistake in my coding that, with a bit of tweaking, might make a cool feature. When we disable painting behind the palette, I put a < instead of a > block, and accidentally put it in the Paint - Palette definition block. It didn't solve the painting behind the palette problem, but it made it so the palette only appeared when it was being hovered over. This feels like a potentially cool feature to implement, if you can figure out how to make both work at the same time, though that's above my paygrade. EDIT: I've implemented the intended system alongside the bug-turned-feature, and it worked! The only thing is that I can't figure out how not to shift the camera until the cursor is over the palette. EDIT 2: I've finally figured out what was wrong. When I added the Boolean to the player sprite, it also added the variable, which was never set by it's code, and was thus 0. When I replaced the variable in the inequality with the thing of thing block for its variable, it functioned. Now, the palette only appears when you hover over it, AND only re-centers to accommodate the palette when it's being hovered over. TL;DR: Coding mistake made a cool feature, implemented it, leads to new bug to fix, gets fixed, leads to improved editor.
  • @KiewieGames
    Omg, my heartbeat just starts racing when I see another episode of the greatest scratch series ever made
  • @eddgow
    i love how i dont understand a single word hes saying but i do understand at the same time. you are magic
  • The fact that Griffpatch is able to make any type of game possible is unbelievable, his efforts in making his videos are incredible, keep up the awesome work.👍🏾
  • @dagreenboi
    You're the greatest scratcher I wish I could support you more but I don't have enough money Edit: I've never gotten so much likes
  • Oh my gosh, dream game is coming true! You truly do put a lot of effort into these. There is nothing I can say that hasn't been said already, but truly: Thank you.
  • @sdbadik
    This is an amazing tutorial series. You explain it so well i could code a fullscreen editor palette myself. I can't wait to see the pin collision system! I hope the next tutorial will cover this topic.
  • @claudette1985
    The amount of work this man puts into his scratch projects and youtube videos is incredible
  • @legendgames128
    All of your tutorials have come in great use! Not only for building an RPG in this tutorial series, but also for other uses as well! Like making a board game on Scratch where you can move one of many pieces around, in this case!
  • I love how you make the scratch tutorials simple to understand for all ages, and there is always an amazing result
  • @aarizkhan9101
    Thank you so much for your awesome tutorials Griffpatch! I learn so much from them!😊
  • Griff Is The Most Hard-Working And Best Scratch Youtuber Of All Time! I Watch All His Videos, Even If It's A Tutorial And I'm Not Even Gonna Follow It Through And Actually Make It, As He's So Funny And Entertaining That I Want To Watch Them Anyway. Although He Has A Very Suspicious Love Of Lemons... Also I'm Surprised How Little People Have Watched This So Far. It's Been Out For Like Two Hours Yet Only 2,000 People Have Watched It! And It's A Large And Amazing Part Of His RPG Series So I Can't Believe How Little People Have Watched It! I, For One, Was Really Exited And Intrigued When I Saw The The Video Pop Up In My Recommended!
  • @EnderCatCore
    i was just thinking about making a level editor for my game where you could customize the layout but then thought "nah thatd be too unoptimized" and then i found this video not even an hour later. im amazed by what you can do in scratch, keep up the good work ^-^
  • @siraardvark
    One of the first videos I've seen on your channel, and already amazed. This has given me so many ideas for my own selection of games. Keep up the great work!
  • It always amazes me how many complex problems you solve with your simple solutions!
  • @user-dk4wj3if8e
    I’m following the tutorial it’s so easy AND I’m learning new functions of the code blocks your tutorials are unreal! Another thing he’s actually making this fun and the theme song part where he tricked us into thinking it was over, I love this definitely a new sub here!
  • @flaks8909
    This is genius. I love the way you explain it, and the editing of the video makes you grasp the idea clearly. Keep it up!
  • @inter.search
    I Love The Work In This! You Put in So Much Effort to Help Us Make Cool games! Keep Doing your Hard Work man, The Scratchers are Here For You!