29-12-2007, 05:03 PM
I've been toying with the idea of making some of the User Defined Types into class collections, much the same as the collection of sockets created in the IOCP tutorial.
In theory it would address some of the problems associated with resizing arrays when MAX values are reached and reduce if not eliminate wasted loops when checking against all elements of an array.
I'm also thinking that it would help in the creation and tracking of user created items and maybe help with free roaming npcs.
My questions are;
Is this a good way of looking at application creation or should I leave those kinds of ideas for an Object Orientated language when I move on?
and
Is it really worth the effort? - I mean would the benefits I envisage make worthwhile optimizations to a game or make management of items/npcs etc easier?
In theory it would address some of the problems associated with resizing arrays when MAX values are reached and reduce if not eliminate wasted loops when checking against all elements of an array.
I'm also thinking that it would help in the creation and tracking of user created items and maybe help with free roaming npcs.
My questions are;
Is this a good way of looking at application creation or should I leave those kinds of ideas for an Object Orientated language when I move on?
and
Is it really worth the effort? - I mean would the benefits I envisage make worthwhile optimizations to a game or make management of items/npcs etc easier?