a good engine for game

Started by
7 comments, last by saian 22 years ago
hello, i want to make a good engine for making games. So i wonder how to get a good work. First, i use C++ and OpenGL. At the begining i put some classes and get a method in it for rendering. But, it''s not the best manner i know. So i decided to do other way. Then, i thought about making a tree in order to arrange all the data needed for a renderer. So, the tree starts with a root and get branches with textures/materials and then leaves on these branches for the vertices, normals... Is that a good way ? There are better ways i know, but which ones ? Now, if i keep my tree. How to move efficiently in it ? i mean here how to change correctly of texture/materials without losing a lot of performances ? because if there are many branch that have leaves that get only few datas. This will be too huge and heavy for having a good renderer ? Then, does a good engine deform the reality of what it loads for getting more performance ? Thank you for all replies.
Educate the masses ! it's one behavior !
Advertisement
tree??? sounds like you are confused a little about usage of trees..

well, here is my way, in fact the way I began;

make a class say XNode. this will be your scene node as well. have a class called XMesh for your mesh geometry, XShader for texturing, XMaterial for material. store ONLY information about rendering and the data in these classes. Get a pointer from each and make them a member of XNode (HAS-A relationship).. Store your current position, bounding box also in XNode. Then make a XRenderer class which has a function like Render(XNode* pNode)

Then, put your XNode''s in a tree-like structure, to traverse, apply culling and collision detection easier..

hope that helps..

-----------
my quote is under construction
-----------my quote is under construction
thanx

you mean tree-like ?
so, if i make a tree, there will be some nodes (each intersection between a branch and another, a branch and a leaf).
So, i think my point of view is like yours.

For me, anything who''s got parent, childhood and brothers is a tree.

So, if you could explain a bit about my confusion of trees and ? , i will appreciate a lot.

cordially,

saian
Educate the masses ! it's one behavior !
instead of trees you can use graphs. DAG (Directed Asyclic Graph) in fact. the difference between trees and graphs is that graph nodes can have more than one parent...

But we are talking about different things I guess. You were talking about one single object to be a tree. leafs were texture, material, etc.. I don''t think it is a good idea. Tree (or graph) is a data structure. You store "same" type of data in a tree, but you mix them, and mix them for a single object.

Briefly, I proposed you to make a data structure for representing each entity in your game (a class named XNode perhaps).. and store all of your XNode''s in a tree..

hope that clears the confusion..

-----------
my quote is under construction
-----------my quote is under construction
If you want to make a game and you aren''t an expert 3D graphics programmer, then your best choice is to use someone elses engine. I don''t understand why so many people here are hell bent on making a new 3D engine. 3D engine is not a game.
I think they do it for the learning experience.
Perhaps we ENJOY it...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
and I always thought the only way to ENJOY programming is to make games, everything else is tedius, boring, technical crap that people should only tolerate doing if it pays a lot of money
first, using an engine from another doesn''t give this experience.
i''d like to work a day in the game industry. So, i think it''s a good idea to make an engine. knowing...

mentat, sorry i''ve been not understandable.
i want to make a tree like that:
first the root of the tree, then branches on it which will be textures and/or materials, then only one leaf on each branch which gets datas (vetices, normals...).
now, i don''t understand your DAG as it has more than one parent. what is the utility ? a parent for texture, and another for material ? if it''s this case, i understand. Otherwise, i need again more explanation (don''t feel me bad!).

then, i can tell that:
making an engine: using lists, trees, Xnodes, or DAGs.
is that all ? all are speed enough i think. But which one is the best ? more speed ? minus seek latency time...

bersek, i''m not a 3D expert programmer. But i know well C++, and less OpenGL, then less more in 3D programmation. But everything has a logical behavior. So i can understand now that having classes which do everything is not the best manner. otherwise separating each things is better. But i have to find my way.

thankx anybody

Educate the masses ! it''s one behavior.
Educate the masses ! it's one behavior !

This topic is closed to new replies.

Advertisement