CAUTION! The way variables are presented in this video is out of date, see the updated variables video here: th-cam.com/video/Gh9WPecRnxo/w-d-xo.html&ab_channel=GDevelop Be sure to check out our other advanced video on saving / loading all of the variables in your game with just 3 actions: th-cam.com/video/Fm-BJDTaBCg/w-d-xo.html&ab_channel=GDevelop
Its good that the video has both "showing finished product" part, and the step by step part, so depending of the person they could be able To figure out the workings from a glance.
I would have never thought to save all the object variables in the same level of the array one after another using the climbvariable variable. Really clever! I always muddied things up by storing the location and such in separate arrays or nesting them in their parents, but this is so much more elegant. Genius!
Thank you. 👍 The set up started off much more complicated, but I kept cutting and cutting until I had the simplest version I could come up with. And of course others in the GDevelop community had input too, so it was a group effort. 👍 -Wesley
Probably something that took me a lot of time to figure out when I started video game creation when I was young. Glad that this shows how to go step by step and how this can be extended. Once someone understand this, they understand all the basics of arrays (and can learn about structures) - which is super useful for making any game or algorithm!
Definitely. Hard to learn, but once you understand it, you're set to make much more complicated save/load structures using arrays in the future. 👍 -Wesley
I hope it is! I think this video will be very useful to people trying to make games that require you save objects. I see it mostly being useful for city builders, tower defense games, farming games, survival games, and really just any game where the player is allowed to move or change things in the level. 😅 -Wesley
thank you so much, i was making a level editor game and i was gonna give up on server uploading but then this video got recommended i couldn't figure out how to make multiple of the same object save
Thanks for the tutorial! Is there a difference between using an array vs a structure? Like with a structure would you still need to list each and use the climbvariable? I'm a little confused on when its better to use an array vs a structure and vise versa
A structure is fixed, but an array will expand to add as many variables as you need.(In this case, as many objects as you need) It's a little complicated, but I think our tower defense video does a good job of explaining arrays and how to use them. And if you still have trouble after that, try reading the GDevelop wiki, there's lots of information there that might help. -Wesley
You have these nice structs in GDevelop, why aren't you using them instead of having to add this weird ClimbVariable you would have to constantly update every time you add another property to the save?
May I ask someone more clever than me a question?: I followed this tutorial then realized I can use "pick a random" then apply that to the X and Y coordinates in order to randomize the spawn location of saved objects upon loading. What I'd like to do is make the wildlife in my game appear to be organically meandering rather than teleporting every time the level loads. I'm sorry that I'm very new at this I feel like if I dig I could find an answer... Is there an elegant solution to making the respawn points tied to... maybe a timer that only allows incremental distance from original spawn location so it looks like the animals are going about their regular life even when you're off screen?
Yup! Arrays work the same way for mobile games too. 👍 Saving externally, as mentioned at the end of the video, might work differently from platform to platform, but internally a global variable array can be used to switch from one scene to another and load in all of your objects. 👍 -Wesley
@@GDevelopApp When I click on the link it shows me this Oops, the page does not exist! It is possible that you have mistyped the address or that the page has been moved.
Smart tip: Do not name your object group and array variables the same thing !! I spent like 2 hour figuring out why was the "Load" button not working in my game. why am I like this
How performant is this? say for example you walk out and back into a room with saving the objects like this, would it take a long time to load them all?
I have a small question, I am learning to use gdevelop, when I search for an action with the search engine within the events tab, all the actions appear, when I try to search with the drop-down menus only one or two options appear, why can this happen? I want to explore all the actions that are possible with gdevelop and in my case they don't appear. Thank you so much!!!
I get that, I moved this video to the "advanced" official tutorials playlist because it deals with a lot of things that most newer users wouldn't be able to do. But once you figure it out, it's really powerful. 👍 -Wesley
Nice video! But I wanted to know, how I can do the opposite of this. Like instead of creating the objects into the scene when you save and change the scene. The object is added in the editor. And in game when the object is deleted, change the scene the object should stay destroyed.
Hmmm. 🤔 You could give each object in your game a "destroyed" variable, and when saving "all objects" use that variable as one of the conditions, so you only save objects that have the variable set as "destroyed". And then when "loading" that information back in, delete any object at the X/Y of the previously destroyed objects. You would need to hide any destroyed object instead of deleting it, so it'll be saved in the array. But, you could do something that way. 🤔Just make sure to check your debugger tool to see what's being saved and if it's the right objects or not. Hopefully that idea helps. 👍 -Wesley
Great tutorial but is there a way to save things like the player maximum health, current expert, coins cause I am trying to make game with a little Leveling system and I am having issues with saving those things
We have 2 other videos on saving/loading variables on this channel, those might help. www.youtube.com/@GDevelopApp/search?query=save If you're looking to save and load a bunch of variables, you can put them all inside of a structure and save/load that in to your game. You can also just save/load single variables in the same way. Hope those videos help. 👍 -Wesley
Please make this video again but with an actual rpg example like in the thumbnail Its hard for me to...understand whats going on when my game don't have the same genre, my game is an RPG not a husebuilding game I think the thumbnail was very misleading, and also you have some things added that you haven't explained like what is "the "climb" variable used for? Thank you for making this engine and for all tutorials. also plz make part 2 for the farming game tutorial make all of these tutorials into series you only cover a brief portion usually of how to make a game.
But you export it to your PC? Do you mean do this but save it to external storage? Then definitely, just put it in the array, and then save that array externally. The video linked in the pinned comment shows how to save the whole array externally and loading it back in. But I do suggest using the global variable first, and not trying to save directly to external storage. Some platforms and browsers don't allow external storage. Hope that helps. 👍 -Wesley
Okay but can this be used to like if your game hs a shop in one scene and you want to keep the thigns you bought and let them be shown when you get back to your regular house scene like in stardew if I go to piere buy a seedpack and go out from there into my farm that seedpack is in my backpack still. Can this be used here and how? Ive made a working shop system in my game in one seperate scene but I have no idea how to like transfer that info into another scene
You can. Once your global array exists, you can manually add variables to that array. So when the player buys the objects, you can add that to the array. 👍 -Wesley
Instead of specific actions for different types of variables, now you declare the variable ahead of time and set it to a text variable, then you can use it in the action "variable value". 👍 -Wesley
@@GDevelopApp Thank you! I followed the tutorial but the save load functions does not work :/ Only the delete function does. I'm not sure what to do. I copied it just like it was in the video. And one more thing I noticed in your example you never switched scene so would it save between scenes?
@@Shadowthevampire In the video the array is a global variable, so that variable will persist between scenes. 👍 I haven't heard anything about the save/load actions not working, so I would try using the debugger tool in engine to see what your variables are and see what's going on. We have a video on troubleshooting (th-cam.com/video/8krGoBuQpBI/w-d-xo.html&ab_channel=GDevelop) but I would test with a single variable first to see what's being done wrong with save/load and then try to tackle the array again afterwards. I hope that helps. -Wesley
@@GDevelopApp Thank you so much for continuous answers Mr Weasly. I figured out what was causing it. Then I realised I might not need scenes and instead make a open world type of game. I'm not sure Either way I would like to learn how to save and load the game so it actually saves like open game click load save file and you are from where you left of. I still haven't found a video explaining this easily enough with a normal rpg example..I watched your save and load intermediate advanced etc but they were a bit hard for me to grasp. And not all games ue "save points" etc.
You can save this directly to an external json file and load it back in from that external storage, but I've had trouble with some browser and platforms not allowing external storage, so sending it to a global array first helps it work regardless of platform. And then you can always save/load the array externally as well. 👍 -Wesley
The best way to get help with your project is to reach out to the community on our discord server, you can share screenshots of your project and better explain the issue you're having there. -Wesley
We're planning on re-doing the entire intro tutorial playlist, so some of those videos will be re-done in the future. But there's also LDTK support now as well, we don't have that in a video, but there are some example on the wiki. wiki.gdevelop.io/gdevelop5/objects/tilemap/ Hope that helps. 👍 -Wesley
CAUTION! The way variables are presented in this video is out of date, see the updated variables video here: th-cam.com/video/Gh9WPecRnxo/w-d-xo.html&ab_channel=GDevelop
Be sure to check out our other advanced video on saving / loading all of the variables in your game with just 3 actions:
th-cam.com/video/Fm-BJDTaBCg/w-d-xo.html&ab_channel=GDevelop
Its good that the video has both "showing finished product" part, and the step by step part, so depending of the person they could be able To figure out the workings from a glance.
I would have never thought to save all the object variables in the same level of the array one after another using the climbvariable variable. Really clever! I always muddied things up by storing the location and such in separate arrays or nesting them in their parents, but this is so much more elegant. Genius!
Thank you. 👍
The set up started off much more complicated, but I kept cutting and cutting until I had the simplest version I could come up with. And of course others in the GDevelop community had input too, so it was a group effort. 👍
-Wesley
Probably something that took me a lot of time to figure out when I started video game creation when I was young. Glad that this shows how to go step by step and how this can be extended. Once someone understand this, they understand all the basics of arrays (and can learn about structures) - which is super useful for making any game or algorithm!
Definitely. Hard to learn, but once you understand it, you're set to make much more complicated save/load structures using arrays in the future. 👍
-Wesley
This is the tutorial that we needed
I hope it is! I think this video will be very useful to people trying to make games that require you save objects. I see it mostly being useful for city builders, tower defense games, farming games, survival games, and really just any game where the player is allowed to move or change things in the level. 😅
-Wesley
thank you so much, i was making a level editor game and i was gonna give up on server uploading but then this video got recommended
i couldn't figure out how to make multiple of the same object save
I’ve been having problems with saving and loading. This is the tutorial I really needed, thank you
This is exactly what I was needing in a recent game I'm working on 🤩
Thank you so much!!!!
Ever since I found GDevelop, I fell in love with it it was so simple, it had a loving game community, I hope for this game engine to grow even more😊🙏
One of the best video made by Gdevelop, Keep going like that ❤
I love GDevelop semplicity
THANKS I WAS LOOKING FOR THIS IN LONG TIIIME! 😮
Can you make a tutorial for saving a Progress? Im trying to make a game with story in it (like character, Weapon, etc)
I need this tutorial!
Can you give tutorial to use firebase? We very need that :(
Thanks for the tutorial! Is there a difference between using an array vs a structure? Like with a structure would you still need to list each and use the climbvariable? I'm a little confused on when its better to use an array vs a structure and vise versa
A structure is fixed, but an array will expand to add as many variables as you need.(In this case, as many objects as you need)
It's a little complicated, but I think our tower defense video does a good job of explaining arrays and how to use them. And if you still have trouble after that, try reading the GDevelop wiki, there's lots of information there that might help.
-Wesley
You have these nice structs in GDevelop, why aren't you using them instead of having to add this weird ClimbVariable you would have to constantly update every time you add another property to the save?
Ik very few people would use this. but show how to get json from web server and use data from that in game
May I ask someone more clever than me a question?: I followed this tutorial then realized I can use "pick a random" then apply that to the X and Y coordinates in order to randomize the spawn location of saved objects upon loading.
What I'd like to do is make the wildlife in my game appear to be organically meandering rather than teleporting every time the level loads. I'm sorry that I'm very new at this I feel like if I dig I could find an answer... Is there an elegant solution to making the respawn points tied to... maybe a timer that only allows incremental distance from original spawn location so it looks like the animals are going about their regular life even when you're off screen?
Hi, I already asked this in the forum but I don't find the answer. Is it possible to extract a list of variables from a string? How?
This is awesome! Does it work for mobile games as well?
Yup! Arrays work the same way for mobile games too. 👍
Saving externally, as mentioned at the end of the video, might work differently from platform to platform, but internally a global variable array can be used to switch from one scene to another and load in all of your objects. 👍
-Wesley
How to make an iron chain suspended from the ceiling and move 🥺
Probably using the physics behavior and joints.
Here's an example game that uses them: gdevelop.io/game-example/free/
Hope this helps. 👍
-Wesley
@@GDevelopApp
When I click on the link it shows me this
Oops, the page does not exist!
It is possible that you have mistyped the address or that the page has been moved.
@@iduruf14364 gdevelop.io/game-example/free/physics-joints-demo
Sorry, I must not have saved the whole link.
Smart tip: Do not name your object group and array variables the same thing !! I spent like 2 hour figuring out why was the "Load" button not working in my game. why am I like this
How performant is this?
say for example you walk out and back into a room with saving the objects like this, would it take a long time to load them all?
I have a small question, I am learning to use gdevelop, when I search for an action with the search engine within the events tab, all the actions appear, when I try to search with the drop-down menus only one or two options appear, why can this happen? I want to explore all the actions that are possible with gdevelop and in my case they don't appear. Thank you so much!!!
Somehow, this will stop working, if you got a scene change in between, like switching from startmenu into the main scene - any hint why?
Wait why when you refreshed the debugger the preview didn't get covered by the debugger?
Can you explain to me how the pre-release differs from the latest version of Gdevelop?
Amazing tutorial👍, could you also do a tutorial about inventories 🙏
I have a question before starting Gdevelop. Is it free on mobile and is it safe? I mean, it does not publish game files. Thank you
Very helpful
Super excited
How can i store Object animation value index/name in save and load? I don't see the option to choose animation
I'll be honest, I think I felt my brain starting to bleed. Still easier to follow than a lot of other game engines though.
I get that, I moved this video to the "advanced" official tutorials playlist because it deals with a lot of things that most newer users wouldn't be able to do. But once you figure it out, it's really powerful. 👍
-Wesley
i was watching you!, .. i knew you would figure something out! to make a save! took long enough! (years later) but im patient.
This is so nice
Please make a tutorial about inventory
Is it possible to save a rendered sprite using the Sprite Snapshot extension?
I've never used that extension before, so I'm honestly not sure. 🤔
-Wesley
Nice video!
But I wanted to know, how I can do the opposite of this. Like instead of creating the objects into the scene when you save and change the scene.
The object is added in the editor. And in game when the object is deleted, change the scene the object should stay destroyed.
Hmmm. 🤔
You could give each object in your game a "destroyed" variable, and when saving "all objects" use that variable as one of the conditions, so you only save objects that have the variable set as "destroyed". And then when "loading" that information back in, delete any object at the X/Y of the previously destroyed objects.
You would need to hide any destroyed object instead of deleting it, so it'll be saved in the array. But, you could do something that way. 🤔Just make sure to check your debugger tool to see what's being saved and if it's the right objects or not.
Hopefully that idea helps. 👍
-Wesley
@@GDevelopApp thanks, I'll try and see if it works..
valeu obrigado. Muito bem explicado. Já deixando aquele super like maroto.
thanks. Very well explained. Already leaving that naughty super like.
Great tutorial but is there a way to save things like the player maximum health, current expert, coins cause I am trying to make game with a little Leveling system and I am having issues with saving those things
We have 2 other videos on saving/loading variables on this channel, those might help.
www.youtube.com/@GDevelopApp/search?query=save
If you're looking to save and load a bunch of variables, you can put them all inside of a structure and save/load that in to your game. You can also just save/load single variables in the same way.
Hope those videos help. 👍
-Wesley
Please make this video again but with an actual rpg example like in the thumbnail Its hard for me to...understand whats going on when my game don't have the same genre, my game is an RPG not a husebuilding game I think the thumbnail was very misleading, and also you have some things added that you haven't explained like what is "the "climb" variable used for? Thank you for making this engine and for all tutorials. also plz make part 2 for the farming game tutorial make all of these tutorials into series you only cover a brief portion usually of how to make a game.
Please game file am having troubles
I would make a global variable which changes after X things are done by the player oder after Y time.
Can you make one where its like this but you export it on to your pc?
But you export it to your PC? Do you mean do this but save it to external storage?
Then definitely, just put it in the array, and then save that array externally. The video linked in the pinned comment shows how to save the whole array externally and loading it back in. But I do suggest using the global variable first, and not trying to save directly to external storage. Some platforms and browsers don't allow external storage.
Hope that helps. 👍
-Wesley
🤩Incrível muito legal esse sistema
Okay but can this be used to like if your game hs a shop in one scene and you want to keep the thigns you bought and let them be shown when you get back to your regular house scene like in stardew if I go to piere buy a seedpack and go out from there into my farm that seedpack is in my backpack still. Can this be used here and how? Ive made a working shop system in my game in one seperate scene but I have no idea how to like transfer that info into another scene
You can. Once your global array exists, you can manually add variables to that array. So when the player buys the objects, you can add that to the array. 👍
-Wesley
@@GDevelopApp Thats great I just found a trouble...you cant name children of arrays so I have no idea on how to keep track of what is what...
I cant find the "add text variable" action anymore what am I suppose to use instead?
Instead of specific actions for different types of variables, now you declare the variable ahead of time and set it to a text variable, then you can use it in the action "variable value". 👍
-Wesley
@@GDevelopApp Thank you! I followed the tutorial but the save load functions does not work :/
Only the delete function does.
I'm not sure what to do. I copied it just like it was in the video. And one more thing I noticed in your example you never switched scene so would it save between scenes?
@@Shadowthevampire In the video the array is a global variable, so that variable will persist between scenes. 👍
I haven't heard anything about the save/load actions not working, so I would try using the debugger tool in engine to see what your variables are and see what's going on.
We have a video on troubleshooting (th-cam.com/video/8krGoBuQpBI/w-d-xo.html&ab_channel=GDevelop) but I would test with a single variable first to see what's being done wrong with save/load and then try to tackle the array again afterwards.
I hope that helps.
-Wesley
@@GDevelopApp Thank you so much for continuous answers Mr Weasly. I figured out what was causing it.
Then I realised I might not need scenes and instead make a open world type of game.
I'm not sure
Either way I would like to learn how to save and load the game so it actually saves like open game click load save file and you are from where you left of. I still haven't found a video explaining this easily enough with a normal rpg example..I watched your save and load intermediate advanced etc but they were a bit hard for me to grasp. And not all games ue "save points" etc.
In… 1 event?!?!?! I only ever used save to memory and save to json file
You can save this directly to an external json file and load it back in from that external storage, but I've had trouble with some browser and platforms not allowing external storage, so sending it to a global array first helps it work regardless of platform. And then you can always save/load the array externally as well. 👍
-Wesley
I am making a minecraft clone and for the chunks load and unload i will try to use this
im having trouble combining the 2 videos
can you help?
The best way to get help with your project is to reach out to the community on our discord server, you can share screenshots of your project and better explain the issue you're having there.
-Wesley
@@GDevelopApp thx but i think i finally figured it out lol!
still joined the discord tho :P
Plz make a video about how to use tiled with gdevelop tilemap plz❤
@HOFMC-OFFICIAL there is but it bad expalined they explain better especially wesly
We're planning on re-doing the entire intro tutorial playlist, so some of those videos will be re-done in the future. But there's also LDTK support now as well, we don't have that in a video, but there are some example on the wiki. wiki.gdevelop.io/gdevelop5/objects/tilemap/
Hope that helps. 👍
-Wesley
How to make objects:
Rubber
Slippery
Soft?
Pls😢😢😢 game file
dont work now
1:14
add text varieble no found
help me!!! i want to make turn based game please help me
easy
WOOOOOOO
Gdevelop free ? ❤
Open source and free to use. 👍
-Wesley
@@GDevelopApp thank you ❤️❤️❤️ 🇲🇦❤️ Gdevelop