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.

Messages - helios

Pages: 1 2 [3] 4
Help and troubleshooting / Re: Help with the FIFE python tutorials
« on: April 02, 2013, 10:01:04 am »
The layer type was missing.
You can not automatically walk on a layer, so you have to set if the layer is walkable (creates an own CellCache) or if it is a interact layer (Layers are combined to one CellCache).
If you look at the changes here you can see that the ground layer is now a interact layer of actor layer and actor is walkable. No need to do this in the map file per hand, you can use the map editor and there the LayerTool.
These means, the actor layer creates a CellCache with the data of the ground layer (e.g. size and blocking property). The actor layer have only a size of one cell because only one instance is on the layer (the player). By default the size is calculated from the positions of all instances of a layer. So you have three options to create the right size of a walkable layer.
The first one is to set the size by your own (UH does it so), the second way is to place edge instances on the walkable (4 instances, one for each corner), third is to combine layers. It depends on what you want to achieve.
Lets say you have three layers, water, land and actor. The player is on the actor layer and should be able to walk on the land but not on the water. First step is to ensure that the water object/instances are blocking and the land objects/instances don't. Then set the water and land layer as interacts from actor layer. The result is a CellCache which as data source using the three layers. So min/max size of the layers are combined to the cache size and blocking is also merged. So each cell which is placed on a water instance, blocks.

The old way was to create a invisible blocking object and place the instances on actor layer on all water positons. That was just very awkward ;)
In summary, one can say the Layer is used for visual ordering and the CellCache is used for pathfinder ordering.

Help and troubleshooting / Re: Help with the FIFE python tutorials
« on: March 31, 2013, 02:12:51 am »
Hi Zoeyface,
sorry for the trouble. We've forgotten to update the tutorials  :-[
The code is correct but the map file was outdated. I've just updated it.
So please update your tutorial files and try it again.

Game creators corner / Re: Somes bugs at the starting of FIFE
« on: March 14, 2013, 12:45:50 pm »
Have you tried the settings change as prock has described in the other thread?

If you don't know where it is:
Press windows key + r, then insert %appdata% and press enter. In the window that opens should also be a folder with the name fife. This folder contains the rio_de_hola folder where the settings file is. Open the settings.xml and add the following lines in the FIFE Module:
Code: [Select]
    <Setting name="GLUseFramebuffer" type="bool"> False </Setting>
    <Setting name="GLUseNPOT" type="bool"> False </Setting>

I'm pretty sure this fix the problem, if not it may be a driver bug. ATI is not the best choice for OpenGL applications, it tends to problems  :(

Framework development / Re: Some renderer improvements
« on: March 13, 2013, 11:12:28 am »
Hey all,
you can already scale/resize images on runtime, with Opengl and SDL. It isn't very intuitive but works. The rotation thing is more complicated, as prock said, it could lead to confusions. I'm not sure if it's really worth the effort.

The batch rendering is able to work with different geometry tyes (point, line, triangle, quad,...), but textures use internally always a quad. You could create another version of addImageToArray() which internally uses triangle or triangle stripe. But in general, there should be more types, for example FIFE still missing the opportunity to render circles (filled/unfilled).

Well, lighting effects... FIFE have a LightRenderer which uses blending. You can add Images, Animations or create a light primitives (use renderbackend drawLightPrimitive()), also you can change the blending modes and add stencil buffer tests. The "downsides" are that the lights are additive and the z ordering is not right because it has its own renderer (is called after the InstanceRenderer). Rio de hola have a simple demonstration of global light and light primitives. (enable lighting in the settings and press 1/2 and 4/5)

I fully agree that shaders would be a great feature for FIFE. I had implemented a basic shader support a few years ago. But there were too many other problems so I stepped away from the idea. (those were the times in which we have used immediate rendering)

I'd hate to force users to modify config file values for all these things, we should do more auto-detection!
We do it with glee in the backends, the problem is more that (especially for ATI/AMD cards/drivers) the detection failed. The settings are meant as fallback for these cases. But of course it would make sense to query other things, such as maximum texture size, max color attachments and so on.

Game creators corner / Re: Basics of instance and object manipulation
« on: December 22, 2012, 09:25:52 am »
I had not realized but it's fixed now.

Game creators corner / Re: Basics of instance and object manipulation
« on: December 21, 2012, 08:18:32 am »
We have settings to set the window title and icon. Rio de hola stores it in the settings.xml file.
Code: [Select]
    <Setting name="WindowTitle" type="str"> FIFE - Rio de hola </Setting>
    <Setting name="WindowIcon" type="str"> gui/icons/boy.png </Setting>

Game creators corner / Re: Loading dynamically generated images into Fife
« on: December 21, 2012, 08:10:44 am »
I'm sorry but there is currently no way.
Yesterday we discussed the problem, we will fix it as soon as possible.

Game creators corner / Re: Basics of instance and object manipulation
« on: December 17, 2012, 11:41:26 am »
Sorry no idea. Here it works, I tested it with rio and here is my code snippet:
Code: [Select]
loc = self.hero.agent.getLocationRef()
grid = loc.getLayer().getCellGrid()
vertices = grid.getVertices(loc.getLayerCoordinates())
for i in vertices:
print i

Game creators corner / Re: Basics of instance and object manipulation
« on: December 17, 2012, 09:41:00 am »
The repository is right. But seems you mixed the last official release (0.3.3r3) and trunk.
Here is the win compile guide:

Game creators corner / Re: Basics of instance and object manipulation
« on: December 17, 2012, 06:38:15 am »
Sorry seems that there was a bug  :-\
The output parameter was missing, is now fixed in trunk.

Game creators corner / Re: Basics of instance and object manipulation
« on: December 16, 2012, 01:06:23 pm »
I'm not sure what is your goal but if you want to outline the cells on the grid then you can try something like this. It should work as long as your tile size match the cell grid size.

Code: [Select]
clickpoint = fife.ScreenPoint(event.getX(), event.getY())
if event.getButton() == fife.MouseEvent.LEFT:
instances = self.get_instances_at(clickpoint, self._layers['ground_layer'])
instance = instances[0]
loc = instance.getLocationRef()
grid = loc.getLayer().getCellGrid()

vertices = grid.getVertices(loc.getLayerCoordinates())
for i in vertices:
firstpt = self._cameras['main'].toScreenCoordinates(grid.toMapCoordinates(i))

But zooming is always a problem because in some situations the pixel position can not be determined clearly. thanks for the pointer to ref_cell_height, I'll take a look at it.

Game creators corner / Re: Basics of instance and object manipulation
« on: December 10, 2012, 07:36:52 pm »
Hey Kresp,
You have different options. If you have already 10 objects and each holds one static image then you have to code something like this:

Code: [Select]
def changeTile(instance, id="tile:1")
    # save old location
    layer = instance.getLocation().getLayer()
    emc = instance.getLocation().getExactLayerCoordinates()
    # delete old instance
    # get object
    object = self.model.getObject(id, "yourNamespace")
    # create new instance
    newInstance = layer.createInstance(object, emc)

The other option is that you create only one object which holds all the images but use different directions. Lets say tile0 have direction 0, tile1 a direction of 10, tile2 of 20 and so on.
Then you can call instance.setRotation(0) to get the empty square displayed or setRotation(10) to get the square with 1. It's a bit hacky but so you have not to delete and create new instances on the fly.

General discussion / Re: One other question before start....
« on: October 17, 2012, 04:45:23 am »
Hi Lucky,
FIFE is in active development so do not worry. :) We will soon release a new version.
No, FIFE have no support for browser games.

Game creators corner / Re: Variable height terrain
« on: August 25, 2012, 10:15:50 am »
Thank you for the patches :)
I'll take a deeper look at it and create Tickets for all that stuff. I can see that it is still a lot of work but I think it's worth it.

Help and troubleshooting / Re: Trouble building FIFE
« on: July 31, 2012, 09:53:59 am »
Ok great :)
I committed the fix to trunk so the newest rev. should work.

Thank you for reporting the bug!

Pages: 1 2 [3] 4