| |||||||||||
PyWeek - FPS problems!
About two days ago, I had these two goals.. I don't think I could meet them now...
— wegstar on 2007/04/05 05:12 of PyClimb Comments: (log in to comment) |
Last Challenge
September 2008 [entries, ratings] Previous March 2008 [entries, ratings] September 2007 [entries, ratings] > April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login | ||||||||||
By saluk on 2007/04/05 05:21:
How are you trying to do the item drop feature? If the fps is ok without it, then it's probably the culprit and can be optomized.By wegstar on 2007/04/05 05:26:
sorry, I meant item pickup... basically, I have a loop that checks to see if the player collides with the powerup item, and if the player does, I remove it and add up on the player's stats. The problem is, I have other code like it, but even more intensive.. they don't affect the fps. You're probably right.. I'll have to check it.By saluk on 2007/04/05 05:38:
Use distance to check, and don't run the check every frame; every other frame maybe?By gizmo_thunder on 2007/04/05 09:22:
have a timer and check for collisions on timer event. This would surely help out. And for collision checking.. check collision only if they are around the user, easy check would be to check collision between user and visible items only. hope this helps :)By Tigga on 2007/04/05 11:29:
If logic is taking a while, I would suggest using psyco ( http://psyco.sourceforge.net/ ) if you are not already. It can speed things up tremendously.By richard on 2007/04/05 11:58:
Please don't just resort to using psyco as the first step. Try some of the other suggestions first.By simono on 2007/04/05 12:01:
On the other hand, I would rather have non-optimized but psychoed code. But your code shouldn't be throwing away the CPU cycles for nothing either...By alex on 2007/04/06 01:47:
Note that psyco only works on 32-bit x86 -- at least give the option for disabling psyco (without venturing into source) so those of us with AMD64 and Macs can play too.