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!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - conan

Pages: [1]
Game creators corner / segmentation fault while deleting instance
« on: November 14, 2015, 09:36:51 pm »

I have quite a tricky situation. I get a segfault every time I try to delete an instance on the map, deleting it with layer.removeInstance(instance). I am pretty sure I'm doing instance.removeActionListener() and that there is nothing else depending on it. I also tracked the problem and it doesn't happen exactly when I delete the instance but next time the engine pumps(), so it happens on the C++ side.

I'm going crazy because I can't debug this C++ side. Is there any way to get more information from the engine part, some way to run a debugger or get a more verbose explanations why it segfaults?

Thank you so much!

General discussion / Does FIFE need Guichan?
« on: November 14, 2015, 09:16:36 am »

I'm trying to install FIFE on another computer running Linux. After installing all the dependencies listed on the install guide for Linux, I try building it. However, it complains saying that guichan is not installed. I thought that fifechan would replace this component. Then I try installing guichan but it seems that it's looking for version 0.8.1 and the latest is 0.8.2. Whatsmore, I try building 0.8.1 and get some errors. I think it's really deprecated.

Is there a way to avoid installing guichan altogether? Also, I would like to know how FIFE runs in Windows.



Is there a way to delete an instance from within onInstanceActionFinished() or anywhere that is called from it? The engine crashes if I try to do this because after the call it checks for "instance" (the parameter that was passed) and can't find it anymore.

Right now I'm putting the instance in a vector and I check the vector every pump() and free it. I don't think this is a very elegant way. Is there any other way?


Help and troubleshooting / Process finished with exit code 139
« on: November 05, 2015, 09:16:31 pm »

I got into a situation when I get this cryptic error:
Process finished with exit code 139
That's it, nothing else, no trace... so I guess it's in the C++ side.

When I try to debug it, I go step by step until the engine pumps and then it exists with that error without any other explanation.

There are two situations that create this error:
  • One is when I manually create an object:                 
Code: [Select]
object ="dummy", "namespace")
dummyInstance = layer.createInstance(object, newlocation.getExactLayerCoordinates())
    At that point it doesn't complain but the next time it pumps, it crashes. If I just comment the createInstance line it doesn't crash.[/li]

  • So I commented that part out and did a huge code change (just refactoring), but after those seemingly neutral changes and after commenting out the previous failing line, it again fails with the same error code.

Help would be appreciated! Thank you!

General discussion / Line of sight/ clear shooting trajectory
« on: November 02, 2015, 08:15:21 pm »
Hi all,

I have spent few hours developing a nice little game with FIFE. I must say I really like it.

I hit a wall though, and that is getting a way to calculate if my units have clear line of fire to other units. I use a square grid.

So far what I tried is calculating two different routes from unit to target: one in the "units" layer and another one in a so called "trajectory" layer which has no blocking objects (it would take the shortest path possible). So if the paths match, then I have a clear line of sight. This works in most of the cases, but there are some exceptions when it doesn't work.

How would you do it?


Game creators corner / Conditional blocking (only some units)
« on: January 20, 2015, 08:01:27 pm »
Hi guys,

How would you implement the following: I have a map with land and sea. I have land units that cannot go to water cells. However, I have "amphibious" units that can also go on the water.

If I set the cells as blocking, then none of the units can go on the water. How can I make this blocking only for ground units? Can I somehow use the "cost" property of the cells? I'm not using this property at all by the way. I don't even know what it does. I guess it's some movement cost modifier but that's just my intuition.

* Also, keep in mind that I still want units not to step on each other so I can't just put different types of units on different layers. Also, there are other harder blocks as cliffs and hills that no unit can go through.


Game creators corner / Multiple cell objects (buildings)
« on: January 19, 2015, 11:28:03 pm »
Hi all!

I'm making my TBS game on FIFE. It's great! I only have one problem.

I'm trying to implement "building" type of objects. These are like units but they can't move and they generally occupy more than one cell. Something like castles in Age of Empires. I was looking how to be able to have instances that occupy more than one cell and I haven't really found an easy way of doing this.

I found MultiCell objects, but this seems unnecessarily difficult, since I just have one image for the building (won't need rotating) and they all generally occupy just 4x4 cells.

My crazy idea would be to associate an "area", using areaID and automatically block the cells within this area. However, I haven't really understood how to do this (how to generate an area etc.). I was looking into using CellCache -> CellsInRect. Is this overly complicated? Is there an easier way to do it?

Thank you in advance!

Pages: [1]