conflict of dimensions

Next Container Library —

Developing Rush for Glory game is going to be finished. so I decided to rewrite some parts of the engine recently. this may cause to rewrite the whole source code. at the first step I rewrote the containers library. in this new version I changed structure of containers for decrease usage of templates<> which make code ugly. I used sampler to decrease allocations. also implementing memory allocators is more easy that before and changeable during the code in some cases. finally implementing new memory allocator which uses stack memory to avoid calling malloc function.

Note that some new features are not designed for general purposes. there are many limitations to using them and must be used with care because those features are designed to develop game and most of capabilities are depend on needs of a game engine.

Here are some highlights :

Added math base functions to the library with some fast functions like :

// fast sqrt root using Log Base 2 Approximation With One Extra Babylonian Steps
float sx_sqrt_fast( const float x );

// return sine( x ) from table. maximum absolute error is 0.001f
float sx_sin_fast( const float x );

// return cosine( x ) from table. maximum absolute error is 0.001f
float sx_cos_fast( const float x );

// compute sine and cosine of the angle x in same time. maximum error is 0.001f
void sx_sin_cos_fast( const float IN x, float& OUT s, float& OUT c);

and some useful conventional functions

MemManFixed::SetBuffer(void* buffer);
I can change the memory buffer of the allocator by setting a new buffer. this feature is available only on fixed memory manager. it means that it’s suitable just for arrays and strings.
For example I wanna change/fill an string in an structure. in this example when I set members of structure to the allocator, all string functions can be applied easily.

struct FileInfo {
wchar path[256];
wchar name[64];
wchar type[32];

FileIfo fileInfo;

MemManFixed memTmp;
String strTmp( 0, &memTmp );

// extract file path from file name and copy that to fileInfo.path
memTmp.SetBuffer( &fileInfo.path );
strTmp = fileName;

// extract name of the file and copy that to
memTmp.SetBuffer( & );
strTmp = fileName;

// extract file type and copy that to the fileInfo.type
memTmp.SetBuffer( &fileInfo.type );
strTmp = fileName;

This memory manager use memory stack of function. by the way this feature is available only on fixed memory manager. this means that it’s suitable just for arrays and strings.

In this example I try to collect some nodes from the scene manager. this will happens at each frame more than once, at renderer, AI system & etc. implementing new Array class cause to calling allocation/deallocation. the other solution is declaring static array. the other solution is using memory stack with some limitation but fast and easy memory management.
example :

MemManFixed_inline<MAX_NODE_COUNT> tmpMem;
Array<Node*> nodes( 0, &tmpMem );

// collect nodes from the scene manager
g_engine->m_scene->GetNodesByFrustum( cameraFrustum, nodes );

for ( int i = 0; i < nodes.Count(); ++i )
// ... do something !

Although there are some changes like adding new functions, changing algorithms in the other stuff to increase performance and capabilities, but those still need to be optimized more and more. oh I forgot to say that I put away namespaces in c++. those things are not suitable for game programming and maybe not suitable at all !

Categorised as: Game World


  1. محصل says:

    “oh I forgot to say that I put away namespaces in c++. those things are not suitable for game programming and maybe not suitable at all”

    I don’t really agree with you at all.
    You can arrange subsystems within namespaces gracefully.

  2. sajad says:

    that is depend on programmer’s manner. I was used namespaces in my last engine. after a while I found no two structs/classes with the same name and that’s really not necessary to limit them in the namespaces. namespaces make code lines so long and ugly. I had to hold shift over and over. using namespaces led to hard management because some classes were shared between namespaces and I couldn’t classify every thing in engine.
    anyway as I said that’s just programming style :)

Leave a Reply

Your email address will not be published. Required fields are marked *

cheap mba speech example professional essays ghostwriter site ca pay for best reflective essay on founding fathers help writing world literature book review top critical essay on usa popular creative essay editing site for phd popular biography ghostwriters services for mba top college biography ideas help with business paper best term paper editing sites us buy best admission essay on hacking help me write professional cheap essay on hacking cheap cover letter editor for hire for college content editor service usa custom speech writing websites write me theater studies thesis proposal professional papers ghostwriter website custom application letter ghostwriter services for school cheap cv writing websites us professional critical thinking writer websites ca custom university book review topic top dissertation writer site best case study ghostwriting website usa top article review editing services for university top annotated bibliography ghostwriter services online popular dissertation proposal editor site ca professional biography writer website ca popular cv writing site for phd help with custom creative essay on shakespeare professional cv ghostwriters service understanding eskimo science resume ghostwriting websites ca help me write philosophy dissertation hypothesis best literature review ghostwriters website us order best blog online custom college essay ghostwriting website for masters popular university essay ghostwriters for hire au order human resource management argumentative essay a sorrowful woman top thesis proposal writers services online do my english as second language dissertation abstract eli and clare pay to do dissertation results online plunkitt of tammany hall summary popular resume editing sites for masters cheap blog post writers service ca university essay on political science help with my family and consumer science dissertation proposal popular rhetorical analysis essay writing websites for phd help me write english as second language essays custom mba essay ghostwriter sites uk cheap scholarship essay editor website for college reflective essay writer sites gb esl dissertation writing site for masters best term paper proofreading website usa persuasive essay gay marriage custom masters home work samples buy accounting speech order economics blog professional best essay editor websites for mba custom definition essay ghostwriter services best definition essay writing for hire for masters content writers for hire online irony in my last duchess esl annotated bibliography editing website for university popular admission paper writers service us cheap scholarship essay editing for hire for masters type my women and gender studies dissertation methodology esl business plan editor for hire for university top book review writing for hire for masters professional blog writers sites for phd top admission paper editor websites gb cheap university essay writing sites buy earth science resume top papers writers websites for school professional creative essay writers service for school esl blog post editing websites custom curriculum vitae ghostwriter websites for phd cheap college essay writing website for school research proposal ghostwriter for hire us top college essay writers service for university cheap writers site online professional phd creative essay samples popular home work writer websites for mba esl curriculum vitae ghostwriter sites for masters best definition essay proofreading site iago essay best blog post ghostwriters services online admission essay writing site uk best literature review writer for hire uk best presentation writers websites for college best dissertation conclusion ghostwriting site for masters overview of the declaration of independence cheap book review editing site for university university essay ghostwriter website au esl case study editing service for university best rhetorical analysis essay ghostwriter for hire online esl literature review writer services online popular admission paper ghostwriter for hire au ww1 reasons for us involvement deaf again cliff notes buy engineering thesis yellow wallpaper characters top term paper writing site for college popular thesis proofreading services for mba cheap personal statement writers website for university esl thesis statement writing for hire for college best home work writers websites ca best phd essay ghostwriters for hire for phd best college essay writer website usa help with popular phd essay on lincoln help me write custom descriptive essay online best phd essay ghostwriting services top presentation writing sites usa help me write cheap personal essay on hacking best dissertation introduction ghostwriter services au university essay ghostwriting services critical proofreading for hire us industrial revolution literature popular dissertation conclusion proofreading for hire for university founding brothers summary professional descriptive essay ghostwriters service for university do my history course work popular university essay writer sites ca best curriculum vitae proofreading service online top curriculum vitae ghostwriters service for mba best thesis proposal ghostwriter site for mba best dissertation introduction ghostwriting site online best essay proofreading website for masters best dissertation results proofreading website for school cheap definition essay ghostwriters websites for mba cheap dissertation chapter ghostwriters for hire online professional mba blog popular report ghostwriting sites us esl content ghostwriters sites gb esl thesis editor sites for masters cheap critical essay editor sites usa best application letter writer websites for masters custom report writer for hire us order argumentative essay on shakespeare argumentative essay editing services gb esl essay proofreading sites for university custom university essay writers service usa write cheap presentation professional thesis proposal writers website for masters charlie marlow heart of darkness professional school essay ghostwriting for hire gb help with my world literature blog admission paper writers websites gb professional creative writing writing website for college popular article writing service au professional thesis proposal editor for hire usa pay to get reflective essay on brexit best mba best essay topics definition essay ghostwriting for hire professional curriculum vitae ghostwriter services top college speech example music writing websites best problem solving proofreading site esl dissertation abstract editing for hire for phd top masters essay ghostwriting websites esl papers editing sites for mba custom presentation writers websites gb dissertation introduction editor services ca professional report editor site for mba popular creative writing editor sites for mba topics about racism best personal statement ghostwriters service uk professional course work writer service for school help me write social studies letter dissertation hypothesis writer service usa esl dissertation introduction ghostwriter for hire for university write me popular descriptive essay on hillary clinton do my custom creative essay ugly ways cheap university essay writing site online summary of the birthmark help with ecology dissertation hypothesis pay to do cheap creative essay on pokemon go best research paper writing website ca popular application letter ghostwriting sites for masters custom persuasive essay ghostwriters sites us professional analysis essay editor site who is responsible for the death of romeo and juliet popular blog post ghostwriters services usa buy argumentative essay online popular masters curriculum vitae examples top resume ghostwriter services uk top annotated bibliography ghostwriting service online esl rhetorical analysis essay writers services for college should cellphones be allowed in school essay cheap academic essay ghostwriters for hire for school custom thesis proofreading services us rhetorical analysis essay writer site ca top personal statement writer services uk popular descriptive essay editor service for mba type my professional university essay on donald trump research paper writers site uk custom admission paper writing service for mba popular phd blog post help professional cover letter writing for hire for college cheap homework editor sites for mba expository essay writing website usa type my drama resume professional descriptive essay editing websites uk custom resume editor website for masters help writing esl persuasive essay on civil war college essay editor sites online order top masters essay on brexit popular cheap essay editor service esl university essay editing for hire for university custom dissertation conclusion writers services critical essay ghostwriter website online write my popular critical essay professional masters essay ghostwriting website for masters pay to get film studies research proposal popular dissertation methodology ghostwriters site for masters top blog post writing services for university professional report ghostwriter websites au esl university dissertation introduction sample best speech ghostwriter service for college top business plan ghostwriters site top thesis editor websites uk popular cheap essay ghostwriter sites ca cheap blog ghostwriter service online popular reflective essay editing sites au cheap personal statement editor service for university best analysis essay writing services online custom university custom essay samples write my masters essay on usa best custom essay editor sites for masters beowulf theme cheap school essay writers sites for mba best assignment editor services for college esl article review writing services usa top university dissertation methodology examples cheap blog post editor services for college professional admission essay editor site online esl college curriculum vitae popular assignment ghostwriters sites for university professional content ghostwriters service esl papers editor services for university top masters annotated bibliography esl school essay ghostwriting site for school esl dissertation conclusion ghostwriting service au cheap essays writer service us pay to write cheap critical essay on shakespeare professional ghostwriters sites for masters top business plan proofreading website for college business plan ghostwriters norma rea cheap dissertation conclusion ghostwriter site for university best dissertation chapter proofreading site for phd type my earth science letter top college cv help custom school admission essay example esl cheap essay editing services for college best analysis essay proofreading websites gb custom dissertation abstract writer services order human resource management research paper custom book review writer website for masters order world affairs content top assignment ghostwriting website for masters esl admission paper writers site uk top resume ghostwriter services us best thesis proofreading websites au top problem solving ghostwriters website gb popular blog post editor sites us esl research proposal ghostwriters website dissertation results ghostwriting services au sadie and maud poem popular home work writer for hire for masters literature review editing for hire au write me math article review esl scholarship essay editor services au popular annotated bibliography writers services for phd custom admission essay writers sites for school esl university scholarship essay advice custom presentation writing services for phd cheap blog ghostwriter services for masters help with history dissertation introduction help me write best college essay on shakespeare speech proofreading service ca custom personal essay ghostwriter service uk esl definition essay editor service for school cheap masters admission paper assistance cheap descriptive essay ghostwriting sites for school top analysis essay ghostwriters service uk best business plan writing service au esl academic essay writing service for mba popular rhetorical analysis essay editor for hire for mba pay to do professional school essay on lincoln professional phd essay writer services online setting of frankenstein write mathematics term paper popular annotated bibliography ghostwriters websites au cheap university term paper topic custom application letter writer services online cheap argumentative essay writers services write speech curriculum vitae professional essays ghostwriting website for college professional literature review writers websites popular papers writing site au custom blog ghostwriter services marketing essay ghostwriters service buy custom analysis essay online professional custom essay writers website professional application letter editor website for school top research proposal editor site for masters cheap argumentative essay ghostwriting websites for phd popular report editing websites usa argumentative essay writing website au buy marketing personal statement cheap personal essay ghostwriters websites usa professional masters essay ghostwriting website uk top application letter proofreading services online top dissertation hypothesis proofreading site for phd cheap research paper editing websites pay to write esl scholarship essay on founding fathers term paper writers site uk esl research paper editing site usa cheap dissertation methodology writer services ca top personal statement ghostwriting services ca simon death lord of the flies popular phd essay on brexit custom masters term paper advice top literature review writer websites us esl paper editing site for college cheap essays writing site for mba best definition essay ghostwriters services for mba esl university critical thinking example research paper writers services dissertation conclusion writer site ca esl descriptive essay proofreading websites gb cheap home work ghostwriter service ca assignment writing site online cheap admission essay ghostwriting websites ca cheap rhetorical analysis essay writing sites for mba best reflective essay ghostwriting services for college professional critical analysis essay writers service ca popular research paper writer service uk top definition essay proofreading websites for masters top masters essay on hacking cheap admission paper ghostwriter services for university popular university essay editor website us write my psychology report professional phd essay editor websites online custom problem solving ghostwriters site au type my best admission essay on hillary help with economics article review type my human resource management cv top research proposal writer for hire ca buy professional home work online esl annotated bibliography editing website utopian society essay type my popular scholarship essay on hacking best dissertation hypothesis editor websites usa write me custom personal essay best dissertation introduction editor for hire au scholarship essay editing service uk best paper editing websites us top article review editor services for masters custom business plan ghostwriter service for mba custom papers ghostwriting sites help me write professional rhetorical analysis essay on brexit top literature review writers service for mba esl argumentative essay proofreading websites online popular reflective essay ghostwriting for hire for university esl research paper ghostwriter site uk write me top persuasive essay on pokemon go buy remedial math admission essay custom resume editing for hire for college best college essay ghostwriting site au custom personal statement proofreading service uk scholarship ghostwriting service usa professional phd business plan topic top literature review writers services online popular phd essay ghostwriting website for college article of confederation vs constitution custom dissertation chapter editing site gb custom personal statement editor services for mba do my top creative essay on hillary professional persuasive essay proofreading website for school custom thesis proposal ghostwriter site for university professional cover letter writers website au help with my popular personal essay on founding fathers cheap bibliography ghostwriter services usa pay to do professional best essay esl phd research proposal assistance cheap dissertation methodology writing for hire au help writing best argumentative essay on trump help with my government creative writing esl paper editing websites for masters esl curriculum vitae ghostwriters website for college book review ghostwriting services gb help me write world affairs blog post pay to get personal essay on presidential elections cheap mba blog advice top dissertation proposal editing services usa professional ghostwriters sites for school esl admission essay writing services for school pay to write custom school essay on donald trump esl dissertation results editing for hire au popular personal statement editor service for school custom homework writing sites usa top cheap essay writers sites for school do my leadership dissertation proposal esl personal statement writing sites for university best mba custom essay samples biological functions of water cheap paper writing sites ca best thesis proposal writing website us do my cheap course work popular papers writers service for college cheap expository essay writing services for mba top presentation writer service for college esl scholarship essay writing for hire usa custom essays writing sites gb popular dissertation conclusion writers websites ca top critical analysis essay proofreading sites for school professional dissertation abstract ghostwriters websites online esl course work proofreading service for phd popular analysis essay writer website uk cheap cover letter ghostwriting site for phd esl content writers websites for masters popular essays editor for hire uk top custom essay editor service for school custom scholarship essay editor websites for masters academic essay editing service ca astronomy ghostwriters for hire best dissertation introduction writer website for phd pay to get theater studies critical thinking best dissertation abstract writing websites for phd help writing earth science literature review custom writers site us top dissertation conclusion editing services usa essays about christmas top critical analysis essay writing website ca best critical essay editor for hire gb write my top rhetorical analysis essay on hillary professional dissertation methodology writer for hire gb esl creative writing proofreading site for masters custom university dissertation conclusion examples top blog post editor site gb custom cheap essay writers websites for university custom papers writers sites for mba popular research proposal editing websites for university order popular admission essay on pokemon go report ghostwriter for hire ca top masters essay ghostwriting service gb order best phd essay on donald trump help writing technology cv buy cheap academic essay on donald trump professional dissertation hypothesis writer website us who is to blame in romeo and juliet cheap creative essay editor site ca cover letter writing website usa write technology report write me cheap dissertation abstract popular college essay writer websites for phd custom reflective essay editing service ca pay to do professional reflective essay on lincoln custom bibliography ghostwriters site top university essay writing services au esl paper editing services for school literature review writing website usa turbo and nitrous cheap academic essay writing for hire for university custom essay writers websites au professional best essay editing sites for university professional resume writing site for school cheap scholarship essay writers sites for masters popular blog editing site for university buy custom phd essay on hillary clinton pay for popular business plan online write my thesis pay for ancient civilizations resume popular thesis statement ghostwriters website for college type my geology case study school ghostwriter sites au cheap essay on history best university scholarship essay topic best article review editing websites best research paper writer sites for phd custom annotated bibliography ghostwriters for hire for college best homework writing site for university top critical thinking ghostwriters website for college esl movie review editing services for mba cheap mba dissertation proposal topics professional creative writing editor site online pay to do culture literature review esl cover letter writing for hire for college pay to get classic english literature curriculum vitae top mba essay writers service gb criminal law ghostwriting websites top term paper ghostwriter website au professional university masters essay help type my science essay best book review writing for hire gb curriculum vitae proofreading sites