I want to create a shop in my game but I don’t want to create a bunch of data store scripts and make my usual spaghetti code. I’d like some advice and some techniques to do.
I want to make an accessory shop that saves.
How would I go around doing this, without making spaghetti code
You should first think about your entire shop, how it’s gonna work, then you should break it up into smaller pieces, and try to make each piece as best as you can. Doing multiple things at once can be quite hard to keep track of, and that mostly causes bad code. We also cannot just tell you “how to” write good code, i recommend first trying to make it, then wherever you feel like you got a bad code, coming back to this thread and posting a question here if it could be improved in any way.
I don’t get it, if you don’t at least try to do it you won’t really experience it, some people use ProfileService, which is completely fine, but I’d argue that just for theoretical reasons to go with a raw implementation for experimenting, unless that’s not an option, in which case, completely understandable that you want to do things quicker.