### Author Topic: Zoost & Zoom : Geometry, animations and graphics  (Read 8858 times)

0 Members and 1 Guest are viewing this topic.

#### Zinlibs

• Full Member
• Posts: 127
##### Zoost & Zoom : Geometry, animations and graphics
« on: May 24, 2012, 02:58:22 pm »
Hello people !

Today I present to you both libraries those I'm working for several times and I'm proud to share to the community. My philosophy is to totally make the difference between the geometric aspect to the graphical rendering one, or any potential other use (such a physic engine, that I'm programming according to the fisrt lib, by the way) :

The first one is called Zoost and allows you to create some geometric objects as simply it can be, and to give them the abbility to interact each other (totally appart from the SFML).
From segments to triangles, without forgetting curves (including Bezier ones) and concav polygons, you just are spoiled for choice (and I will add others soon).
You can of course create your own customized geometries according to a low and high level system at the same time.

The second one is Zoom (based on SFML 2.0 RC) which focus on the animation aspect and the graphical one, allowing you to use a geometry from Zoost and to animate it in the way you want. But it's not all the things, because you will be able to render and display the geometries and totally custom the rendering (size of each points, segment's color, filling of the shapes, etc...). Finally, the libs includes an engine of light rendering, based on the great Gregouar's work, all cleaned for the occasion. In a not so far away future, I will add the handling of the just new way to render the 2.5D shadows (by the same author) ! I'm very impatient for that...

Example of creation of a concav polygon and its rendering :

Code: [Select]
`Geom geom = Geom::polygon({{0, 0}, {25, 100}, {40, 100}, {40, 0}, {100, 0}, {100, 100}, {120, 100}, {120, 0}, {180, 0}, {180, 100}, {200, 100}, {200, 0}, {260, 0}, {260, 100}, {275, 100}, {300, 0}, {300, 120}, {240, 120}, {240, 20}, {220, 20}, {220, 120}, {160, 120}, {160, 20}, {140, 20}, {140, 120}, {80, 120}, {80, 20}, {60, 20}, {60, 120}, {0, 120}});geom.setPosition(130, 200);geom.scale(1.5, 1.5);Shape shape(geom);shape.setFaceColor(Color::SpringGreen);shape.setLiaisonColor(Color::DarkGreen);shape.setLiaisonWidth(3);target.draw(shape);`
Example of animation of an object with a curve and a kinetic :

Code: [Select]
`Curve curve = Curve::bezier({767, 410, 1000, 900, 1000, 30, 500, 30, 1, 30, 50, 560, 169, 410}) + Curve({169, 410, 228, 321, 386, 571, 553, 261, 421, 218, 575, 464, 767, 410});curve.setOrigin(500, 370);Kinetic kinetic(curve, 400, 0, true); // 400 is the speed of the curse over the curve each, 0 means that it is starting at the begining (always inferior or equal to 1) and true that the kinetic is looping on itself.// Main loop :Vector2d coords = curve.convertToGlobal(kinetic.update(clock.restart())); // New point of curve tracking.myShape.setPosition(coords); `
That's it ! Both libraries are not fully complete, but bringed to be quickly improved (because I need them in my future projects). I'll tell you up to date and I'll answer here for all your questions and suggestions !

https://github.com/Zinlibs/Zoost
https://github.com/Zinlibs/Zoom

Thank you (and sorry for my poor english, I'm French, you know...  ) !
« Last Edit: June 10, 2012, 12:22:42 am by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Nexus

• SFML Team
• Hero Member
• Posts: 6194
• Thor Developer
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #1 on: May 26, 2012, 09:51:38 am »
Looks interesting, but unfortunately it works only on g++. You use C++11 initializer lists which are not supported by Visual Studio, and also the compiler flags -Wfatal-errors -std=c++0x are specific to g++.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #2 on: May 27, 2012, 05:18:08 pm »
Quote
Looks interesting, but unfortunately it works only on g++. You use C++11 initializer lists which are not supported by Visual Studio, and also the compiler flags -Wfatal-errors -std=c++0x are specific to g++.

Thank you Nexus for your interest. Ofc, I will add a condition in the cmakelists to support VS flags.
But what about the last release of VS and the C++11 integration ?
« Last Edit: May 27, 2012, 05:24:23 pm by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### eXpl0it3r

• SFML Team
• Hero Member
• Posts: 9300
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #3 on: May 28, 2012, 12:13:21 am »
But what about the last release of VS and the C++11 integration ?

VS11 is only in release candidate state and it's not sure if Microsoft will make the free version support only metro style apps programming (unfortunatly)...
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #4 on: May 28, 2012, 01:24:53 am »
Big update, with many bugs corrected and a new feature : Shapes are now automatically updated when their geometries are modified. I.e. a color property is created in the Shape when a vertex is added to the Geom, and removed from the Geom when erased from the Geom. Default properties are used at creation, but you can easily custom each one at any moment. That allows to you to create very custom shapes and maintains them up-to-date according to the matching Geom.
« Last Edit: May 28, 2012, 01:41:07 am by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Nexus

• SFML Team
• Hero Member
• Posts: 6194
• Thor Developer
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #5 on: May 28, 2012, 10:02:06 am »
But what about the last release of VS and the C++11 integration ?
Several C++11 features are already supported, but initializer lists aren't. And as far as I know, the next version won't support them either.

Here is a complete list of Visual Studio's C++11 support, and here an overview over all compilers.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #6 on: June 09, 2012, 08:26:35 pm »
Hey,

Zoost :

- onTransformUpdated method added to the Geom::Observer class

Zoom :

- sf::VertexArray are now the only drawables used for the rendering
- The rendering is now saved, that implies it is not created again each time the Draw function is called
- Simplification and improvement of the examples

Zoom is now faster according to the Vertex Arrays exclusive use and the rendering updated only when necessary.
The big next update will be the sf::Transform use in the Draw method to only draw from the locals coordinates. That should highly increase the performances.
Edit : Done !

I don't talk as much about the light engine, because it remains a very annoying bug (when the light is rotated in fact) and I couldn't find the solution up to now.
« Last Edit: June 10, 2012, 02:07:51 pm by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #7 on: July 07, 2012, 06:14:55 pm »
Hello,

I've a good new : I've just finished to include the 2.5D Gregouar's light engine in Zoom ! Of course, this is just a first try, and I will do my possible to simplify that (the main is too much complicated) with a new class (like my LightEngine class) and maintain everything synchronized with the Gregouar's job.

See ya for new infos !

Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### aNewHobby

• Jr. Member
• Posts: 85
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #8 on: July 11, 2012, 04:18:11 pm »
had a look at this last night but was unable to get it to compile with cmake in windows
My Own Little Spot on the Net: - Live4everOrDieTrying.info (Blog)

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #9 on: July 11, 2012, 08:21:38 pm »
I will answer to your MP here, that's better for everyone. In fact, you are trying to compile with nmake, the Visual Studio's compiler, that unfortunately doesn't support the flags used in the CMakelists. Even if you remove them, and Nexus said it before, VS don't support the std::initializer_list of C++11. So, the only solution for now is to compile Zoost & Zoom using the GCC compiler.
« Last Edit: July 11, 2012, 08:26:12 pm by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Ockonal

• Jr. Member
• Posts: 58
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #10 on: July 12, 2012, 09:50:37 pm »
Great job I like the new 2.5d lighting example.
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #11 on: July 13, 2012, 12:57:41 am »
Thanks ! You can thank Gregouar for the code, I just adapted it to make it compatible with Zoom.
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Ockonal

• Jr. Member
• Posts: 58
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #12 on: August 03, 2012, 05:54:15 pm »
Just wanted to ask, maybe you can write ability to use texture for strokes?
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

#### Zinlibs

• Full Member
• Posts: 127
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #13 on: August 05, 2012, 09:13:48 pm »
Yes, It is planned.
« Last Edit: August 05, 2012, 09:38:22 pm by Zinlibs »
Zoost & Zoom libraries : An easy way to create and handle geometric objets, animate and use them for better graphics !

#### Ockonal

• Jr. Member
• Posts: 58
##### Re: Zoost & Zoom : Geometry, animations and graphics
« Reply #14 on: August 05, 2012, 11:34:21 pm »
Oh, it's great. For now, you don't know the exact time of this feature?
There is already written library called `Stroke` in wiki. It's a bit old and author stopped it's developing, but you can look at realization.

Thanks
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

anything