Raining new color objects - is that a good idea?

Some of you might recognize me from my previous thread (which was a mess of misunderstanding thanks to me). I finally accomplished what I attempted to do and now a question regarding performance troubles me.

60 times each second, my game updates the background’s colour:

c = new Color((short)r,(short)g,(short)b);

Is this going to affect performance much? If so, is there a work-around?
Many thanks!

None at all. My rule of thumb is (unless you know what you’re working on is time critical and software-intensive) is to not worry about it until you run it through a profiler or experience performance issues. Premature micro-optimizations usually kill code design.

Honestly, don’t worry about the performance of what you throw in your render loop - just the design. Worry about performance when you are doing profiling.

Thank you for that reassuring reply!

Performance shouldn’t be an issue, but you might cause epileptic seizures in some of your players…

I’ll do my best to prevent that from happening :wink: