I am developing a role-playing game for myself. Understand this, I’m not going around asking for people to make scripts for me. I have been making this myself and I don’t mind that. Tutorials and explanations are good. Do-it-for-me is bad.
So, how can I implement the ability to create an account in a browser game? I know how to script a GUI. You can see the inventory/chat/etc that I already made in my game. What I don’t know is how to save variables in a file and then read them later.
How do I have the game write a file?
How do I have the game read a file?
Should the file be in the website’s directory, or on the users’ computers?
I know, this has been asked again and again. People usually answer with “Player Prefs”. But, they don’t explain how to use Player Prefs.
What r u useing to save the other aspects of your game? If you look in search you will find that there are a few topics with examples on saving player.Prefs.
Its rather basic stuff though most make a function for saving and one for loading then you just compare you string names to a player prefs string and save it under a custom key.
Well, you would need to use a server side script for this, yes. Not necessarily php, there are many options. Javascript, ASP, .NET, etc… PHP is just what I would personally choose, because it’s a language I’m rather familiar with.
Being that you mentioned this is a web-bsaed game, I’d wager this is actually your only option.
My current website host doesn’t support free server-side scripting. I would have to upgrade to a plan that costs about $12/month. That isn’t terrible, but I would like to keep this free if possible.
I have heard of 110mb many times. They seem to have a good reputation. I have successfully transferred my website over to their free hosting. At the moment, they only will store generic filetypes (HTML, JS, CSS, JPG, PNG, etc) so I couldn’t upload the .unity3d file. I left that file with my old host and linked back to it. No problems. Soon I’ll set up the PHP, ASP, JavaScripts, or whatever I choose.
Thank you very much for your help.
If you know of any good server-side scripting tutorials, feel free to share. Otherwise, I’m sure a good search on Google will yield plenty of information.