I'm not sure if I will get a response, but I am trying to figure out how to save and load character unlocks and stuff. For example, you can purchase a character, and then whenever you join back into the game, it will still be unlocked. Also, you can purchase upgrades for every character, which also should save. Looking for answers for the game I'm working on.
@AnonymousWatcherAmigo6 күн бұрын
We need more of this kind of things
@TheArcadeMonk10 күн бұрын
Fyi the official roblox style guide recommends against using semicolons
@AshRBX_dev5 күн бұрын
Apologies, this is true and should have been used, any future videos and uploaded code will use the recommended style and will be commented 👍
@TheArcadeMonk5 күн бұрын
@ No worries. Love your videos
@FreakyDevv27 күн бұрын
is this better than using profileservice?
@vikovitchАй бұрын
ok ye i can make something branch about but i have never even seen any kind of bone in roblox how am i supposed to make the branches look good like that if you dont elaborate on that part 😭
@FlyinC4TАй бұрын
man was not kidding when he said "advanced" 😭
@diegogame1213FR2 ай бұрын
how about you make a video explaining the whole script from scratch.......... that would be nice.........youknow...........
@sebcalvert65342 ай бұрын
I love your videos it's clear you put a lot of effort in to make it understandable and engaging - so thanks :) It's not really a programming suggestion but more of a suggestion for concept tutorials. I struggle with trying to think of elegant solutions for integrating multiple systems. For example if I were to create a CPR system, how I would make that work with a handcuff tool without bugs. Another example is if I wanted to have a movement system involving inertia synergise with a vaulting/ wall climbing system. I just have no idea what the best practice is to allow systems to work together. Another video suggestion is just coming up with game mechanics. I have lots of ideas but no idea of how to implement them. I'm sure you can think of games you have played where you have thought that their game mechanics are just brilliant and so creative. Do you have any methods or ideas on how to think of audience appropriate ways to bring a conceptual idea to life. An example of this could be if I wanted to create an in-depth yet easy to understand medic system. How could I allow 7 year olds to use it without it being too complex, whilst still challenging more adept players. Thanks for your time keep up the videos
@notfrostfall3 ай бұрын
Don't do this. Buffers get encoded as base64 in JSON anyways, this will take **more** space than using a traditional data saving system. Binary data is efficient because each byte has 256 combinations in one character, but Roblox's datastore system can't actually store raw binary data, so they convert your binary data to base64. This means that if you have an 8-byte buffer, it'll get encoded into 12 characters- this counts towards MORE data usage. Not only that, but the way you're using buffers causes slower read/write times too- buffers are fast due to fastcalls and memory locality, this setup violates both! Buffers have very niche applications (primarily remote events) where they can be used, this is not one of them!
@Maskrade3 ай бұрын
even if they are stored as JSON, it is a benefit becusse we don't need to have names on keys. JSON sucks to save data because we rely on keys to know what everything is, with buffers, even if saved as a json and a base64 string, the serialization does not depend on keys, and they depend on the ordering of the data. to;dr: you're wrong, benefit is there, you just failed to see it.
@notfrostfall2 ай бұрын
@@Maskrade This is only the case if your keys are taking **over 2x** your data. Also you lose ease of editing w/ plugins too
@aetherdust3 ай бұрын
Good Video but the functional example is not quiet right if you want to use pure functions Per definition pure functions a deterministic and side effect free. Your For-loop Function has the side effect that it modifies the data passed in. For a real pure function, you have to return the new data. And the main benefit of pure functions is not that the code is easier to understand but easier to test, because the function will produce the same result every time regardless of program state or outside factors
@shadnatic3 ай бұрын
thanks ashrbx now I will be able to optimize 1 mb of memory to my game.
@swordlegend32563 ай бұрын
buffers are amazing with then i reduced bandwidth in my td game by a huge amount. for 100 moving enemy's i get 1kb/s also according to my calculations with this system you coud save 160000 block changes in a infinite generating minecraft world also assuming you only save the changes that are made like block broken or placed instead of saving the entire chunk. for example instead of saving the chunk you coud sacrifice 1 of those blocks and save the seed and when player re-joins load the world from the seed and only change the blocks that were broken or placed.
@shinogaming49784 ай бұрын
So i have some nice things you could add! Bucanners outfits with plumes and all. Theses are the 1600s ones but you could add boars and wild cows to hunt and cook! This was their job at first. Now they used a different type of musket and a black powder special for it straight from Cherbourg, france! They are like snipers but arent that good at navigation. They were able to move on small ships or pyragua. Now in a fight, they were employed as sharpshooter in the crow nest and riggin! Hope you didnt gave up!
@vystema4 ай бұрын
this tutorial is pretty good, but the json encode is pretty redundant as when the Roblox saves things inside its datastore it already encodes the data using json, therefore, adding another layer of json encoding will only make the data longer and add more things to store
@engineser64704 ай бұрын
is it possible to transfer player data with this system to a new world? we have the situation that we have a game which has been published and some players already played and has their data there, so but now we have to transfer this world into a development group and there the world has to be published new, but what we do not know how to transfer the player data from the old world to the new publishing. is there a way to do this? or do we really have to this by hand each one of them
@okage_4 ай бұрын
why not A* algorithm?
@SenSpaBR_iXx4 ай бұрын
damn this tutorial is from a year ago and its still good
@spoon11264 ай бұрын
what would you think is the best use for an inventory system with this method?
@Marisol-Channel4 ай бұрын
Really don't use single-letter variables, they make it extreamly difficult to figure out what code does in the future and overall looks weird.
@AshRBX_dev4 ай бұрын
Appreciate the feedback, I should have not used them you’re correct on that will refrain from it in the future 👍👍
@TQNY4 ай бұрын
Way over my head stuff lol ... and speaking fast didn't help either 🤣 I'll stick to the normal way for now - but good to know none the less.
@AshRBX_dev4 ай бұрын
🤣 apologies for the faster speaking, didn’t want the video to be 3 hrs long 💀
@JayJay-ki4mi5 ай бұрын
Great video. But I think there might be a better way of doing this. If the format of the byte changes, instead of manually converting the data would it not be better to create a new database? For example, v1 of the game you use database "profile_v1". If you remove something from the player data, you create a "profile_v1.2". If the player is using an older version, then you simply get the data from the old database and add it to the new. This will allow you to rollback, and reduces the complexity of the code. Thoughts?
@vrfrenzy84515 ай бұрын
woah my head HURTS from this, I need it, but my brain cannot comprehend what's going on😭I'm pretty "advanced" on studio just not this advanced
@AshRBX_dev5 ай бұрын
If you wanna use it there’s an RBXL file in the description you can download without worrying about bugs 👍
@RykuoZ5 ай бұрын
can u do more of the pirate game devlog cus i needa know how u did buoyancy 🥲
@AshRBX_dev5 ай бұрын
Possibly, I might release the script on my discord at some point as I might not make a video on it
@LeviBannister5 ай бұрын
Just like everyone else I absolutely love this video even though I don’t understand some parts it is still an amazing and extremely informative video but I just have one question of why do you put semicolons at the end of almost every line of code?
@nyalayn4 ай бұрын
pretty sure it's a habit from another language
@MopBK5 ай бұрын
I spent 50 minutes watching this, now I have to watch it again so I can copy down the code. 😔
@MopBK5 ай бұрын
pls give a google doc where i can copy of the code uwu
@AshRBX_dev5 ай бұрын
@@MopBK There is an RBXL file in the description that you can download hopefully it works if not let me know
@MopBK5 ай бұрын
@@AshRBX_dev kk
@CheeseY4205 ай бұрын
I think AshRBX's brain is litterally a computer 💀 This is not just advanced stuff, I'd call this extremely advanced stuff...
@AshRBX_dev5 ай бұрын
🤣🤣
@crazymisterfish96145 ай бұрын
i got a debugging problem whenever i launch it on local DM = {};
@AshRBX_dev5 ай бұрын
What kind of error? If you find out what error I can try help further 👍
@PurpleGuyBloxian5 ай бұрын
Could you add creative mode to your minecraft game?
@ArrogantBuilder5 ай бұрын
hey Ash, remember your pirate game devlog? You said you'd make a buoyancy tutorial, could you please make it soon in the near future or tell me the script because I'm sure it's probably short, I've been trying for a while now and I can't figure it out.
@Ban33t5 ай бұрын
Nice video, but when we get the userId, I just did “player.UserId” This is because we are getting the userId from the Username of the player, but what if the player changes their username? That is a feature that roblox allows, so what if this happens?
@spirtuuuuuu5 ай бұрын
it doesn t matter, as player.Name is a variable that changes if the name changes every time the event runs
@GlitchPlaysHorror5 ай бұрын
How do we get Entrances?
@negazuotas5 ай бұрын
The system itself looks amazing, now i just need to know how do i connect the localscript on my screengui to gain the score. Im the beginner in roblox game making comunity and i hella lost rn XD
@AshRBX_dev5 ай бұрын
That’s great! To connect a local script, you would need to go from client to server then save the data into the server buffers. You can use a remote event to do this 👍
@khile55685 ай бұрын
Hi, Nothing seems to be saving. In my GetMemoryAddress function, when ID is equal to IDtoFind, returning the address and count, it returns multiple times. I think this may be something to do with it. I can provide more info if you could help!
@AshRBX_dev5 ай бұрын
The get memory address should only return once but will return 2 values as you say the count and the address. If it is returning 2 states I would say there’s an extra memory address call somewhere that may be causing it. If you join the discord server I may be able to look at your functions and help with a little more detail 👍
@khile55685 ай бұрын
@@AshRBX_dev will do, is it okay if i ping you for help?
@Jdbfjdbjej5 ай бұрын
i watched this video twice but i can't understand how to get the date to use in another script. Can you explain for me
@AshRBX_dev5 ай бұрын
Your datastore module script will contain all the data for every player in the game, to access the data from another script, you can require the datastore module script that we use as a “player class table” to access the buffer of the player. Then you can read the data using the data manager module
@alessved5 ай бұрын
when are you gonna do a new minecraft in roblox video?
@AshRBX_dev5 ай бұрын
Once I’ve returned to my new flat, wifi has been out for 3 weeks now and will return at the end of the month to make more videos including this one first 👀
@alessved5 ай бұрын
@@AshRBX_dev yay ill wait for it
@dizrods56095 ай бұрын
Hey im struggling a lot im trying to make a coins and kills also coins pick up but it wont save anything at all what can i do? pls help
@AshRBX_dev5 ай бұрын
First of all you need to check what sizes your data will max at and use that size in your datasizes table (for a test maybe set ID 1 to 4 bytes) so [1] = 4 in the datasizes table. Next you need to check how you’re writing the data. When you leave the game, you are going to want to use the writeData() function, you’re going to want to use the buffer.writef32 function and save your coins values. Finally you need to read the data in the join function. Once you have done this, you can finally set up the kills which to update your coins value you would just read the current kills value and then add 1 to that and save it to the buffer using the write data function
@MisterTheRobot5 ай бұрын
Yo, how do I make datastore in which I can store data in 2+ EXPERIENCES (not only places), in which I can use group or smt idk
@Collman_fff5 ай бұрын
what does --!native mean???
@AshRBX_dev5 ай бұрын
-!native is a new concept in Roblox studio that optimises some operations in the background, it’s will make some of the process in the micro profiler faster and I’ve been using it to test it out. You won’t have to add this into your program for it to work 👍
@Charlie-mp1ch5 ай бұрын
How could this be used for tools in a player's backpack?
@errorhostnotfound11655 ай бұрын
is he going to continue the minecraft clone?
@AshRBX_dev5 ай бұрын
Yes! I have had a setback with the videos as I’ve been away from my new flat due to no internet, however I will make the video on the Minecraft devlog once I’m back (21st July)
@Fujui5 ай бұрын
Please go over general use of this pleeeeease
@tatilişte5 ай бұрын
i got this error Module code did not return exactly one value - Server - Server:9 Stack Begin - Studio Script 'ServerScriptService.DataStore.Server', Line 9 - Studio - Server:9 Stack End - Studio
@AshRBX_dev5 ай бұрын
This error means that the module you are requiring on line 9 did not return only 1 table which is causing this error check the module you are requiring on line 9 in server and find all the return statements to make sure
@tatilişte5 ай бұрын
Hello, I'm at 21:55 . Do i need to write cost of upgrade to saved? I have 5 things can be upgraded and price is increasing at every purchase. Can you answer pls?
@AshRBX_dev5 ай бұрын
Depends on how the cost increases, if the cost increases in a linear fashion, then you can store the starter cost only and use a linear function to get the value to the upgrade cost (eg default cost * level * 1.5) something like that, if you want random pricing for each upgrade, then you would assign an ID to each priced item and store it as a separate ID
@jlboss_ps47515 ай бұрын
What should i try and do/make as a new scripter?
@AshRBX_dev5 ай бұрын
I would start with small projects like moving 3D objects, animating UI or making a simple round system or leaderboard 👍
@Charlie-mp1ch6 ай бұрын
Could this be used for UI's?
@AshRBX_dev5 ай бұрын
Yes! And it’s encouraged especially with OOP as you can create multiple objects that act as windows for your UI such as in a shop, inventory, main menu windows etc. saves on having to write the same code for the same windows
@Charlie-mp1ch5 ай бұрын
@@AshRBX_dev Would definitely like to see videos on UI's.
@ROGERIOSAFADAO6 ай бұрын
it works but anytime can crash
@AshRBX_dev5 ай бұрын
Do you have an example of it crashing and where this might happen? From using this system I have not had this issue but if we find an issue like this I’d be happy to crash proof it 👍
@Charlie-mp1ch6 ай бұрын
Why do you have semicolons after your services? Specifically at 11:58
@AshRBX_dev5 ай бұрын
This is not something you need it is something syntactically that is accepted by the grammar that you do not need (force of habit from me 😅)
@hehe-vk4ls6 ай бұрын
Hi! I don't know if youre still looking through notifcations or comment sections. However, if you are I would love to know how or if you could store a player item using this system. Whether it is a weapon or something of the sort, i'd love to see it done! Youre doing amazing thank you very much for these videos.
@SarahRomaner4 ай бұрын
i tried that too but there is a better method. I personally just save the name of the item as a string value and when the player joins you can just check the saved names and assign the tools you have saved somewhere in your game to the players backback by cloning them.
@hehe-vk4ls4 ай бұрын
@@SarahRomaner yeah I started doing that too. Works perfectly
@Jaypiasco6 ай бұрын
my king !! welcome back!
@AshRBX_dev5 ай бұрын
Ayyy appreciate it thanks for coming back to watch 👍
@goose133786 ай бұрын
Oh my lord, you are so clever! I learned plenty of things from this, I especially like the graphics you put up to make the subjects much easier to digest
@AshRBX_dev6 ай бұрын
Appreciate it glad the graphics could be of use 👍👍