Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 06:04:01 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Customization System
Pages: [1]
Print
Author Topic: Customization System  (Read 1040 times)
PixelzGames
Level 0
**



View Profile WWW
« on: April 08, 2017, 02:10:05 PM »

hey guys,

We are making a customization screen where you can purchase different skins and whatnot for your character in game. I was wondering what would be the best way to lay down the architecture for that in Unity?

Would you guys store the purchases in PlayerPrefs and every time change create the proper skin at runtime? Or is there a better way?

Thanks
Logged

Fat Pug Studio
Level 2
**


View Profile WWW
« Reply #1 on: May 15, 2017, 07:12:18 AM »

That's the approach i'd use, can't really think of a better one.
Logged

darkhog
Level 7
**


Dragon Agent


View Profile
« Reply #2 on: May 15, 2017, 08:56:40 AM »

PlayerPrefs are too easy to hack to get "free skins". I'd store it either server-side, or if you want to have an offline mode, in a custom file format (read up on C# file streams and BinaryWriter/BinaryReader, dotNetPearls have a good article about it), preferably with additional encryption on top of it.
Logged


Be a computer virus!


I cannot C well, so I stick with simpler languages.

There are no impossible things, there is only lack of skill.
bateleur
Level 10
*****



View Profile
« Reply #3 on: May 15, 2017, 09:40:18 AM »

PlayerPrefs are too easy to hack to get "free skins".
Was assuming the OP meant in game currency.

If it's real money then PlayerPrefs is no good for an even more important reason: if the registry entry gets cleared for whatever reason that wipes the skins!
Logged

Fat Pug Studio
Level 2
**


View Profile WWW
« Reply #4 on: May 15, 2017, 11:56:48 AM »

Check this out OP

https://forum.unity3d.com/threads/saving-game-beyond-playerprefs-xml-iserializable-etc.44559/
Logged

Teknokommari
Level 0
**


View Profile WWW
« Reply #5 on: May 21, 2017, 06:20:59 AM »

hey guys,

We are making a customization screen where you can purchase different skins and whatnot for your character in game. I was wondering what would be the best way to lay down the architecture for that in Unity?

Would you guys store the purchases in PlayerPrefs and every time change create the proper skin at runtime? Or is there a better way?

Thanks

Personally I'd use JSON instead and if necessary encrypt the save file.

Made tutorial about save systems that you can check out.

https://quitbutton.wordpress.com/2017/05/03/save-system-with-json/

You could just add there id's of skins and whether they are unlocked or not and maybe save the current load-out there as well.

JSON is easy to send and parse on the backend as well.
Logged

JWki
Level 4
****


View Profile
« Reply #6 on: May 21, 2017, 10:18:08 AM »

If the purchases are real purchases then you definitively wanna do server side management of what a player owns. In offline mode you just don't get the skins. Otherwise there will be ways players come up with to get stuff for free.
Logged
Teknokommari
Level 0
**


View Profile WWW
« Reply #7 on: May 21, 2017, 11:32:52 AM »

If the purchases are real purchases then you definitively wanna do server side management of what a player owns. In offline mode you just don't get the skins. Otherwise there will be ways players come up with to get stuff for free.

The key question here is that do you want to make the game "always online" or not.
If it's not then you're bound to store some data locally that may be manipulated by the player.

There are ways like check-sums and encryption that can make this difficult enough for most players not to bother though in which chase I'd be more worried about memory editing which is a problem with server side management as well if the game is still ran locally.

(modified high-scores etc. being sent to server)
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic