Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to delay the process of drawing  (Read 11260 times)

0 Members and 1 Guest are viewing this topic.

Daniel

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
How to delay the process of drawing
« on: July 06, 2020, 12:52:17 am »
Hello! I've created an interface in which I am drawing some lines on the window. My question is how can I slow down this process of drawing (like printing them one by one in real time)? Would ctime / chrono libraries be useful or is there something else that you can do with SFML?
« Last Edit: July 06, 2020, 02:29:31 pm by Daniel »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: How to delay the process of drawing
« Reply #1 on: July 06, 2020, 11:05:20 pm »
Chrono would be very useful for timing to use for the animations. SFML also provides a simple-to-use clock, which can be very useful for everything other than extremely advanced time manipulations.
You may also find some interest in Kairos, a timing library that uses chrono. One thing provides clocks that can be paused, slowed, reversed etc..
For animations where you can control in a similar fashion to time-line animation software, you could find some use of Plinth, maybe especially the SFML module, although the main timeline stuff is in the main module (SFML part not needed). I used it exclusively to animate everything in the
(click to show/hide)

With all that said, you'll have to be more specific in your problem if you want a more specific answer/help, sorry.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Daniel

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: How to delay the process of drawing
« Reply #2 on: July 10, 2020, 12:21:46 am »
Cool! Thanks for your answer :D