For now i have passed the grid size through template variables, assuming higher performance, but then i thought that ill probably need to have the ability to create one with a run time defined size. That requires passing the size in the constructor. Is there a way to allocate a member array of size determined by the constructor passed variable(s) on the stack?
something like
class MyClass
{
MyClass(int x){};
array[x] MyArray;
};
with a bunch of keywords here and there.
Is this even possible?
If i want to use runtime defined size, do i need to allocate on the heap?
Should i allocate on the heap anyways (should large allocations on the stack be avoided?)?
EDIT: using full editor got rid of all enter spacing and collapsed the whole post into a text wall :c
Edited by Waterlimon, 24 December 2012 - 10:26 AM.
The lack of awesome free resource gathering building sandbox games capable of running an user made 8 bit computer in the world disturbs me.