Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Sprite Game timer count

    Beginners
    4
    6
    200
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      ahallett2002 last edited by

      Hey guys,
      I am making a sprite game where you have to dodge asteroids. My question is, how do you put in a score count in the game? I am a bit new to fuze. If anyone knows, please replay!

      Thanks!

      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @ahallett2002 last edited by

        @ahallett2002 Shouldn't be to difficult just keep a variable with the current score in it and show it on the screen somewhere (unless I am a misunderstanding the problem?)

        1 Reply Last reply Reply Quote 0
        • PickleCatStars
          PickleCatStars F last edited by Martin

          Try this as a separate program and see if you can figure out what’s going on.

          startingtime = int(time())
          score = 0
          
          loop
             clear()
             currenttime = int(time())
             score = currenttime - startingtime
             print (”score = ”, score)
             update()
          repeat
          
          1 Reply Last reply Reply Quote 0
          • Martin
            Martin Fuze Team last edited by

            I've edited it for you but when including code in your reply put three 'backticks' before and after the code chunk to get the proper code formatting.

            Please see the FAQ here: https://fuzearena.com/forum/topic/226/faq-common-questions-and-answers/4

            PickleCatStars 1 Reply Last reply Reply Quote 0
            • PickleCatStars
              PickleCatStars F @Martin last edited by PickleCatStars

              @Martin Thanks, will do in future.

              testing

              pianofire 1 Reply Last reply Reply Quote 0
              • pianofire
                pianofire Fuze Team @PickleCatStars last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post