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

Author Topic: [ODFAEG] (Open Source Development Framework Adapted for Every Game)  (Read 139654 times)

0 Members and 1 Guest are viewing this topic.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #180 on: March 30, 2014, 01:53:19 pm »
Re, I have add a filter in the class facegroup, It should be nice if I can filter faces by material, color, primitive type used or a combination of those three criteria, but I hope that'll not slow the performances, I have to filter the entities faces before creating the vbos.

But I'll only create vbo on the init function of my fastRenderComponentClass so I just hope it'll not be to long for init the scene.

And them I've just to save vertex adress position of the first vertex face to update vbo. (by passing faces of visible entities with are in the camera)

I have still to test but the idea seems to be good.


Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #181 on: March 30, 2014, 02:34:48 pm »
I still think you have no idea what a PBO is :p

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #182 on: March 31, 2014, 05:16:21 pm »
I've  a question, can I draw the vertices of a IBO if I pass not all the vertices indices, but only the indices of vertices which are in the view ?

By exemple if I pass this array : (0, 1, 2, 3,  8,  9, 10, 11) at getDrawElements.  (If the vbo contains 3 quads but I only want to draw 2 of them.


lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #183 on: March 31, 2014, 05:18:18 pm »
You can. But, it is easier to just draw one quad multiple times rather than change and index buffer.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #184 on: March 31, 2014, 05:47:23 pm »
Ok. :)

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
New update in the evening.
« Reply #185 on: April 01, 2014, 04:29:42 pm »
I've nearby finished the component based system, this is a preparation for the next update which'll introduce VBO.

I've just a problem of a position with the different view to correct and them... (The tiles position is not the same in the rendertexture and in the window, but they have the same view...)
It's quite annoying to do because the view can be in any sense. (it's not a lookat matrix but translation and rotations because I need a view adapted for every kind of games, so I need to calculate the good angles and translations vectors depending on the different cameras type parameters. (2D rotation, 3D rotation, up vector, free fly camera's angles, zoom, lookat vector, etc...)

The class tilemap'll disappear, It'll be a class FastRenderingComponentManager class which'll be used instead, this class'll be able to draw ODFAEG's components or simple drawable objects. (This class isn't drawable, it'll contains some rendering informations like the current frame buffer render texture, the depth buffer render texture, ..., to draw components whith the best optimized opengl functions supported by your hardware, this is an equivalent to sf::RenderTarget but that I've improved)

A new class'll be added : FastRenderComponent : this class'll be able to pre-load entities or drawable objects and to render them on the screen later.

This class'll also sort entities vertices, before drawing them on the window or on the frame buffer render texture and then on the window of the FastRenderComponentManager class. (It depends which opengl functions your pc'll support.

The EntityManager class'll load or update all visible entities on FastRenderComponents, and then'll return RenderComponent containing the entities which are visible on the screen, and then you can draw with a fastRenderComponentManager object.

And that's it!

This is a major design improvement that I've done, and it'll allow me to choose the way which I want to render things on component. (By example if I want to render lights on a 2D component before drawing them of if I ant to use a shader)

By example, it'll be possible to draw sphere's on a 2D component and them to draw this component over the  screen. instead of using a shader.













Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #186 on: April 01, 2014, 09:47:36 pm »
Sorry but I've a problem with the git-hub files so, I'll post this update later, anyway, I've still some displaying bugs to wipe out.

And I'll add the update with vbo directly, so, the core of the engine'll be finished, the rest'll be the adding of new functionnalities. (3D terrain generation, 3D files loaders, new shapes, 2D guis, lighting, database connexion, etc...)

therocode

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • Development blog
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #187 on: April 02, 2014, 08:27:25 pm »
Hi!

I have a crash in my code from my cool physics library that I am trying to make. The code is:

int* finaNummer = new int[50];

for(int i = 4; i < 100; i += 2)
{
    if(finaNummer[i] == 4)
        finaNummer[i] += 10;
}

Why does it crash?! I tried to google but there was nothing there.

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #188 on: April 02, 2014, 09:34:10 pm »
I know this thread is weird, but WTF is this doing here?
« Last Edit: April 03, 2014, 12:02:37 am by G. »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #189 on: April 02, 2014, 10:00:09 pm »
I've found thoss positionnement problems, I had just had to put some - in the projection matrix.

So I just do a scale of 1, -1, 1 for the viewmatrix and I've an yaxis with point at the bottom like SFML. :)

I'll repair the git-hub repository tomorrow evening, tommorow morning I've something to do, and I've still to implement vbo on my component based design.

After this update with vbo and components, I'll test the network module on a remote machine, and then, the version II of the framework'll be finished!

So the second version is nearby finished.

The version III (which'll be the final version)'ll include a particule system and a 3D terrian generation.

therocode I think you have miss posted.



zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #190 on: April 03, 2014, 03:20:33 am »
Quote
therocode I think you have miss posted.

I think he seriously wants you to answer his question, he obviously can see how great of a coder you are. So maybe you should respond and answer his question  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #191 on: April 03, 2014, 05:33:36 am »
lol this is one ambitious project. :P
I have many ideas but need the help of others to find way to make use of them.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Design improvement and new update this evening!
« Reply #192 on: April 03, 2014, 07:24:12 pm »
Hi everyone. :)

I've reviewed the design as I said :

Textures'll not be contained in the class Entity anymore but in a class called Material, a material is a set of textures (int this case it'll do multi texturing), and'll also contains some informations about the colors.

A class called face'll contains the material and the vertex array of a single textured face. (A face'll always have one material so)

And the class entity'll contains a new attribute : a std::vector of faces!

A class facegroup'll be able to regroup all vertex using the same material and the same primitive type. (It'll be used in the render component class to render and sort vertices in the most optimizaed way depending on your hardware support.

And the class entity manager'll be able to draw each desired entities into a RenderComponent.

PS : RenderComponents'll be like billboards, but for every kind of entities and not only for particules.

« Last Edit: April 03, 2014, 07:29:29 pm by Lolilolight »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #193 on: April 03, 2014, 09:40:02 pm »
I've update the git-hub but I've still to correct some bugs... :

-The view size isn't good when I draw components with the RenderComponentManager class.
-I'll pre-transform vertices in the face class and update only their transform when it's necessary, the functions onMove, onScale and onRotate of the entity class'll call the update method of the class face when the transformation of the entity has changed. :)
-I've to update the z position correctly for animated entity, depending on the entities behind and before the current animated entity taht I insert in the vector of visible entities.
And I have to use a vbo in the FastRenderComponent class.

But I'm pretty proud of my design review, he's very must simplier and proper and fast. :)

When all the bugs'll be corrected I'll do some networking test and the second version'll be finished, in the last version I have just to fill the odfaeg/Graphics/3D folder and add some collision classes and a particule system to the physic module.

For the lighting in 3D a I still don't know about which technique I'll use, there are so many of them..., I've to have a look to all those technique and choose one.






Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #194 on: April 03, 2014, 09:50:57 pm »
* Jesper Juhl wonders if this thread will ever end.

Ship some example game already that shows how great this framework is. Or stop talking. This is getting silly.

From what I have seen so far, I stand by my earlier comment that a framework for every type of game is just not feasible. And even if it was, this one is not it - lack of RAII, lack of OpenGL understanding, just generally messy code, a developer who is "full of himself/overstating own abilities", lack of use of modern C++11, etc etc..
OK. Maybe I'm being an ass, but this thread needs to die, as humorous as it is, (IMHO).
« Last Edit: April 03, 2014, 09:59:50 pm by Jesper Juhl »

 

anything