On Wed, Jan 27, 2021 at 7:00 AM Toni Roca <[email protected]> wrote:

>
> Hella again, last questions.
> 1-How i show the fps in the display?
>

director.init()
...
director.show_FPS = True



> 2-I only use a few sprites, and the game its going slow with lagging. How
> can i solve this and what is the best way to avoid this problem?
>
> Use batches to group the sprites?
http://progcc-en.blogspot.com/2010/11/sprite-performance-in-cocos-and-pyglet.html

Otherwise, you need to profile to see what is the bottleneck, by example
using cProfile (included with python) and some library to analyze the data,
by example RunSnakeRun https://github.com/mcfletch/runsnakerun
or snakeviz https://jiffyclub.github.io/snakeviz/



Thanks all. :D
>
> --
> You received this message because you are subscribed to the Google Groups
> "cocos2d discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cocos-discuss/500cd882-8a43-49d5-8641-95b6e8cbbb2fn%40googlegroups.com
> <https://groups.google.com/d/msgid/cocos-discuss/500cd882-8a43-49d5-8641-95b6e8cbbb2fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cocos-discuss/CAP3BN9V3hYDCijW8V%3DTT%2BSQi3m5c4M42ayyTT5n-g9zF1T1fuA%40mail.gmail.com.

Reply via email to