FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  


FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Request for a getTopInstance function  (Read 2513 times)


  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Request for a getTopInstance function
« on: February 20, 2008, 11:47:32 am »

This is a request to Jasoka, as he seems to be working on the instance picking functionalities.
So, jasoka, could you think of a getTopInstance function ? Or can the top instance on a determined screen point already be get with the actual getMatchingInstances function ?

By the way, by top instance I mean the instance to which the clicked pixel belongs, if not covered by a semi transparent pixel of another instance. (and the top semi transparent instance if there is any)

I think this will be needed in future, for nearly all in-game click based features (context menu, attack/skill targeting, etc...) but also for editor features (instance dragging)
« Last Edit: February 20, 2008, 11:50:31 am by November »


  • Developer
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Request for a getTopInstance function
« Reply #1 on: February 20, 2008, 02:33:51 pm »

yes, the instance picking already takes transparency into account, i.e. if you click on instance image's transparent pixel, it wont be returned. However the ordering of returned instances is not currently based on distance or anything, so I need to work on that still a bit more.

The plan is to arrange clicked instances based on distance, and return that list then. We could also implement something like getTopInstance for optimization purposis, after ordering issue is resolved.