Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Mar 29, 2024 1:04 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Sep 05, 2008 6:19 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I open this thread cause I have received some critics about the usage of the ODE functions for creating and managing "things" with ODE.

By one side they don't like the name system. It's not well checked, the raydium_ode_name_auto function is a bit simple and also they ask for an internat list of ode names, to avoid repeat them.
For example a unique big list or varios list grouped by kind of "thing" (one for objects, one for elements...). If a name is reused, then it should return a fail.

Also they appoint for a new way for using ODE functions, but I think is better if they explain it by themselves (i'm just making an introduction).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 6:33 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
This auto naming fuction fix only problem with overwriting datas with same name, but from dev. point of view, developer need create clean data structure and not have a lot of unique object and element names.

actual function status:


Code:
int A=raydium_ode_object_create("OBJECT1");
raydium_ode_motor_create ("XYZ1", A, ... );
raydium_ode_motor_power_max_name("XYZ1",11);
int B=raydium_ode_object_create("OBJECT2");
raydium_ode_motor_create ("XYZ2", B, ... );
raydium_ode_motor_power_max_name("XYZ2",11);


=> all ODE names must have UNIQUE names

from my point of view this is more usefuly


Code:
int A=raydium_ode_object_create("OBJECT1");
raydium_ode_motor_create ("XYZ", A, ... )
raydium_ode_motor_power_max_name("XYZ",A,11)

int B=raydium_ode_object_create("OBJECT2");
raydium_ode_motor_create ("XYZ", B, ... )
raydium_ode_motor_power_max_name("XYZ",B,11)
...


=> this is good for object oriented scene data


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 7:29 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
... this is good for object oriented scene, something that Raydium does not aim at all :)

I can easily understand that it's quiet disturbing to have to generate a separate name for elements of another instance of an object, but Raydium does not follow any "object paradigm rule". An element is a unique thing, with a unique name, owned by a uniquely named object. This object itself is not a big variable containing other things, like it's used to in usual object oriented development, it's "only" a bounding box for some elements of the scene.

In other words, I like to be able to do this like ...
id=raydium_ode_element_find("ball");
... and not ...
id=raydium_ode_element_find("football_game.ball");

But (there's a "but"), this way to go allows you to create your entity names absolutely like you want, even in an object oriented manner if you want ...
Just to show you, using your previous example :

Code:
int A=raydium_ode_object_create("OBJECT1");
raydium_ode_motor_create ("OBJECT1.XYZ", A, ... )
raydium_ode_motor_power_max_name("OBJECT1.XYZ",A,11)

int B=raydium_ode_object_create("OBJECT2");
raydium_ode_motor_create ("OBJECT2.XYZ", B, ... )
raydium_ode_motor_power_max_name("OBJECT2.XYZ",B,11)


You can even create a very simple wrapper for raydium_ode_motor_create() that adds object name to element name by itself.

See ? RayODE names are just some sort of "absolute path" to an entity, in a namespace (object, element, joint, motor, ...) ... Nothing else :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group