The Daily Click ::. Forums ::. Klik Coding Help ::. level rating systems
 

Post Reply  Post Oekaki 
 

Posted By Message

HarrysGames10



Registered
  11/01/2012
Points
  7
13th January, 2012 at 18:57:18 -

what is the best way to store gobal values of either 1,2 or 3 over a large range of different levels?
i want to be able to load the number of stars you get from each level all in one level selector frame. and i also want to have this information, along with what level you have unlocked, saved locally so that when you play the game again it remembers where you left off from and keeps track of all your stars.

if there is an example of this that would be great. If not and someone could just set me on the right path i could probaly figure it out. im just not sure where to start.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
13th January, 2012 at 23:55:00 -

It's hard to say what the best way to store values is. But the most common is using the INI object.

This article is pretty good. Tigerworks was always a big of a legend in my opinion.
http://www.create-games.com/article.asp?id=188

I'll just quote this little part he wrote at the bottom of the article thats really useful because it will save your ini file to the game's directory instead of somewhere in system32

"Start of frame: Set current file to: appdrive$ + appdir$ + myfile.ini "

Hope that helps.

 
.

HarrysGames10



Registered
  11/01/2012
Points
  7
14th January, 2012 at 02:58:33 -

will the INI still work the same way in an ios application?

also would it be a good idea to save all my individual level ratings in a global array and then load them on the level select frame based on the information saved in the ini?

or is there a simpler way to do this?

 
n/a

HarrysGames10



Registered
  11/01/2012
Points
  7
14th January, 2012 at 08:31:58 -

http://www.mediafire.com/?rvl6o599tb9bif5

here is a little sample i put together that i think could work. however its very long and tedious. if someone could show me a better way to do this same concept that would be greatly appreciated.

also does anyone know if something like this would work for an IOS app

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
17th January, 2012 at 02:48:54 -

I only ever use arrays for saving data. The reasons for this are they are far more secure than INI, INI's can be edited and ruined where as arrays take alot more effort to tamper with. As far as im aware IOS supports the array object and the INI so the choice is yours.
I had a very quick look at your link and you could cut out at least 50% of that code using qualifiers and simply jumping to a level based on a single value rather than code a line per choice if you understand what i mean.

eg.
If you where to add a single qualifier to all the level choices and then do something like....
user clicks on group X
jump to frame (alt value 1 of group X)

This would cut out almost all of the code.

In regards to the loading level ratings, you could just load all level ratings at start of frame, simple as that, I personally would use arrays, they are easy to use. there are some great tutorials on arrays here on DC if you run a quick search.

I hope that helps.

 
n/a

HarrysGames10



Registered
  11/01/2012
Points
  7
17th January, 2012 at 06:56:57 -

Ok i see where youre coming from as far as using the qualifiers, and im gonna go with that idea.
but what i dont understand is how i could load all the level ratings at the start of the frame. right now i have it load all the values to individual counters at the start of the frame. and then i base the animation of 1/2/3 stars based on the value of the respective counters. so im wondering what you were referring to as far as loading at the start of the frame?

thanks for the help btw.

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
17th January, 2012 at 11:49:00 -

ahh ok i think i know what you mean, an easy way to do this would be to load the level rating into the star active itself as an ALT value and again using qualifiers have 1 line that says somthing like...

Alt value of group "level star" = 1
Set animation to .....

Alt value of group "level star" = 2
set animation to .....

and so on, then when the level loads and after you have loaded the rating into the star object it will change its animation to the value if you understand my ramblings.

 
n/a

HarrysGames10



Registered
  11/01/2012
Points
  7
17th January, 2012 at 18:44:08 -

ok i got what youre saying now. and yeah that should definitely take away alot of code. i will give this a try and see how it works and post back after its done.

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
17th January, 2012 at 21:33:49 -

ok good luck, any other issues just ask and i hope i can help

 
n/a
   

Post Reply



 



Advertisement

Worth A Click