Skip to main content


sorry - article not yet posted...


Popular posts from this blog

Resource Manager - (Game Resource Management)

Resource Manager - (Game Development Resource Management)

#include "ResLoader.cpp"

Definition: MANAGER:

Manager member variables:
ds::astring name;
nameis the name of the  resource manager.


Game Resource Management

Game Resource Manager
Requirements Sound understanding C++, pointer, and template.basic understanding of std::vector and std::map. 
Depending on your level of programming in C++ this tutorial maybe easy or hard to comprehend. I will try to explain things in a way that is simple to understand. Note that the resource manager here uses C++ template. If you don’t know what a template is in C++, it is highly recommend that you review and understand it before you read this article. This is a general-purpose resource manager; C++ templates will allow us to use the same class to create many different resource-manager to manage different objects of different type. The core resource manager will be used to create manage resource managers automatically, and manage them. 

@Noteds::dlist is my own custom linked list. std::vector can be used instead.  @Note ds::astring is my own custom string. std::string can be used instead.
What is a Game Resource Manager? A game resource manager manages ob…

Resource - (Game Resource Management)

Resource - (Game Development Resource Management)

#include “dlist.hpp” #include “charstr.hpp”

Definition: RESOURCE:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46template<classAsset>classResMgr;template<classAsset>classResource{friendres::ResMgr<Asset>;public:Asset*object;voidSetLoaded(boolvalue){isloaded=value;}boolGetLoaded()const{returnisloaded;}ds::astringconst&GetName()const{returnisloaded;}intGetReferenceCount()const{returnreference_counter;}private:Resource(ds::astringconst&name):object(nullptr),reference_counter(0),name(name),isloaded(false){}~Resource(){}private:intreference_counter;ds::astringname;boolisloaded;};
Resource member variables details.
Asset* object;
is the asset that is to be manages. Asset is made to be a pointer to allow the adding of an asset to the manager. With out the uses of a pointer the asset will have to be copied each time an asset is added to…