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

Author Topic: <SWOOSH> Header-only mini library for activities and segues  (Read 1962 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 12
    • View Profile
<SWOOSH> Header-only mini library for activities and segues
« on: October 28, 2018, 09:22:53 pm »
There had to be a way to manage cool screen transitions as easy as possible in C++ without too much difficulty.

There wasn't until now Swoosh, the mini library that immediately adds 100x polish to your game.

Fork the project at https://github.com/TheMaverickProgrammer/Swoosh.

LICENSED under The zlib/libpng License.

Swoosh is easy to integrate and makes your game look pro. Just checkout the super simple game example that ships with it.

See the full video https://streamable.com/qb023.

The example project comes with 4 header-only custom segue effects you can copy and paste directly into your project and it'll just work.

Using segues is as easy as calling push or pop and providing the intent. The intent is a specialized nested class designed to be human readable. Just see for yourself:

ActivityController controller;


// User selects settings
using intent::segue;

Popping is the same way.


And if you're making a legend of zelda clone and the player teleports out of a series of deep dungeons back to overworld... there's a function for that too

bool found = controller.queueRewind<segue<SlideIn>::to<LOZOverworld>>();

if(!found) {
    // Perhaps we're already in overworld. Certain teleport items cannot be used!

Take a peak at the full source code for the demo project:

Swoosh comes with other useful utilities specifically but not limited to games.

  • function bool doesCollide(a, b)
  • function double angleTo(subject, target)
  • function vector2 direction(target, dest)
  • function void setOrigin(sprite, fx, fy)

See the rest here:

May this be as useful to you as it is meant to be!
« Last Edit: October 29, 2018, 04:50:15 am by foo »


  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: <SWOOSH> Header-only mini library for activities and segues
« Reply #1 on: November 11, 2018, 08:56:08 am »
Update includes more segues you can use directly into your apps with a single include statement.

Activities can support their own views.

namespace swoosh:: now has ActionList and action item types to add even more control and polish to your apps.

Read more here


  • Newbie
  • *
  • Posts: 12
    • View Profile
Update v1.2
« Reply #2 on: March 17, 2019, 11:31:54 pm »
v1.2 is released

Includes new segues (over 25 segue effects), custom sf::View support per each activity, custom background color for each activity, and lots of other tweaks.

Most importantly, this update has separated the shader effects used in segues into their own header: Shaders.h

Now you can use the following shaders in your SFML projects and apply them directly to sprites. No need to write your own GLSL code!

1. FastGausianBlur --> blur effect you can raise intensity + grain depth
2. Checkerboard    --> remove parts of sprite block by block. Increase kernel size for a dissolve effect.
3. CircleMask          --> Cut off everything outside of the circle you can define the amount
4. RetroBlit             --> Remove colors layer by layer for a retro effect
5. CrossZoom         --> Makes your sprite glow and pop out of the screen
6. Morph                 --> Morph your sprite from one to the other
7. PageTurn            --> Make your sprite turn fold like it's turning a page
8. Pixelate              --> pixelate your sprite
9. RadialCCW         --> cut off sprite with a radial effect. useful for visuals like health.