✅ 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
@xXGuerrillasXx3 жыл бұрын
Thanks Hugo for all the awesome videos you make! Best tutorials available for any game developer
@GameBoy-ur9mb3 жыл бұрын
Super Helpful for now and for the future also! Thanks man
@H_Iq.3 жыл бұрын
I do not have PC and I do not know the words of the English but with that I follow you
@CodeMonkeyUnity3 жыл бұрын
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.
@arcday42813 жыл бұрын
Cool! Very similar to the save system of the "classic rpg".
@MemeNut.3 жыл бұрын
Whoa, I just 1 video ago watched your ad... Then subbed INSTANTLY with Notification Then just found your video notif...😛
@CodeMonkeyUnity3 жыл бұрын
I'm glad you like the videos!
@theshowmemes69073 жыл бұрын
Woow really really appreciate it thanks a lot my friend ur really doing a great job
@fkhg13 жыл бұрын
i like the hard way you did this :-D but usually i use object serialization
@marksmithcollins3 жыл бұрын
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).
@sawcondeez3 жыл бұрын
What do you recommend to change? I'm curious to know what are some cases that break with the format changes
@CodeMonkeyUnity3 жыл бұрын
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
@thejoblesscoder3 жыл бұрын
@@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
@sawcondeez3 жыл бұрын
@@thejoblesscoder wow, thats smart. Never thought of using the unit separator at all. This is a great suggestion!
@StigDesign3 жыл бұрын
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
@CodeMonkeyUnity3 жыл бұрын
The tetris-like inventory? I did cover that kzbin.info/www/bejne/nKnEdXV7bJaIfqM
@StigDesign3 жыл бұрын
@@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
@CodeMonkeyUnity3 жыл бұрын
@@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!
@StigDesign3 жыл бұрын
@@CodeMonkeyUnity Nice :D i chekk it out :) not sure if i have seen it ,Thank You :) yes that sounds really cool :D
@ShiftClickLearn3 жыл бұрын
I have been wondering how to do this!
@testitestmann88193 жыл бұрын
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-gamedev3 жыл бұрын
Only direct advantage I see is that it might be easier to make cloud saves. Send 1 file to a server instead of 2.
@hiTocopter3 жыл бұрын
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.chuang02243 жыл бұрын
Most of the time it's just for security. So players will have a harder time modifying the saves.
@CodeMonkeyUnity3 жыл бұрын
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.
@testitestmann88193 жыл бұрын
@@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.
@quantran92193 жыл бұрын
Can u make the tutorial about rigging??
@CodeMonkeyUnity3 жыл бұрын
Animation rigging? I'm planning to cover that, possibly next month
@quantran92193 жыл бұрын
@@CodeMonkeyUnity greate to hear that
@alexw93093 жыл бұрын
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?
@CodeMonkeyUnity3 жыл бұрын
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.
@ameenulislamtr28033 жыл бұрын
Coollll.........
@OverAndOverAndOver2 жыл бұрын
Can this system be used to make multiple save files?
@CodeMonkeyUnity2 жыл бұрын
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-pf7nv3 жыл бұрын
Please make a grapple point tutorial
@CodeMonkeyUnity3 жыл бұрын
You mean a grappling hook? I made that a long time ago kzbin.info/www/bejne/qqiwnHqKpt6NrKs
@Alex-oq4oh2 жыл бұрын
Is this working for WebGL or only for desktop
@CodeMonkeyUnity2 жыл бұрын
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
@trungkiennguyen96153 жыл бұрын
Is json easy to cheat when player find out where the save file is?
@CodeMonkeyUnity3 жыл бұрын
Yes JSON is easily editable, that's a feature not a bug, It's not intended for security.
@thejoblesscoder3 жыл бұрын
You should compress save data in production.
@wiselessss3 жыл бұрын
Hi, I would like to buy Curved World 2020, but I don’t know if there is a curved shader for particles and UI?
@manusia000013 жыл бұрын
three
@jamboo83293 жыл бұрын
9th
@vinyas07953 жыл бұрын
Hey can you make a Video on making 3d in-game level editor
@CodeMonkeyUnity3 жыл бұрын
I made a Third Person House Building system, you can use that as a starting point kzbin.info/www/bejne/nZymc3Z5gMqUn9U
@vinyas07953 жыл бұрын
@@CodeMonkeyUnity thanks
@kiaval_kaslana3 жыл бұрын
Please make an offline open world rpg medieval android like the witcher 3 please make offline open world like the witcher 3 for android