Score Percentage algorithm

Hi everyone
I am trying to create a algorithm to create a percentage to the score, it is between 0-100%, i have some variables that will influence the score, but i am having some doubts about how and what i really need to create this type of score, it can only be created with mathematic functions? or can use other things? some other ways?

Thanks

Thats not very clear.
Percentages are easy to calculate, if you know the maximum possible value, and the current value.

For instance, if 4000 is possible, and your score is 1234, then the percentage is:

1234/4000 * 100

but the values will change per level and i dont know how i can atribute values to the variables, like, if the time < 2 then
time_value = 1150
elseif time > 2
time value = 500
end

how i can atribute values do my percentage of the game be between 0 and 100?

Im sorry.
I read that 10 times now and still do not understand the question.

Your code to set a value is nearly right

if the_time <= 2 then
time_value = 1150
else
time_value = 500
end

but what does that mean?
What are you doing with that number?

i will try to be more clean :)

i have a lot of levels, and the time of conclusion for each level will change per level, per exemple, the level one is easy and need some like 5 seconds to be conclude, but the livel 20 need some like 25 seconds to be conclude, and my doubt is i can use the same function to calculate the percentage of different levels? or need to fix the function, level per level?

views:2182 update:2012/2/12 11:34:30
corona forums © 2003-2011