SFML community forums

General => SFML projects => Topic started by: foo on October 28, 2018, 09:22:53 pm

Title: <SWOOSH> Header-only mini library for activities and segues
Post by: foo on October 28, 2018, 09:22:53 pm
Updated 10/12/2020 to reflect latest 1.2.4 API

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 (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 (https://streamable.com/qb023).

(https://media.giphy.com/media/2jsQgGNqmHU3HB3tZN/giphy.gif)

The example project comes with 20+ 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;
controller.push<MainMenuScene>();

...

// User selects settings
using types::segue;
controller.push<segue<SlideInLeft>::to<AppSettingsScene>>();
 

Popping is the same way.

controller.pop();
controller.pop<segue<SlideIn>>();
 

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.rewind<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:
Source Code (https://github.com/TheMaverickProgrammer/Swoosh/tree/master/ExampleDemo)



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


See the rest here:
https://github.com/TheMaverickProgrammer/Swoosh/wiki/Namespaces (https://github.com/TheMaverickProgrammer/Swoosh/wiki/Namespaces)



May this be as useful to you as it is meant to be!
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: foo 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 (https://github.com/TheMaverickProgrammer/Swoosh)
Title: Update v1.2
Post by: foo 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 (https://github.com/TheMaverickProgrammer/Swoosh/wiki/Namespaces#using-namespace-swooshglsl)

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.
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: foo on July 29, 2020, 08:27:16 pm
I am making a web series on youtube using SFML + Swoosh lib to make a game from scratch! Please help vote here (https://twitter.com/swooshlib/status/1288538031243309058) for the game genre YOU would like to see recreated.  ;)
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: foo on August 19, 2020, 01:26:10 am
The poll was close at a neck-and-neck tie with RPG and RTS Action game and RPG finally won! See the final poll: here (https://twitter.com/swooshlib/status/1288538031243309058)

I will be making a youtube mini series on writing a polished and flashy RPG game with SFML + Swoosh. I'll post whenever the video series is ready.

In the meantime, follow SwooshLib on twitter here  (https://twitter.com/swooshlib)for sooner updates and early sneak peaks!
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: foo on October 11, 2020, 06:33:55 am
Major updates in v1.2.4 just released today
Some API changes are made to support better mobile and low-end GPU hardware support. See the readme (https://github.com/TheMaverickProgrammer/Swoosh/blob/master/README.md).

Added new "Dream" (https://twitter.com/swooshlib/status/1315143680903254017) transition effect to the supplied src/segue/ folder in the project. Add it to your project by adding
#include <Swoosh/Segues/Dream.h>
.

Plug-n-play baby!  ;D

https://streamable.com/cw5pev
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: PWGuy on December 25, 2020, 12:06:51 am
I have been working on a NES Zelda 1 re-make for awhile now (lots of breaks since we had another child!).  And this is probably perfect for me!  Not sure when I’ll get to the point of using it since I focused on intro / player name entry first but I’ll try to implement in my proof of concept soon!
Title: Re: <SWOOSH> Header-only mini library for activities and segues
Post by: foo on January 02, 2021, 07:45:56 pm
I have been working on a NES Zelda 1 re-make for awhile now (lots of breaks since we had another child!).  And this is probably perfect for me!  Not sure when I’ll get to the point of using it since I focused on intro / player name entry first but I’ll try to implement in my proof of concept soon!

Congrats with the newborn! Yes, swoosh is capable of doing the camera panning effect (if each area is its own level/scene).

I've been meaning to put together a Zelda clone/example for swoosh for a while now to demonstrate some of the "best practices" when using the library- but 2020 was crazy!

Best wishes