Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SlinkyDinky

So I'm fiddling with some very abstract gameplay and since both player and enemy basically consists of squares I was wondering if it's possible to bypass passing the frameTime parameter of maybe even addAnim() altogether in order to give them a visual representation?

1 decade ago by Joncom

Are you saying that both player and enemy are basically static images?

So what&039;s wrong with using #addAnim?
Why are you trying to avoid using it?

this.addAnim('static', 1, [0]);

I don't see the problem.

1 decade ago by SlinkyDinky

It just doesn't seem logical to spend computing power to "update" a frame when it never ever gets replaced by a new one...

1 decade ago by Joncom

You're right, it's unnecessary and basically a waste of computing power.
It's probably best to leave it though, for a couple of reasons:

1. Having multiple ways to set appearances adds complexity to the code.
2. Such an optimization would offer an insignificant performance gain.

1 decade ago by SlinkyDinky

2. Such an optimization would offer an insignificant performance gain.

Yeah, I thought so. It would just seem stupid to leave it behind if it was a simple fix.

1 decade ago by Joncom

Quote from SlinkyDinky
Yeah, I thought so. It would just seem stupid to leave it behind if it was a simple fix.

Yeah, and there is not really. The framework is set up in such as way that there are very clearly defined ways to accomplish certain tasks. To swim against the current may be more trouble than it's worth.
Page 1 of 1
« first « previous next › last »