Object Dependancies

Feb 5, 2009 at 2:30 PM
What would you say the best way to update a hierachy of objects in Ox is?

As far as I can tell, the update components function updates them in undefined order unless the updateInOrder flag is set.

So in order to update a hierachy I presume I'll need to set the update order value of the child objects to higher than the parent one or is there something I'm missing?

cheers,
Iain
Coordinator
Feb 5, 2009 at 9:09 PM
Hi!

This is something about which I've not given a great deal of thought. I am considering making updates on components hierarchically recursive. For now, your only option is to use the order semantics as you described. Seems kind of ugly, but it's what the system expects as of right now :/ I'm going to give this more thought in the future, though.

Thanks for your question!
Coordinator
Feb 6, 2009 at 4:54 AM
 I've given the subject a good bit of thought and realized the need to updates to be recursive. I am going to introduce the concept of a "component graph" in the next release. It's like a scene graph, but generalized down to the component level. This will address a lot of little problems that have been poking through my system from time to time :)

Thanks for the inspiration Nutter2000!
Feb 6, 2009 at 7:46 PM
Edited Feb 6, 2009 at 7:47 PM
Thanks for getting back to me so quickly Bryan.

A dependency graph basically? That was my other thought rather than setting the update order.
Glad to know I wasn't missing anything :-)

Glad I helped inspire you too :-)
I do like what you've done with Ox, I had started writing my own XNA engine but it's probably about a year behind yours.
When I tried Ox out I was very pleased with it being pretty up to date and stable, most other engines out there seem to use designs that went out with the 90s!
So now I'm currently looking at using it in my game instead of using my own.
It should save me huge amounts of time, so thanks for that and keep up the good work! :-)

cheers,
Iain
Coordinator
Feb 6, 2009 at 8:37 PM
Edited Feb 6, 2009 at 8:38 PM
Awesome!

Glad to hear you're considering leveraging Ox instead of starting from scratch. Writing an engine AND a game is just an incredible task. I've had lots of chances to start writing a game with Ox, but I knew that would kill Ox's progress.

I'm particularly proud of Ox's design. Getting Ox's design right took hundreds of hours of rethinking and refactoring. Worth every minute of sweat though, IMO!

Let me know if you have any problems / questions and good luck!

EDIT: Oh, and yeah, basically a dependency graph with optional update ordering among peers :)
Feb 8, 2009 at 5:15 PM
Oh I well know, I've done both a few times 
I'm certainly glad to hear you're planning on concentrating on the game engine! :-)

Yeah I do like the design, it does show a great deal of thought behind it.
Cheers, I'll let you know if I have any problems or questions.

That sounds like a good hybrid-dependency graph :)