Point System

Hello! I want to know is it possible to make a point system from a timer? My game has 30 seconds for each level and I want the points to be added from the time left over. But I want each second to be equal to 100 points, so the maximum points you can get for each level is 3000. So 1 second is equal to 100. Example if you complete the level in 10 seconds you would get 2000 points because you had 20 seconds left & if you complete another level in 28 seconds you'll only get 200 points because you only had 2 seconds left. This is something I can't manage to figure out on my own well because I don't have anywhere close to the knowledge set like you Gamesalad geniuses on here do! I've tried to figure out out how to do this but I can't and it's really frustrating honestly. (If anyone can help me with this it'll be like a weight is lifted off my shoulders)

Thanks so much! , Victor

«1

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    (30-game.time)*100

    P.S for someone to score 3,000 they would have to complete the level in 0.000 seconds :smile:

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks Okay so I'll change my timer to 0.000 but what's (30-game.time)*100 & how would incorporate it?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    To make the game.timer do the 0.000 would I change it to real attribute and not integer ?

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    @http_gamesalad said:
    socks Okay so I'll change my timer to 0.000 . . .

    No !!! :D That was a joke, you said "the maximum points you can get for each level is 3000", and I was just pointing out that for someone to be able to get 3,000 points they would have to complete the level in 0 seconds !!! Which is impossible.

    @http_gamesalad said:
    what's (30-game.time)*100 & how would incorporate it?

    (30-game.time)*100 is the answer and you can in incorporate it however you want !

    For example, you could have it displayed through the game, so the player could see their 3,000 points ebb away as they play the game.

    Or you could use it at the end of the game to record the score . . . simply copy it into a an attribute (let's say a game attribute called 'FinalScore') . . .

    When the level is over, change 'FinalScore' to (30-game.time)*100

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks omg thank you bro you saved my life! Ill put it in right after I'm done with dinner & give you feed back :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Okay well idk why but is displaying "3500".

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    it's *

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    Okay well idk why but [it] is displaying "3500".

    I don't want to pry : ) but what is 'it' ?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks I got it working it's because my timer went into the the negative. Uh one more question if I'm not asking for to much! How can I get my timer to stop going into negative numbers? Like I want it to hit 0 and stop there and not go into -1, -2, -3, and so on?

    Thanks :)

  • Andrea_ComisiAndrea_Comisi ItalyMember Posts: 328

    Put the timer that change the game.timer in a rule and put the condition
    Game.timer < 0

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited September 2014

    @Andrea_Comisi‌ Thanks bro! but @socks I noticed I came into a little problem with the timer and the score. I saw when I completed a level in 9 seconds it gave me 2200 points when it's supposed to only give me 900 points and if I finish a level in 2 seconds it gives me 2800 points when it's supposed to to only give me 200. I think it switches around when it gets less than 15 seconds. Is there a way to fix this? But if I finish a level in 17 seconds it gives me the right amount points which is 1700 and if I finish a level in 15 seconds it gives me 1500 points

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    If your on the Mac creator use an index attribute they don't go negative.

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    @http_gamesalad said:
    . . . when I completed a level in 9 seconds it gave me 2200 points when it's supposed to only give me 900 points and if I finish a level in 2 seconds it gives me 2800 points when it's supposed to to only give me 200.

    You originally said . . . .

    "My game has 30 seconds for each level and I want the points to be added from the time left over. But I want each second to be equal to 100 points, so the maximum points you can get for each level is 3000. So 1 second is equal to 100. Example if you complete the level in 10 seconds you would get 2000 points because you had 20 seconds left & if you complete another level in 28 seconds you'll only get 200 points because you only had 2 seconds left"

    So, in your original example you say you should get 200 points from finishing in 28 seconds, but now you seem to be saying that you should get 200 points from finishing in 2 seconds !?

    You can't have both !! :smile:

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited September 2014

    Sorry @socks I was confused. Okay let me say it like this, if you have 28 seconds left on the clock I want you to receive 2800 points, if you have 17 seconds left on the clock I want you to get 1700 points & so on. If you have 10 seconds left on the clock I want you to get 1000 points & if you have 3 seconds left on the clock I want you to get 300 points. I hope this helps you understand what I'm trying to achieve & thank you so much for your help so far. Youre helping me tons bro :)

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    Sorry socks I was confused. Okay let me say it like this, if you have 28 seconds left on the clock I want you to receive 2800 points . . . .

    Cool, we are back to score system 1 ! :p

    The answer is . . . . . . drum roll . . . . . (30-game.time)*100 !!

    :wink:

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks Well like my timer had 8 seconds left on the clock when I completed the level and instead of awarding me 800 points it gave me 2200.

    This is the rule I have set up
    1. If game.win=1
    2. do change attribute game.final score to (30-game.timer)*100

    Then I put a second rule
    1.Rule game.win=1
    2. do after 0.1 seconds change attribute game.timer to 0
    (I put that there because well if you beat the level theres no point for the timer to still countdown)

    Then I put a display text
    Display game.finals score

    This is exactly what I have set up. It works properly for the 15 seconds and up! It awards the right amount but when it's less than 15 seconds it like does a reverse. Examples if you beat the level with 5 seconds left on the timer it gives you 2500 points when it's only supposed to give 500 points and if you beat the level with 7 seconds left on the clock it gives you 2300 points and not 700.

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    socks Well like my timer had 8 seconds left on the clock when I completed the level and instead of awarding me 800 points it gave me 2200.

    Well, I've suggested using (30-game.time)*100 . . . . which you've changed to (30-game.timer</font color>)*100 . . . I don't know what 'timer' might be, or how it works so I can't really suggest anything.

    Let me do a quick demo . . .

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Thanks @socks but this is how I got my timer ! I really appreciate you taking your time to help me with this problem :)

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    Very quick demo . . . . click and hold on screen to get your score, I've not put in anything like a reset, so it just runs on, but hopefully you can see the (30-game.time)*100 equation in action.

    Link: https://www.mediafire.com/?k4ebyk3js5egd0a

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @sock Thanks :) so what I understand from this is that the longer you take to press the button the less points you score?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks Hey do you mind giving me the other one? The one when you said > So, in your original example you say you should get 200 points from finishing in 28 seconds, but now you seem to be saying that you should get 200 points from finishing in 2 seconds !?

    You can't have both !! :smile: <

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited September 2014

    @socks when you said > but now you seem to be saying that you should get 200 points from finishing in 2 seconds !? < thats exactly what I want :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    sorry I don't know how to use the quoting system :p

  • ArmellineArmelline Member, PRO Posts: 5,366

    So the longer it takes you, the better your score?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @Armelline‌ no, the longer it takes you the worst your score. Example if you finish the level in 2 seconds you'll get 2800 points because 28 seconds will be left on the timer. Now if you finish the level in 28 seconds you'll only score 200 because there will be 2 seconds left on the timer. Get me?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    I was confused but I understand what @socks was trying to say now because I read back in the comments

  • ArmellineArmelline Member, PRO Posts: 5,366

    Then I'd recommend (30-game.time)*100.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @armelline could you try giving me the other one? The one when you said
    "So the longer it takes you, the better your score?"

  • ArmellineArmelline Member, PRO Posts: 5,366

    I think you really need to work out and clearly explain exactly what you want before people try to help you any more. You've had your question answered with an example project provided, but now we all just seem to be going round in circles.

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    sock Thanks :) so what I understand from this is that the longer you take to press the button the less points you score?

    I don't know anymore ! Lol : ) That is what the demo project does, that is what you've said you need to do, so I've made a project that does what you said you were planning to do, but who knows, anything could happen in this thread . . . lol

    :p

    The worrying part is that the project is freely available, all you need to do is to download it from the link provided, and assuming you own a copy of the popular game development platform 'GameSalad', all you would need to do is to run the demo to see what it is doing, but your question suggests this hasn't worked out as straightforwardly as that ?

    Like I say, who knows what is going on anymore !? :wink:

Sign In or Register to comment.