Navigation

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

    New Button Presser Game

    Finished Projects
    2
    2
    34
    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.
    • TurtleGamer 0
      TurtleGamer 0 last edited by TurtleGamer 0

      So I've recently finished a game called Button Presser, and it's finally done! The goal is to press the button and then buy stuff from the shop with your presses. It's my most complicated game yet and in I'm proud of it ☺️. But there still is an issue, around every 30 seconds, your game just crashes, and all your presses are gone 😥. (Feel free to give tips and help or give me ideas for items in the shop!
      ID: SG673MND1Q

      1 Reply Last reply Reply Quote 0
      • Kat
        Kat Fuze Team last edited by

        Well done on another game!

        I think I see what's causing the problem. On lines 34 to 37 you have some createSprite() and loadImage() functions which are inside the main loop. Creating or loading something inside a loop will eat up memory each frame and cause an error eventually, so I would just move those to be above the main loop. (I'd also move the next few lines, setSpriteImage/Scale, with them to keep it all together neatly.)

        1 Reply Last reply Reply Quote 0
        • First post
          Last post