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

Author Topic: Shift - A Simple Small Animation Library  (Read 12188 times)

0 Members and 1 Guest are viewing this topic.

Me-Myself-And-I

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Shift - A Simple Small Animation Library
« on: September 22, 2025, 05:21:49 am »
Hi everybody!
         I'm not sure if this header only library will be of much help to anybody but I had it made. So I thought i'd make it available.I hope somebody finds this useful to them! :)

https://github.com/Happy-Flappy/Animation-Shift

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11296
    • View Profile
    • development blog
    • Email
Re: Shift - A Simple Small Animation Library
« Reply #1 on: October 01, 2025, 07:43:08 am »
Cool! Always good to see someone trying to make animations easier to use.

The naming of the function can be a bit confusing. When I see Shift(shift), I assume this constructs an instance of the class Shift as opposed to calling a function. I'd probably stick to lowercase shift().

Is delay the time each frame is shown?
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Me-Myself-And-I

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Shift - A Simple Small Animation Library
« Reply #2 on: October 01, 2025, 09:26:57 pm »
Yes, I suppose that could be a little confusing.

"Is delay the time each frame is shown?"

Yep.

I tried my best to make the header usable in most cases for most libraries. Especially since I have recently started making my own graphics library and wanted duo compatibility. This is why I didn't simply use an sf::Clock to handle time. 

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11296
    • View Profile
    • development blog
    • Email
Re: Shift - A Simple Small Animation Library
« Reply #3 on: October 02, 2025, 08:01:01 am »
Hehe, naming is a hard problem ;D

For me "delay" would've instinctively meant, that the start of the animation is delayed. For the duration a frame is shown, I'd have expected something more like "frame time/duration" or similar.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything