Hi everybody, As we are talking about speed in graphics layer, let me share with you some bit of sad true I was holding for myself ;-) As you know, color-rotated sprites are rendered on demand and cached for later use. As your also know the colors of rotation depend on the number of player in the game (player_i.yue = (i * 2 * M_PI) / playerCount). This is fine for a single game. But if you start several games with number of players that are not multiples, for instance prime numbers such as 3, 5, 7, 11... new versions of sprite are constantly generated. This is not a too big problem, because : - this is bounded by the maximum number of players, - proportion of prime numbers goes low as numbers go high, - in virtual memory/texture allocation we trust.
Nevertheless, it would be good to clear color caches if the new game has a different number of players than the previous one. Have a nice day, Steph -- http://stephane.magnenat.net _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
