game mechanics

Blitz3D Forums/Blitz3D Programming/game mechanics

So could this be used as:
ultimatetargetvalue = 40
targettime=120
actualtime=90
lastlevelamount=22
newtargetvalue = X

newtargetvalue=ultimatetargetvalue-((targettime-actualtime)/lastlevelamount)

so if you got 22 on the last level you would have to make:

newtargetvalue=40-((120-90)/22)
X= 40 - ((30)/22)
X = 40 - 1.36UP
X=38

Or 10
X=40-((30)/10)
X=40-3
X=37
But if you got 30

X=40-((30)/30)
X=40-1
X=39

and if you got 40
X=40-((30/40)
x=40-.75UP
X=39

and 50
X=40-((30/50)
X=40-.6UP
X=39

Something is still not too easy. Of course I am probably screwing it all up!