FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

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

Author Topic: "collision detection"  (Read 3084 times)

dison

  • Newbie
  • Posts: 1
    • View Profile
"collision detection"
« on: April 11, 2008, 05:15:22 pm »

Hi. Im just getting into FIFE scripting and modding. I was curious to know if there is any established method for preventing the character from walking into certain areas. Such as water or a building. Is that something I should try to accomplish with scripting (eeek), or is there a part of the engine for this? Or should I just wait for a future version of FIFE in which this will be handled within the engine?

 :) thx
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: "collision detection"
« Reply #1 on: April 12, 2008, 03:56:06 pm »

Hi. Im just getting into FIFE scripting and modding.
Heya dison :-) Welcome on the forums.

I was curious to know if there is any established method for preventing the character from walking into certain areas. Such as water or a building. Is that something I should try to accomplish with scripting (eeek), or is there a part of the engine for this?
There are basically two ways of collision detection at the moment:
1. Use the blocking attribute for objects that should block movement. This has to be set in the datasets ATM and as there is no tool for creating datasets yet you would need to create these definitions via a simple text editor tool. Take a look into the existing datasets from SVN or the release package and search for "blocking".
2. The alternative to have visible blocking objects is to use invisible blocker objects. You can place them at the shoreline to prevent that the boy runs into the water.

Or should I just wait for a future version of FIFE in which this will be handled within the engine?

 :) thx
We didn't ship the 2008.0 release with invisible blockers as the pathfinding code was in a quite shaky state back then. We improved the pathfinding code later but didn't add invisible blockers to the maps in SVN yet as they'll be soon replaced with two new maps.

So to summarize:
1. You can already use the blocker attribute for visible objects and invisible blockers.
2. Future FIFE maps will have proper object blocking. It's still lacking in the 2008.0 release and in the current SVN trunk as we didn't have time to start working on the new maps for the next release.
« Last Edit: April 12, 2008, 03:59:29 pm by mvBarracuda »
Logged