I think pooling would be kinda overkill for this. Now, maybe if you had a LOT of spells and effects and all that, then maybe. I may be wrong tho, Ive never used pooling before. I guess just make sure the instance is properly destroyed after its use so garbage doesnt add up.
I’ve always pooled particle fx. Never actually measured the difference/costs, might not matter depending on your platform targets/how many fx you have.
My most common particles are blood and impact, figure why not. Pooling is very little work.
Pool is just: instead of destroy, add object to list and disable, instead of create, check list first.
I’d advise to stick with YAGNI/KISS instead. Implement pooling when you need it. On mobile you NEED it. On PC you might need it in some circumstances, but not all objects need to be pooled.
right now i’m only pooling my enemies; all the magic/specials attacks are created using instance and when they go out of the screen they are destroyed.
I donno man, I mean pooling is such a small amount of code in most cases. We’re often talking about a few lines. If there’s the possibility of creating like 100 or more between scene loads I would almost always pool unless there’s a good reason not to. Like 5 instances, whatever.
In general, you won’t notice pooling in terms of overall FPS, you will only see occasional frame spike once in a while. Although, it does depend on how many fx we’re talking about, if there are like 100s then this is different from like 2-3 on screen at once.
If you’re at 63fps on a PC platformer, I would suspect there are problems elsewhere, unless you’re working with extremely low end hardware.
On PC, you should almost not even notice a GC call, it should be very minor unless you’re already under serious load.
It also adds a headache of properly resetting the object when dragging it out of the pool into the scene for a second time. For example, if your enemies have bullet wounds on them, you’ll have to make sure you remove those. You end up with functionality duplicated/shared with start. Non-pooled object can also easily perform destructive operations on itself, when you’re using a pool, you’ll have to jump through several hoops to make sure that the object is no longer poolable, or marks itself as non-poolable before doing destructive application.
So, here. Plenty of potential headache because you go against KISS/YAGNI and a dozen of potential landmines that can backfire and cost development time later.
what is the normal fps count for a pc platformer using unity3d ?
i’m developing on an i7-3820 at 3.6ghz, with 16 gb ddr3 and amd r9-275 video card (i know that i’m a little behind with my video card, i need to replace it), but i don’t think this specs are low end