GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Best Practice for Timers

Hey Guys,

I have been reading a bunch of posts about timers and how they can cause performance issues. Most of these posts are a few years old, so I am wondering is this still an issue or has something changed.

Also I have a question about loading a scene...right now it takes about 4 seconds to load, is there a way to put in a preloaded so the user can see the game is loading?

Comments

  • BellowBellow Bartender Posts: 227Member, PRO

    2 question i wonder about that too.

  • SLOCM3ZSLOCM3Z Posts: 797Member
    edited November 2015

    It matters how you use timers. They are great if used efficiently! For the load scene you could make a Loading animation that spawns at the end of the level. So, when guy collides
    with the exit door spawn an actor that centers itself on the screen and have it playing a Loading animation.

    Edit: I forgot that you could do this. Make a game integer attribute game.Finished or something, or use an already made one.
    Make the LOADING actor on the non-scrollable layer. When the player finishes and does everything he needs to change attribute game.Finished to 1. Then in the LOADING actor have a constrain that says: constrain self.color.alpha to game.Finished. Then in every level you might want to add a manager actor that changes the game.Finished to 0 when the level starts. :smiley: Hope this helps!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member

    Those are old threads back many version of GS ago. I use timers alot. Timers are a vital part of coding. I never have issues.

Sign In or Register to comment.