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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Zinlibs

Pages: [1]
1
SFML projects / 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) :  ;D

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.  ;D

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...  :P

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...  :-X) !

2
SFML projects / Heralds of Alaegis (dota 2d multiplayers)
« on: December 31, 2011, 07:27:34 pm »
Hello everybody !

Let me introduce myself; my name is Pierre-Emmanuel, I am 24 years old, and I'm a C++ programer since 4 years. Sorry if my english is not so good than yours, but this is not my natal langage. I first create a framework to easy develop games and graphical softwares, and then I wrote It again and again to reach a satisfying quality.

I'm currently working on a multiplayer game project in the style of Defense of the Ancients in 2D, style which fascinate me since I played for the first time to the game League of Legends (really great free-to-play game, by the way :wink: ). Obviously, due to the 2D's constraints on this type of game, this is not an easy job at all ! :D
I think I can handle alone the code (braving a lot of dangers :lol: ). On the other side, there is yet no characters, the graphics are catched from pictures on the web (oops ! :oops: ), there is no ambiant sounds, no musics, the scenario could stand on a sticky note, the gameplay is hesitant. In short, I really need some skilled peoples fascinated by the heroic fantasy things, who easy understand the Dota game mechanisms, to help me to create an original and great game environnement !

There is a sum of the current state of the game :

Scenario ->

The world of Alaegis such it was know, full of quiet and wonders, has vanished since a long time ago. Some darks plans, planified by powerfull and malicious peoples, have been applied to perturb a millenary peace between two races which have a common origin. On a side, the Amhrani peoples, skilled and agile wooden elves, masters of the living things and elements, and on the other side, the Sangrins, ingenious and powerfull urban elves, masters of the metal and Science. The war began here and there, and made many ravages, each side refering the blame on the other one. But in the horror of war, was born some incredibles warriors, with an heroic bravery, risking their life to defend the values they believed. Those ones were named gardian of the blessed Temple of their race, the World Tree of Tahemniel for the Amrahni, and the Omnipotent Castle of Forge-Town for the Sangrins. The loss of this symbol for one of the both side, would signify the inconditional victory of the other side, such the moral strength of each people in this world is linked to It.

Progression of the code ->

- Fights sytem operational
- Graphical interface almost operational but Its aspect is not definitive
- Lights handling and graphisms operational
- Physical handling in progress
- Animations handling in progress
- Sounds handling in progress
- Network handling in progress
- Playable characters : 1 (6 planned in total, 3 each side)
- Actual Buildings : Nexus, Tower (soon Spawn and Inhibitor)
- Actual Mobs : Minions (soon Super-Minions and neutral monsters (in underworld !))

Screenshots -> From the oldest to the most recent :

 

Of course, I also really need some fresh good ideas, because I'm starting from almost nothing, and every are good to take. The game's code and the framework's code are free and will be soon released, when they will be more advanced. I'll update regularly this post to report the most recent new features and show you the current state of the game.

Thank you for reading and happy new year ! =)

3
SFML projects / Zeven
« on: November 30, 2010, 05:53:33 pm »
Hello everyone,

After several months of development (and several episodes), I announce the release of the open-source library Zeven.
I'm Thiziri, main coder of the project, and I must thank Danman (a Zinlibs team member) for his help throughout this work, without nothing would have been possible. Thank you buddy.
My thanks also to Lolo (great programmer 8)) for the advice and SFML, who seems well on the way to dethrone SDL in the months to come. :D
Please, forgive me if I don't write english very good, this is not my native langage (I'm french). :oops:

- But in fact, what is Zeven ? :?:

Well, Zeven is an extensible library (based on sigc++), which allow the use of behaviors, triggers and listeners to organize the way events are managed and set some actions in return.

- But, in a simply way ? :oops:

Basically this allows you to assign a behavior to an object, for example, that certain actions are automatically launched when the behavior or a part of the behavior is satisfied.

- Zeven, Why ? :?:

Zeven was born because we needed (the team responsible for the Zinlibs API) to process the events returned by any windowing API / GUI, in a simply way, ergonomic, programmable and modern. In addition, Zeven is modular, allowing you to use modules for each situation. The module allows for example SFML to treat sf::Events, and has many dedicated Auditors and Triggers thoose make your life easier. In addition, Zeven is a contraction of the words Zinlibs and Events.

- What are Listeners and Triggers ? :shock:

Listeners are the smallest elements of Zeven. They are responsible for listening to the event which they are sensitive and initiate action previously defined if they "hear" this particulary event.
Triggers are larger items, they are composed of two or more listeners to manage complex networks (the programmable side of Zeven).
Note that the behavior can manage a complex network (of triggers) too.

- How does the return-actions system work ? :roll:

We think the signals and slots are a necessary evolution in Zeven, so we chose the library sigc++, which is very easy to use, to assign functions (or methods) to each behavior.

- A little piece of code to have an idea of how operate Zeven ? :twisted:

A tutorial is being written on the wiki SFML, and the sample provided on the SVN repository (GIT soon) allow you to better understand the mechanisms, but here for you (beloved community) an overview of what you can do with Zeven (and especially its sfZeven module) :
Code: [Select]

// Creation of the event handler :
   zin::sfEventHandler& EventHandler = zin::sfEventHandler::GetInstance();

// Creation of a behavior :
zin::Behavior behavior;

// Creation of some pre-programmed triggers :
zin::sfDoubleClickTrigger trigger1;
zin::sfDragAndDropTrigger trigger2;

// Creation of a custom trigger :
zin::sfTrigger trigger3;

// Creation of some listeners :
zin::sfTextEnteredListener listener1(sf::Key::Code::Space);
zin::sfTimeReachedListener listener2(3.54);

// Connection of the listener to the trigger's input :
trigger3.SetInput(listener1);

// Connection of the listener to the triggers's output :
trigger3.SetOutput(listener2);

// Connection of the both listeners each-other (to form a gateway) :
listener1.ConnectTo(listener2); // Note that you can connect as listener as you want !

// Connection of a function to one of the listeners :
listener2.ConnectTo(sigc::ptr_fun(&HelloWorld));

// Creation an area of action :
sf::FloatRect(20, 20, 80, 80) area;

// Settings of the action's area of the triggers :
trigger1.SetArea(area);
trigger2.SetArea(area);

// Connection of the behavior to a trigger :
behavior.ConnectTo(trigger1);

// Connection between the both (to create a chronology) :
trigger1.ConnectTo(trigger2);

// Connection of a function to a pre-programmed trigger :
trigger2.OnRelease(sigc::hide(sigc::ptr_fun(&ExitProgram));

// Register of the triggers by the event handler :
EventHandler.Register(trigger1);
EventHandler.Register(trigger2);
EventHandler.Register(trigger3);

// Creation of a carry event :
sf::Event event;

while( App.GetEvent(event) )
{
// Add an SFML event in the event handler :
EventHandler.Recept(event);

...
}

// Update of the behavior :
behavior.Update(events);


- The final word? :idea:

What is the worst first name that you know in English? (in french, certainly Gertrude) !
No, seriously, your feedbacks are very welcome (if you have), suggestions, ideas for improvement, and issue various modules (in example if you have problems to compile with cmake); I will answer you with pleasure (and Danman).
I hope you will enjoy Zeven; and wish you good luck for all your projects !

Pages: [1]