Clearing And Saving On Android

Clearing And Saving On Android

Postby crazypathum » Thu Nov 17, 2011 12:06 pm

Brady,

I am using EZ Game Saver to save states of my game on Android platform. I'm not using auto save function, as I need to save when a user exit back to the menu screen while playing the game and not the application quit. So I'm using manual save for single profile and single slot (# 1). Since I'm creating dynamic objects using an object pool, I need to keep references to the objects on the scene from my object pool. Hence I'm not using EZ Game Saver to create those dynamic objects but instead I save information about those objects, there positions etc. and instantiate them using the object pool myself when the game is restored.

My question is regarding the time it takes to clear an existing slot while running the application on phone. It takes less than a second to save the game on an empty slot, but it takes around 20 seconds to save over an existing slot. It also takes about 20 seconds to clear an existing slot using the methods SaveGameMaster.ClearSaveGame(SaveProfile, SaveSlot) or SaveGameMaster.ClearAllSaves(SaveProfile). Maybe when I save over an existing slot EZ Game Saver deletes the old data first which might be causing the save to take a long time. I do not want to have unlimited number of slots and grow the size of the application data. So even if I have limited number of slots instead of just one, It will save over an existing slot again and cause a huge lag.
Is this an expected behaviour of EZ Game Saver or is there any better way to handle my game saves?

Cheers Brady
crazypathum
 
Posts: 8
Joined: Mon Oct 24, 2011 4:13 pm

Re: Clearing And Saving On Android

Postby Brady » Thu Nov 17, 2011 11:37 pm

No, that is not expected behavior, though the time it takes to save/clear depends a lot upon how much data you are saving or have saved. But I would say that if it only takes a second to save, but 20 seconds to clear, there's something wrong. I tend to think that it must be due to some slowness in one or more of the PlayerPrefs APIs when running on Android. I say that because the EZ Game Saver code isn't that intensive and execution time-wise, it relies mostly on PlayerPrefs API calls. Most of the rest of the code is just some basic logic for loop control, etc. I haven't seen this happen on the devices I have to test with, so what you might try is going into SaveGameMaster.ClearSaveGame() and then comment out everything from the PlayerPrefs calls through to, but not including, the return statement. Then, start uncommenting things line-by-line until you see the problem again. If it is inside DeleteAllObjectSaveKeys() or ClearNamedKeys(), you then might go into those and comment out all the PlayerPrefs calls, then one-by-one, start uncommenting them and see which one(s) is/are causing the slow-down. I suspect it is one or more of the PlayerPrefs calls, perhaps .KeyExists()? I can't be sure since I can't reproduce it on my end.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Clearing And Saving On Android

Postby crazypathum » Tue Nov 22, 2011 1:02 pm

Cheers Brady, I'l give a try and reply u soon...
crazypathum
 
Posts: 8
Joined: Mon Oct 24, 2011 4:13 pm

Re: Clearing And Saving On Android

Postby crazypathum » Thu Nov 24, 2011 7:31 pm

Hi Brady,

I have commented out different function calls in SaveGameMaster as you've suggested and found out the delay is caused by function call 'DeleteAllObjectSaveKeys(saveKey + "dyn")'. I couldn't figure out which part exactly in this function causes the delay. I have quite a few objects dynamically created using four prefabs. As explained in the EZ Game Saver doc, I attached 'GameDataSaver' scripts to those prefabs, and added them to the 'Prefabs' list in Game Save Manager as well. I checked only position, rotation, scale, tag and name attributes to be saved.

Instead of figuring out what exactly causes the problem, I've implemented a workaround where I save the positions, rotations etc. and instantiate objects on those locations in my code instead of letting EZGameSaver creating them for me (just as I'm doing for the objects loaded from an object pool). With this modification I can clear saved data in less than a second.
I tested this on a Samsung Galaxy S, and I didn't get a chance to test it on any other Android device.
crazypathum
 
Posts: 8
Joined: Mon Oct 24, 2011 4:13 pm

Re: Clearing And Saving On Android

Postby Brady » Sun Nov 27, 2011 9:36 pm

Interesting. I wish we could narrow it down to a specific PlayerPrefs API call, as I strongly suspect that is the issue, especially considering this only seems to be specific to a platform. But I'm glad you've got things working as desired.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

jhgjtghrt

Postby hxmy018 » Thu Jul 07, 2016 11:01 am

moncler girls
scarpe hogan
fitflop slippers
botas de futbol nike baratas
womens timberland boots
chaussures de foot pas cher
Soccer Boots Outlet nike
discount ray bans
zapatos de futbol nike
nike schuhe
botas de futbol
pandora bracelets
michael kors handbags on sale
hogan outlet
nike sportschuhe
nike soccer cleats cheap
official NHL jerseys
air max 90 pas cher
pink toms
moncler outlet usa
cheap fitflops
Michael Kors Sale
jordan retro 10
pandora rings
nike mercurial soccer cleats
raybans glasses
toms women shoes
oakley outlet
cheap michael kors purses
Cheap Coach
NHL jerseys cheap
Nike Roshe Run
cheap vans shoes
Coach Purses Outlet
where to buy toms
pandora jewelry store
botas futbol baratas
womens toms
toms on sale
oakley sunglass outlet
oakley goggles
nfl jerseys cheap
timberland outlet
cheap ray ban aviators
nike mercurial
Cheap oakley sunglasses sale
Nike Air Jordan 11
pandora rings silver
Ray ban sale online
chaussure nike homme pas cher
toms shoes outlet
nike tiempo
new yeezy shoes
new jordans 2016
oakley prescription glasses
retro jordans for cheap
Canada Goose Women
cheap oakley sunglasses outlet
cheap christian louboutin
pandora necklace charms
newest lebron shoes
michael kors black bag
Cheap Michael Kors
soccer shoes nike
cheap oakley goggles
Toms shoes sale
Ray Ban Outlet
Nike Free 4.0
Boutique nike paris
Canada Goose Jackets
Nike Factory Store
timberland shoes for men
shop nfl
cheap pandora charms
Uomo Hogan
scarpe hogan outlet
nike futbol
Cheap Adidas Soccer Shoes
women toms shoes
Nike Air Jordan 13
nfl store
cheap nike air max 90
toms outlet
toms clearance
cheap air max outlet
vans shoes for sale
christian louboutin outlet
pandora charm bracelet sale
authentic retro jordans for sale
Michael Kors
Air Jordan Retro 11
a&f usa
ray ban store
oakley eyeglasses
nike jordan shoes
cheap jordan shoes for women
oakley cheap sunglasses
nike air max 2013
Cheap Ray Bans
nike free run 5.0 femme
black toms
ray ban 3025
ray bans for cheap
botas de futbol baratas
roshe run nike
Cheap Toms Shoes
fitflops sale uk
Ray Ban Aviators
michael kors wallets on sale
moncler coats for women
max air 2013
Toms Outlet Online
oakley sunglasses clearance
official nfl jerseys
yeezy adidas
scarpe hogan uomo
NHL store
pandora store
Discount toms
Nike Air Jordan Store
Nike Outlet Store
pandora charms sale
nike mercurial superfly
cheap timberland boots for men
nike schuhe damen
nike air max
Jordan Sneakers For Sale
Ray Ban Cheap
Cheap Canada Goose
christian louboutin sale
lebrons 11
pandora rings jewelry
womens vans
pandora beads
Toms Wedges
lebron james shoes for sale
sito ufficiale di Hogan
abercrombie outlet store
ray ban sunglasses for men
toms sale
toms outlet store
fitflop sandals sale
ray ban sunglasses cheap
nike air max 1
Air Jordan 11
Toms Shoes For Women
toms cheap
yeezy shoes
adidas yeezy boost 350
retro 11 jordans for sale
hogan scontate
Michael Kors Outlet
Coach Bags On Sale
nike sb stefan janoski
Toms Glitter
chaussure basket homme
Cheap Nike Soccer Shoes
ray ban sale
Canada Goose Outlet
Cheap Soccer Shoes
nike free
Toms Shoes On Sale
vans shoe store
toms retailers
Nike Store
pandora glass beads
toms store
christian louboutin shoes
abercombie and fitch
abercrombie and fitch store
NHL shop
Cheap Jordans
Air Max 90
mens lebron james shoes
jordan 10
hogan scarpe donna
cheap nike air max
7.7
hxmy018
 
Posts: 65
Joined: Thu Jul 07, 2016 10:34 am

1

Postby czwen » Fri Dec 02, 2016 12:38 pm

coach factory outlet online
stan smith adidas
adidas superstar
adidas superstars
adidas nmd r1
adidas nmd runner
adidas nmd r1
adidas nmd runner
adidas yeezy boost 350
yeezy boost
adidas yeezy boost
yeezy shoes
cheap jerseys wholesale
cheap nfl jerseys
coach outlet online
coach factory outlet online
michael kors outlet sale
michael kors handbags
mlb jerseys
mlb jerseys
cheap air max
air max outlet
louboutin outlet
louboutin sale
yeezy boost
adidas nmd runner
michael kors outlet clearance
michael kors outlet store
coach outlet online
coach factory outlet online
discount nike shoes
cheap nike sneakers
coach outlet online
coach factory outlet online
hollister clothing store
hollister co
red bottom shoes
cheap bottom shoes
cheap ray bans
raybans
air max 90
louis vuitton outlet online
north face outlet
coach outlet store online
michael kors outlet online
michael kors outlet store
james shoes
lebron shoes 
birkenstock
birkenstock uk
cheap jordan shoes
air jordans
nike flyknit
nike free 4.0 flyknit
timberland outlet
timberland shoes
pandora outlet
pandora charms
abercrombie outlet
kobe bryant shoes
polo ralph lauren outlet
polo ralph lauren outlet online
true religion sale
true religion uk
rolex watches for sale
Replica Rolex
michael kors uk
kate spade uk
kate spade bags
louis vuitton uk
louis vuitton purse
hollister uk
christian louboutin uk
louboutin shoes
north face jackets
north face uk
true religion jeans outlet
true religion outlet store
true religion outlet store
cheap jordan shoes
dolce and gabbana outlet online
hugo boss outlet online
hugo boss suits
pandora charms sale clearance
rolex watches
toms outlet store
michael kors handbags outlet
kate spade outlet online
canada goose outlet
canada goose outlet
ugg sale
christian louboutin outlet
longchamp bag
longchamp handbags
michael kors bags
michael kors
moncler outlet online
moncler jackets
moncler jackets
ugg australia
zhi20161202.
czwen
 
Posts: 64
Joined: Fri Dec 02, 2016 8:57 am

Re: Clearing And Saving On Android

Postby heng » Thu Aug 03, 2017 8:15 am

No, that is not expected behavior, though the time it takes to save/clear depends a lot upon how much data you are saving or have saved. But I would say that if it only takes a second to save, but 20 seconds to clear, there's something wrong. I tend to think that it must be due to some slowness in one or more of the PlayerPrefs APIs when running on Android...
:D :D :D

บาคาร่าออนไลน์
gclub casino
heng
 
Posts: 51
Joined: Sun Jul 30, 2017 9:09 pm

56udts80

Postby MikeNef » Sat Sep 02, 2017 5:47 am

MikeNef
 
Posts: 93
Joined: Sat Jul 01, 2017 4:47 am
Location: USA

nfxr6k5l

Postby JohnNef » Sun Sep 03, 2017 7:41 pm

JohnNef
 
Posts: 106
Joined: Fri Sep 01, 2017 6:08 pm
Location: USA

Next

Return to EZ Game Saver General

Who is online

Users browsing this forum: No registered users and 1 guest

cron