Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Limit the FPS with the new API #97
Comments
|
There isn't anything builtin to python-tcod right now. The FPS limit was hard coded into the previous API and the new one doesn't have anything similar. You can take PyGame's Clock if you don't want to write your own limiter, but it isn't hard to write a new one in Python. There was nothing special about the old limiter. If you're having trouble then I could write something quick right now, but it'd just be a port of Clock. |
|
just to avoid the deprecated message:
Probably I will do my own, so I can have the effects at 60 FPS and player/enemy states at 20 FPS (60 is too fast for this). Note: I don't know PyGame but in Python 3.7, the time module gains ns resolution timers. Thanks! |
I'm trying to modernize my roguelike source code using the new API and I cannot find a method to limit the FPS.
In the old version I was doing:
tcod.sys_set_fps(20)Is there any way to do this with the new API?
Instead of doing it manually from my code skipping frames