CPP
cpp
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
/*
ID: Object Vector Part 2
By: Michael Simnitt.
Purpose: To further progress towards a game core design technique.
My attempt here is to build an object factory that can handle massive
amounts of entity addition and removals while keeping memory both in check
and fast. The next part will randomize creation/deletion of both player
and creature type classes.
NOTE: I would like to Thank all those who shared code and knowledge across SoloLearn
and the web. After searching dozens of sites this is a compilation of the many things
I have learned from you. Please feel free to criticize and offer suggestions/help.
DEBUG Usage: DEBUG shows debug text on objects output. Set to false to hide this.
Mock Usage: (int,bool) @int # of objects to create , @ bool set debug mode for Mock.
*/
#include <iostream> //cout, endl
#include <typeinfo> // operator typeid
#include <vector> //vectors
using namespace std;
typedef unsigned long EntityId;
EntityId idList;
bool DEBUG = false;
//component class - still needs work
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run