ID:151290
 
So I was play testing my project and noticed when creating a large object, the CPU usually jumps up by like 20 for an object that is 128x128 and the game freezes for a second or two.

The thing is, I've seen other projects creating even larger objects and showing no signs of a slowdown of the game. An example being here. If you'd like you can skip to 00:50(blast around 256x256) or 2:38(aura around 128x500?) for a good examples.

After I saw the video, I started to get slightly confused. How are such large objects being created yet no lag and no momentary slowdown? Along with that, there are pretty great particle and flaring fire effects which also look pretty CPU consuming?

Any ideas on how all this is being done without any drawbacks?
They are probably split into many smaller objects.

It lags because Dream Seeker doesn't use hardware.
In response to Zaoshi (#1)
Zaoshi wrote:
They are probably split into many smaller objects.

It lags because Dream Seeker doesn't use hardware.

I was told that it isn't much of a difference between using split up pieces and a whole big icon though.

LordAndrew wrote:
Creating an icon that is multiple states that you must build together via a proc is sorta more complicated, if only because you have to build the entire thing from the pieces.

Looking at a whole icon and then a version that's split into several 32x32 tiles, the latter takes up more space (but it's a very, very small amount [1.24 KB compared to 1.27 KB]).
In response to AbdelJN (#2)
Maybe allocating memory for icon takes less time, I'm not fully sure. But you don't see normal map lagging even if move fast.
In response to Zaoshi (#3)
Zaoshi wrote:
Maybe allocating memory for icon takes less time, I'm not fully sure. But you don't see normal map lagging even if move fast.

What do you mean? Can you rephrase the second part?
In response to AbdelJN (#4)
If you have big map with a lot icons it doesn't lag when you walk around.

Just try to split icon in several parts.
In response to Zaoshi (#5)
Zaoshi wrote:
If you have big map with a lot icons it doesn't lag when you walk around.

Just try to split icon in several parts.

Oh I know that. That's not really the problem. It's creating objects during runtime with New() for things like projectiles. For some odd reason it boosts the cpu up by like 20 yet I can create like 30 individual objects that are 32x32 without any/much change to cpu at all.
In response to AbdelJN (#6)
Well most likely it has trouble loading big file.
Maybe it need to copy icon somewhere else, I'm not sure how it works internally.