Announcement

Collapse
No announcement yet.

Efficiency of making calls to AS from unrealscript?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Efficiency of making calls to AS from unrealscript?

    I'm building an inventory system. My plan is that when the player opens the inventory, unrealscript will run the swf movie and send the data of current inventory items to the actionscript so that it can populate the inventory accordingly.

    My question is: Is it better to send this data as one item (array), or doesn't it matter if I make many calls, one for each item?

    Are there performance concerns I should be aware of?

    Thanks in advance

    #2
    While I don't have time to answer your question in detail and I certainly haven't made any investigation into performance differences between the 2 approaches you mention, I'd like to direct your attention to the fact that doing anything heavy within ActionScript is not recommended. Not sure what kind of data you'd want to push into AS3. IDs of the items your character has in their inventory seem like the most probable candidate. Repopulating inventory from scratch on every opening seems unnecessary. Inventory happily exists on the background so do the AS3 changes as and when they are needed, the engine will swallow that with no problems.

    Comment


      #3
      Thanks for you response @davek.

      Comment

      Working...
      X