Jump to content




How to make my program refresh itself constantly


  • You cannot reply to this topic
3 replies to this topic

#1 CaosTECH

  • Members
  • 131 posts
  • LocationIn your closet

Posted 02 January 2016 - 02:30 AM

Hey, I have a question. As it says in the title... Im making my game to be better, and to do that I wanted to implement a way to make the game refresh itself without the character actually doing anything. Like now the game only refreshes when a key is pressed. I wanted to make it to where it refreshes or buffers, automatically without the player doing anything. This would also support the idea of having mobs and animated pixels/moving pixels

If you want I can post the code, but im not going to unless necessary because its a secret project. So if I did need to post the code, I would probably only post the part that im having trouble with or... yeah





Thanks in advance

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 January 2016 - 02:46 AM

Take a look at the examples for os.startTimer().

#3 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 January 2016 - 08:44 PM

With timers: you basically wait for an event. If the timer comes first, you handle the timer, else, you cancel the timer and handle.other input.

#4 CaosTECH

  • Members
  • 131 posts
  • LocationIn your closet

Posted 02 January 2016 - 08:48 PM

Im looking at the wiki page for it... this actually might help. Now just to see how to implement it into the code. Thanks! I appreciate it :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users