How to Save File with Screenshot! (Save System Unity Tutorial)

  Рет қаралды 18,597

Code Monkey

Code Monkey

Күн бұрын

Пікірлер: 58
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
✅ Get the Project files and Utilities at unitycodemonkey.com/video.php?v=dqySkMFieHE 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 🔴 RELATED VIDEOS 🔴 Simple Saving and Loading with JSON to a File kzbin.info/www/bejne/bKawd3iDYtOUpqc How to take a Screenshot in Unity kzbin.info/www/bejne/ooWQhIWCgLqYa80 What are Delegates? C# Basics kzbin.info/www/bejne/aYvJqKSNoZKMf5I Make Awesome Effects with RenderTextures! (Minimap, In-game TV, Camera to Texture) kzbin.info/www/bejne/d5mVaWlofN9mldU POLYGON Battle Royale Asset Pack assetstore.unity.com/packages/3d/environments/urban/polygon-battle-royale-low-poly-3d-art-by-synty-128513?aid=1101l96nj&pubref=savefilescreenshot
@xXGuerrillasXx
@xXGuerrillasXx 3 жыл бұрын
Thanks Hugo for all the awesome videos you make! Best tutorials available for any game developer
@GameBoy-ur9mb
@GameBoy-ur9mb 3 жыл бұрын
Super Helpful for now and for the future also! Thanks man
@H_Iq.
@H_Iq. 3 жыл бұрын
I do not have PC and I do not know the words of the English but with that I follow you
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
Keep at it and soon you'll understand everything! I learned English mainly by just watching Cartoon Network, so the more English you hear the more you will learn.
@arcday4281
@arcday4281 3 жыл бұрын
Cool! Very similar to the save system of the "classic rpg".
@MemeNut.
@MemeNut. 3 жыл бұрын
Whoa, I just 1 video ago watched your ad... Then subbed INSTANTLY with Notification Then just found your video notif...😛
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
I'm glad you like the videos!
@theshowmemes6907
@theshowmemes6907 3 жыл бұрын
Woow really really appreciate it thanks a lot my friend ur really doing a great job
@fkhg1
@fkhg1 3 жыл бұрын
i like the hard way you did this :-D but usually i use object serialization
@marksmithcollins
@marksmithcollins 3 жыл бұрын
9:14 Not much recommended for deciding header size, because it is quite prone to break with format changes. File version can be chagned with its header structure and code says its flexibility, but what that line does is virtually hardcoding specific version spec into source (even worse to notice later).
@sawcondeez
@sawcondeez 3 жыл бұрын
What do you recommend to change? I'm curious to know what are some cases that break with the format changes
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
Not sure what you mean, any changes to the file format will be added to the header, not the two initial bytes. There's no reason why you'd ever need to change the 2 initial bytes unless you needed more data for the header size but with 2 bytes you have enough space for a 65k header which is more than enough
@thejoblesscoder
@thejoblesscoder 3 жыл бұрын
@@sawcondeez For save files I don't use a header but one way you can divide the data and always know where the point of division is. Insert an ascii character that you know will never be a part of actual save data. I use the unit separator it's ascii code is 31. Convert to byte then insert it into the array between the 2 blocks of data. When loading run a search for that unit separator byte and you know where the array needs to be split
@sawcondeez
@sawcondeez 3 жыл бұрын
@@thejoblesscoder wow, thats smart. Never thought of using the unit separator at all. This is a great suggestion!
@StigDesign
@StigDesign 3 жыл бұрын
tip for another video: Maby try to make something similar to Dayz(Standalone) the mechanics that might be used in that game for the inventory and interaction betwen the items :D
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
The tetris-like inventory? I did cover that kzbin.info/www/bejne/nKnEdXV7bJaIfqM
@StigDesign
@StigDesign 3 жыл бұрын
@@CodeMonkeyUnity yes kind of :) i do remember that video, Love that one :D am thinking more on the underlying how it works like in the game, The interaction between hud, tool bar(1-9) areawhere you can place weapons, and items, but also the interaction between them and the world,Example: Bandage i think it might be Scriptable object(sinc e it has a hud/Inventory image but aslso a 3D modell) if in inventory you have that tetris style sorting, but if drag the bandage in use/excahnge area in Inventory or add it to a number and the select that slot with key press you can bandage your self if you are less that 100% Health, if you are over 100% you can restrain yourt self :) and ther is alott of similiar multi use items. i (i might think of the main game Mecanic system in DayZ) i know its mutch complicated but its a idea of bits you might be interested doing in a video, and maby bult upon that tetris inventory video :D
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
​@@StigDesign I made a Hotkey bar quite a long time ago kzbin.info/www/bejne/pZPZhoyQgJKefac Maybe it could be interesting to combine that with the Tetris inventory, thanks for the suggestion!
@StigDesign
@StigDesign 3 жыл бұрын
@@CodeMonkeyUnity Nice :D i chekk it out :) not sure if i have seen it ,Thank You :) yes that sounds really cool :D
@ShiftClickLearn
@ShiftClickLearn 3 жыл бұрын
I have been wondering how to do this!
@testitestmann8819
@testitestmann8819 3 жыл бұрын
I have always just saved my screenshots next to my json files. I like being able to read the json easily via any text editor. What is the advantage to combining them?
@this-is-gamedev
@this-is-gamedev 3 жыл бұрын
Only direct advantage I see is that it might be easier to make cloud saves. Send 1 file to a server instead of 2.
@hiTocopter
@hiTocopter 3 жыл бұрын
If you want to move them or send them. However, I don't see much advantage to saving things in a json format, instead of just saving it as bytes from the start, with a header for each item of just its length. That's the way it has been done since ancient times, and it works great. If you want to read your savefiles as a developer, you literally have the "decoder" already made to do so. Also, you probably don't want your savefiles to be readable by a user when you deploy because that means they're also writeable. Using bytes means they'll have to be a lot more clever to figure out how it works.
@h.m.chuang0224
@h.m.chuang0224 3 жыл бұрын
Most of the time it's just for security. So players will have a harder time modifying the saves.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
You get just a single file instead of 2, that's pretty much it. Makes it easier to move files around and is less error prone since you only need to keep track of a single file.
@testitestmann8819
@testitestmann8819 3 жыл бұрын
@@h.m.chuang0224 I usually add a CRC to my files. That helps at least a little against modification (If I want that) and tells me if the file got corrupted.
@quantran9219
@quantran9219 3 жыл бұрын
Can u make the tutorial about rigging??
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
Animation rigging? I'm planning to cover that, possibly next month
@quantran9219
@quantran9219 3 жыл бұрын
@@CodeMonkeyUnity greate to hear that
@alexw9309
@alexw9309 3 жыл бұрын
How can i manage different save file versions? So for example if i have some items like in your video and want to add a armor item later in development. Do i need different load Methods for every old save file version or can i configure the json decoder to set default values for new/unknown fields?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
If the new parameter is not present in the old JSON save, then the SaveData will have the default value so you could use that to give the player the default armor for old save files. It all depends on what changes you need, add a version to your Header and either handle it with defaults or yes make some versions for special use cases to handle jumps between versions.
@ameenulislamtr2803
@ameenulislamtr2803 3 жыл бұрын
Coollll.........
@OverAndOverAndOver
@OverAndOverAndOver 2 жыл бұрын
Can this system be used to make multiple save files?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
You mean multiple saves inside one single save file? Yup exactly the same way, you can package however many pieces of data you want
@Amal-pf7nv
@Amal-pf7nv 3 жыл бұрын
Please make a grapple point tutorial
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
You mean a grappling hook? I made that a long time ago kzbin.info/www/bejne/qqiwnHqKpt6NrKs
@Alex-oq4oh
@Alex-oq4oh 2 жыл бұрын
Is this working for WebGL or only for desktop
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
It all depends on how you save the data, using WebGL I don't think you can save a file but you can save with PlayerPrefs
@trungkiennguyen9615
@trungkiennguyen9615 3 жыл бұрын
Is json easy to cheat when player find out where the save file is?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
Yes JSON is easily editable, that's a feature not a bug, It's not intended for security.
@thejoblesscoder
@thejoblesscoder 3 жыл бұрын
You should compress save data in production.
@wiselessss
@wiselessss 3 жыл бұрын
Hi, I would like to buy Curved World 2020, but I don’t know if there is a curved shader for particles and UI?
@manusia00001
@manusia00001 3 жыл бұрын
three
@jamboo8329
@jamboo8329 3 жыл бұрын
9th
@vinyas0795
@vinyas0795 3 жыл бұрын
Hey can you make a Video on making 3d in-game level editor
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
I made a Third Person House Building system, you can use that as a starting point kzbin.info/www/bejne/nZymc3Z5gMqUn9U
@vinyas0795
@vinyas0795 3 жыл бұрын
@@CodeMonkeyUnity thanks
@kiaval_kaslana
@kiaval_kaslana 3 жыл бұрын
Please make an offline open world rpg medieval android like the witcher 3 please make offline open world like the witcher 3 for android
Be CAREFUL with Scriptable Objects!
8:27
Code Monkey
Рет қаралды 83 М.
How to Build A Save System in Unity
9:41
Game Dev Guide
Рет қаралды 172 М.
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 5 МЛН
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 66 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 305 МЛН
How to Save Screenshots From Your Game - Unity Tutorial #5
9:42
MaxMakesGames
Рет қаралды 12 М.
3 Ways to make a Scope Zoom Effect (Unity Tutorial)
11:26
Code Monkey
Рет қаралды 48 М.
Unity Save Game System Tutorial | Save Data To JSON
43:53
Dan Pos
Рет қаралды 13 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 563 М.
Best Way to take a Screenshot in Unity in 2023 (using Unity Recorder)
3:24
The Secrets of Apagayo Island
Рет қаралды 37 М.
Introduction to EasySave
14:43
Hutong Games
Рет қаралды 11 М.
How to make a Save & Load System in Unity
26:56
Shaped by Rain Studios
Рет қаралды 200 М.
Building a REAL pawn that transforms into a queen (automatically)
14:12
Works By Design
Рет қаралды 1,5 МЛН
Capture Map Areas! (Like Battlefield | Unity Tutorial)
21:14
Code Monkey
Рет қаралды 27 М.
Create Beautiful Trees in Unity | FILMSTORM
11:30
Filmstorm
Рет қаралды 29 М.
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 5 МЛН