Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-17-2011, 05:40 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 249
gabacus is on a distinguished road
Default High Scores Algorithm

Hi Guys,

I am working on building my first game ever. It has been one hell of a challenge, but I am getting there!

I have the gameplay done and now I'm working on getting the final pieces together.

What is causing me some trouble at the moment is how to do the scoring.

Basically, my game will be scored on the level you reach and the time it takes to complete.

For example, a player may get to level 5 in 3 minutes, or level 10 in 6 minutes. Now, if a player gets to level 10 in 3 minutes, their score should be higher than the person who got there in 6 minutes.

I am trying to figure out an algorithm that will get the scoring right but I am having real trouble with it.

Anyone have any ideas?
__________________
-- Website --
SpartanApps

-- Current Apps --
Musicopoulos
gabacus is offline   Reply With Quote
Old 02-17-2011, 06:02 PM   #2 (permalink)
Registered Member
 
god0fgod's Avatar
 
Join Date: Jul 2010
Posts: 278
god0fgod is on a distinguished road
Default

score = level*factor/minutes?

If you need help positioning and saving scores as well I can give you an piece of my code.
__________________
god0fgod is offline   Reply With Quote
Old 02-17-2011, 06:16 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 249
gabacus is on a distinguished road
Default

Quote:
Originally Posted by god0fgod View Post
score = level*factor/minutes?

If you need help positioning and saving scores as well I can give you an piece of my code.
I was thinking of doing something like that. Using an inverse function is clear since a shorter time means a higher score.

My main concern is that someone who finishes quickly but doesn't get to a high level may get a higher score than someone who gets to a higher level slowly.

I'm currently using this algorithm

levelReached x (levelReached/gameTime)

It seems to be OK, but I just don't know enough to be sure it will work.

Regarding displaying high scores, I was planning on using Game Centre? That does everything for you doesn't it?

Cheers
__________________
-- Website --
SpartanApps

-- Current Apps --
Musicopoulos
gabacus is offline   Reply With Quote
Old 02-17-2011, 06:24 PM   #4 (permalink)
Registered Member
 
god0fgod's Avatar
 
Join Date: Jul 2010
Posts: 278
god0fgod is on a distinguished road
Default

It's up to you what you use for the score storage.

Some games have a time bonus idea.

time_bonus = maximum - time
if time_bonus < 0 then time_bonus = 0
score += time_bonus

Something like that. Then you can also display this bonus.
__________________
god0fgod is offline   Reply With Quote
Old 02-17-2011, 06:30 PM   #5 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 249
gabacus is on a distinguished road
Default

hmmm, a bonus system. I like the idea of that. I really helps me get the user moving in the right direction and will also set the milestones for Achievments in Game Centre!

Oh, by the way, love the name "Monkey Curling"!!! Its hilarious!!!!
__________________
-- Website --
SpartanApps

-- Current Apps --
Musicopoulos
gabacus is offline   Reply With Quote
Old 02-17-2011, 08:11 PM   #6 (permalink)
Registered Member
 
god0fgod's Avatar
 
Join Date: Jul 2010
Posts: 278
god0fgod is on a distinguished road
Default

If you love the name, you'll love the game.
__________________
god0fgod is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 428
9 members and 419 guests
7twenty7, chemistry, ChrisYates, hussain1982, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0