Heya,
I've read a bit in the wiki (to freshen my memory) and best practices includes drawing in - (void)draw method and calcs in a tick method...
I am looking for ways to tweak my game... pre-alloc and stuff...
so.. would it affect performance??
best practices question: draw and tick...
(7 posts) (3 voices)-
Posted 2 years ago #
-
I'm glad someone asked this. I was going to post something like it myself.
I have tried both and can't seem to see any benefits of either yet. My project is still small so I may not have enough logic to make a difference.
Posted 2 years ago # -
please, try to be more specific regarding your doubts about the best practices.
Generally, pre-allocing objects won't reduce performance.Posted 2 years ago # -
I think I misunderstood the original question. The topic I was going to post on draw vs. tick seems to be addressed in the best practices.
Posted 2 years ago # -
Pre-allocate should basically give a performance boost ( a huge one from what I understand)...
The question should be rephrased...
My question is:
if I use draw + tick (the way described in best practices) would I be able to gain some FPS, would it affect performance for the better? Will there be any benefits for this method vs drawing and calcs inside a tick... ?Posted 2 years ago # -
no, if you draw on
tickor if you update ondrawyou won't gain any performance, and you will have problems with transformations / pausing / resuming.Posted 2 years ago # -
Ok, so we should all use
draw+tickin order to dodge all kinds of jerky method calls, but we won't gain anything from it really...Gotcha, Thanks Riq!
Posted 2 years ago #
Reply
You must log in to post.