Quantcast API Hell - What to avoid in LotRO! - LoTROInterface
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > General Authoring Discussion (L)

Reply
Thread Tools Display Modes
  #1  
Unread 10-13-2007, 08:12 PM
Cidan Cidan is offline
The Wary
 
Join Date: Oct 2007
Location: Falls Church, VA
Posts: 3
Smile API Hell - What to avoid in LotRO!

Howdy all.

My name is Cidan and I'm a UI author for World of Warcraft. I have recently migrated from that game to this one. I have a few thoughts on what to do when it comes time for an API to be implemented into LotRO and I thought I'd share a few with you all.

Before I get started I'd like to state my particular specialty is abstracting the API already in place in games such as WoW so they are modular and easy to use, and no, I don't mean Ace2. (Though really in a more general sense I abstract with all my projects, rendering engines, etc.) I also DO understand that any and all API functionality is not going to come for a lonnggg time, if ever.

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.

Signals

If I recall what I read a while ago, Frosty did mention that developers will be able to create their own signals. I applaud this, but make sure they are flexible enough that we can bind multiple calls to a single signal, etc. Other than that, woohoo! One less thing to abstract. :P

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. We have seen it... er, destroy other games and raiding environments. I would hesitate including this feature at all. Once the player modifiable UI moves into the realm of in-game interaction you have to tread lightly. I would suggest that when it comes to actual game play, developers need to be limited to just information-type UI's and not interactive ones. At the very very most, limited interaction such as click to target should be safe. This is solved by never including a function that allows one to cast a spell/skill and including a function that allows targeting but still allowing a user to create action buttons.

Movement

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.

Unit Data

In games like WoW, events will fire when Health/Mana changes and it's up to the author to find out what the HP/Mana is at the time of the event firing. While functions that pull unit HP/Mana and other datasets are nice, I would take this one step further. Almost every (decent) addon/UI I know that deals with units has some sort of array with unit "objects" in them. These objects contain functions for various things. For example we'd be able to get a unit object by player name and then call functions on it. Unit.GetMorale(); Unit.GetStance(); Unit.GetName();, and so on. I highly suggest this is implemented. Some will argue it creates overhead, but I put forward the argument that having the engine do it versus having 4-5 addons each store units is a much better way to go about unit data. However developers should be able to augment units and add new functions across the units. Generally you don't have to worry about developers polluting the global/unit space because if an addon does break something then the end user will just not use it.

That's it for now, I think. I'm sure more will come to mind, but eh. Let me know what you all think!
Reply With Quote
  #2  
Unread 10-18-2007, 11:13 AM
Frosty's Avatar
Frosty Frosty is offline
Tools and UI Engineer
Interface Author - Click to view interfaces
 
Join Date: Feb 2007
Posts: 177
Thanks for the ideas!
-P
Reply With Quote
  #3  
Unread 07-03-2008, 02:59 AM
tiberiu tiberiu is offline
The Wary
 
Join Date: Mar 2008
Posts: 3
It seems that we have an advanced programmer among us... Great ideas and hope that one day maybe some of them will get implemented.
__________________
Alienware Gaming PC
Reply With Quote
  #4  
Unread 07-03-2008, 06:31 PM
Cleitanious's Avatar
Cleitanious Cleitanious is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Aug 2007
Posts: 92
Supposedly the UI is being entirely rebuilt form scratch for Mines of Moria (It being the single oldest code in the LOTRO game, dating all of the way back to MEO) so, we shall see then.
__________________
I believe in science and that science can explain everything,
Because God has made it all work in such a beautiful way.
Reply With Quote
  #5  
Unread 07-04-2008, 05:40 PM
Aalwein's Avatar
Aalwein Aalwein is offline
GM, Scarlet Underground
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 163
Quote:
Originally Posted by Cleitanious
Supposedly the UI is being entirely rebuilt form scratch for Mines of Moria (It being the single oldest code in the LOTRO game, dating all of the way back to MEO) so, we shall see then.
I hadn't heard about this but it makes me very excited... GIMMIE MA XML!!
__________________
Guildmaster, Scarlet Underground, Silverlode
Reply With Quote
  #6  
Unread 08-20-2009, 03:42 PM
Miskaton Miskaton is offline
The Wary
 
Join Date: Aug 2009
Posts: 2
Quote:
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.

Quote:
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)?

Quote:
Movement

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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:20 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui