'Save My Game!' 💾 Data Serialization & Escaping in Scratch

preview_player
Показать описание
Learn how to safely convert (serialize) your variables into a basic save code in this Scratch coding tutorial. We'll learn about simple CSV's (comma separated value), and implement a robust character escaping system to avoid conflicts and guarantee what goes in, is what comes out! We'll create two custom blocks, "Write Value", and "Read Value".

This episode will be followed up by a second episode that will also be part of the RPG series, and we'll expand on save codes showing how to make them modular, and backwards compatible.

My tutorials are for all budding game & software developers using Code Blocks. Scratch On guys!

🚀 *Boost Your Creativity with Griffpatch*
The Griffpatch Academy will take you from "Gamer to Game Creator"

👀 Quick and Fun Tutorials

👀 Episodes in the series:

--------------Video Chapters--------------
0:00 Intro
1:10 Comma Separated Values & Delimiters – CSV & DSV
2:22 Basic Write Value Custom Block
3:55 Basic Read Value Custom Block
6:30 Index out of bounds error and Optimisations
8:16 Write with Escaping
11:20 Read with Escaping
12:28 One last issue!
13:51 Summary
15:49 Outro
Рекомендации по теме
Комментарии
Автор

I hope this comment can get to you.

I played your paper Minecraft when I had no money to buy the official Minecraft, which was from 2015(11 yo) to 2021(17 yo). It was a good portion of my childhood, which also got me interested in scratch(2017, 13yo), which later made me interested in programming languages(2018, 14 yo). Now I'm 20 yo, trying to make a game like Terraria on Unity game engine. I was stuck at world generation and and world saving, AND I RECALLED YOUR GAME.

At first I thought I would have to break down your scratch game on my own. Then I saw your videos towards paper Minecraft. With this video and your Procedural World Generation video, you actually helped me a lot on my unity project.

Education sessions with such advanced techniques you taught us in your videos are usually paid courses on the internet, but you just...what the heck man, you mean so much to me. You are the one who inspired me towards programming, and now you are helping me again, I don't know how to thank you.

ChraphtMyne
Автор

I honestly think that the best part about griffpatches tutorials is the fact that he is so skilled at the language that every tutorial he makes the more advanced scratch games can be for everyone else, keep up the good work man!

gman
Автор

nice to see you are using methods from text programming languages such as escape characters into scratch! It also helps people know alot about text programming when they end up getting into it! Great work Griffpatch as always!

Blockitjames
Автор

although im not new to scratch, griff is making me learn things I struggled with in the past, just in a simpler manner, Thanks Griff!

NotDIY
Автор

10:51
Fixed!
we just forgot to add a "change variable (save idx) by 1" in the repeat loop.
thats why it just adds only the first letter of each value in the save code
also thank you so much, that helped alot! :D

oxintomadev
Автор

Finally! We can do RPG in scratch!!
I can't wait to see the new episode of it!!!

BobChess
Автор

Before this video I had made a fairly similar system on turbowarp (with the "files" extension) but with lots of lists and which didn't work sometimes... And here I see a video that can help me! Thank you griffpatch :)

YessoN-YT
Автор

I’m glad you’re finally making a tutorial on how to do this so it’s more accessible! I did this a while back with your encoding and decoding system from the cloud tutorials, and have the game read the numbers to give you your values back. Though I didn’t use any delimiters so it could get a bit confusing with all of the values in my game.

N_jsd
Автор

YES FINALLY, I've been trying to make one for ages, especially for my custom scene editor for the firework particle project, and you there a tutoprial ! Thank you so much griffpatch !

startFX
Автор

This is actually pretty easy, thank you griffpatch!!

I am currently catching up with your awesome raycaster, added to it a world generation thanks to your maze generation with some tweaks, this here will make a great addition!

matangoldstien
Автор

Been wondering how to do this for a while, amazing work as always. I was just thinking about data saving when I saw this video posted just 1 hour ago!

supranova
Автор

I like how complex things became simple in your tutorials :)

FeniteFr
Автор

I needed exactly this to save people scores and levels in my new game! Thanks so much Griffpatch!

theblazingspud
Автор

This is really funny, i just thought about this exact matter in order to make my scratch game especially with encryption! Thank you Griffpatch!

tommax
Автор

Yes! I've been experimenting with save codes, but I can't get them to 100% work each time. This will definitely help!

AndyWandyBandy
Автор

Yay! I love it when griffpatch uploads. He makes everything simple and enjoyable :)

crackerpooppop
Автор

A very tiny optimisation: The last letter in this text is always ‹|›. This marks the end of the last value. However, ‹› would also work, so you can remove ‹|›. If only there was an (all but last of [text]) block for this!

vii-ka
Автор

Finally saving my progress I thought it wasn't possible but griffpatch did it congratulations :)

aringelblade
Автор

This sort of data management has always been what I'm best at programming! This video has given my new perspective on my approach, too, which is appreciated!

Great video, as per usual.

KidPrarchord
Автор

Honestly man how do you make every Scratch tutorial sound so easy? Keep up the awesome work.

RandomStufff