Original Post
which one of these paradigms is better to follow in gamedev? or maybe both in combination?
which one of these paradigms is better to follow in gamedev? or maybe both in combination?
Now my last sentence sounds all OO right? ... and it is ... but I got to that design from a data first process, that ENDS in OO, but doesn't start there.
[quote name='Xai' timestamp='1353464961' post='5002832']There is a distinction to be made between "Data Oriented" and "Data Driven"; I think your post describes the latter, which is basically a facet of good OOD.[/quote]A better description of DOD than the one I gave earlier might be "think about the data first, then the code later".
Now my last sentence sounds all OO right? ... and it is ... but I got to that design from a data first process, that ENDS in OO, but doesn't start there.
struct ShaderPack : NonCopyable, NoCreate
{
int FindTechniqueByIndex( const char* name ) const;
int GetTechniqueBlah( int index ) const;
};But long before I wrote that interface and what methods it could have, I first sat down and designed a bunch of classes with no methods and just data. There's also other classes that can consume this data besides the above interface.
template<class T> struct ArrayOffset { s32 offset; /*operators to act like a T[] */ };
struct StringOffset { s32 offset; /*operators to act like a char* */ };
struct Technique
{
u32 blah ... ;
};
struct ShaderPackBlob
{
u32 numTechniques;
ArrayOffset<Technique> techniques;
ArrayOffset<StringOffset> techniqueNames;
};
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more