Heres the problem.
My on-screen text system uses alot of CPU as it has to constantly create and delete objects for the letters.
Best way to handle this would be to have a preloaded cache of objects to use, only problem with that is that they cant be displayed to multiple players at one time because theyd be changing around on the player's screens. Another option would be to have a cache for each player, but that would be a gigantic waste of objects.
SO! best solution I can come up with at the moment is to make a dynamic reuse system. Meaning during a chat session it re-uses the letters that are already on the screen instead of deleting and re-creating between every popup window, only creating new letter objects if not enough were present in any of the previous windows. At the end of each series of messages it would delete all objects and then create new ones when you start talking to the next NPC or whatever triggers the next on-screen popup.
Anyone have a better idea?
Jun 6 2008, 10:25 am (Edited on Jun 6 2008, 10:32 am)