Quantcast LoTROInterface - View Single Post - API Hell - What to avoid in LotRO!
View Single Post
Unread 08-20-2009, 03:42 PM
Miskaton Miskaton is offline
The Wary
Join Date: Aug 2009
Posts: 2
Originally Posted by Cidan
Object Recycling

I think the very first thing that needs to be in place when exposing the API is recycling of assets. I can not stress what a mistake it is to not recycle assets and to leave things up to some garbage collection system. I'm assuming that LotRO will at some point use some sort of managed language, which is fine. However all objects created by this API must be pooled. That is, developers should be able to call a function on the object to sanitize it and the engine will put the object back into a pool for reuse. Next time an object of the same type is created, it will pull from the pool first before creating a new instance. Over time the game should garbage collect what is in these pools.
Pooling would, indeed be a good thing. I wonder, however, how necessary it would be if a garbage collector were sufficiently UI-aware (e.g. you probably always want to run a GC sweep after initializing a mod and after significant callbacks like "close frame" type calls. However, many callbacks should not trigger a GC sweep because they're called in very rapid succession. Given such UI-specific hooks for GC, much of the need for pooling of everything goes away. I still buy into pooling of heavy-weight objects, though, especially large items that will be re-allocated frequently.

Click Casting and Interaction

I strongly suggest holding off on any sort of "click and you will cast a spell on this player" functionality in the API.
There are many items in this bucket. In another thread, I suggested using the permissive rather that restrictive approach. That is, start off offering access to just a few elements that get you non-combat mods of the highest value first (auction house and bags seem to me to be the highest priority). Then new functionality can be trickled in over time, making the mod system increasingly better without suffering the massive upheaval that WoW's system did (decursive paladin whackamole anyone)?


This is a no-brainer but I thought I'd include it for good measure. Under no circumstances should an addon/UI be allowed to move the player or camera.
I think WoW is too restrictive, here. I'd love to see a way to manipulate the camera slightly (affecting zoom is not an issue, for example), and simple movement (like selecting a follow target should not be an issue.

I think I'm in violent agreement with you on everything else.
Reply With Quote