New to Unity/ES2 - advice?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
ShaneS429
Posts: 3
Joined: Sun Feb 10, 2013 12:24 am

New to Unity/ES2 - advice?

Post by ShaneS429 »

Hello,

I'd like to start off just by introducing myself. I have been working on developing an iOS game for a while now with a partner, after switching game engines a few times, we have now landed on Unity3D and I can safely say we love it. That being said however, my partner has 0 coding experience, and my experience only goes back to a few classes in high school as well as a few in community college. I fully understand programming logic, although it's just syntax and things of that nature always mess me up.

That being said, we are using the PlayMaker asset to help us design and code and all is going smoothly. The game we are trying to make is best described as a side scrolling 2D beat'em up style game. As the player progresses they can unlock and play as 10+ characters with 20+ weapons/abilites. This is where ES2 comes in. I've been reading the way to save data from one play session to another in Unity3D is via PlayerPrefs, but have also read PlayerPrefs can tend to cause slowdowns when dealing with a large amount of items as well as being on mobile platforms.

I have the PlayerMaker ES2 custom actions loaded in and see it only really handles loading and saving of values 1 at a time. Our game, with all the weapons and whatnot, needs to be able to save data on if the weapons are unlocked, what their damage value is, what upgrade rank it is, how much does it cost, etc. Is there a way to mass initialize a large amount of values at the games first start using PlayMaker or is that something I'd have to figure out how to code by hand.

Basically, we'd need a large amount of saved data such as:

Weapon 1 - Unlocked?
Weapon 1 - Damage
Weapon 1 - Range
Weapon 1 - AmmoSize
Weapon 1 - Cost
Weapon 1 - UpgradeLevel

We'd need something like this multiplied by every gun we have in the game and all this needs to be saved between sessions.

Currently the way I'm trying to attempt this now via PlayMaker and ES2 is settings up an FSM to detect if those keys exist. If they don't exist then write the initial data which I have hard coded into objects, if it does exist then load the data and replace it for each object.

Any idea or thoughts?

Other than that I definitely like what ES2 can do.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: New to Unity/ES2 - advice?

Post by Joel »

Hi there,

The way you are doing it is the best way as there is minimal overhead when calling ES2's functions.

However, for what you're looking to achieve, it sounds like you'd be better off creating a separate prefab for each weapon. For more information on using prefabs, you're better off discussing this on the Unity Community Forums as they're unrelated to Easy Save.

I hope this helps!

All the best,
Joel
Locked