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: Connecting maps and scripts  (Read 2529 times)


  • Guest
Connecting maps and scripts
« on: November 04, 2007, 02:32:42 pm »

While thinking about the map editor there was a discussion on how to make it as useful as possible. Since fife based games will be heavily script driven, there is a need to somehow link scripts and maps in a convinient way.

An idea to handle scripts, is to have 'container' objects in the map editor. These objects would provide some information for their designated script (coordinates, starting a script, ending a script etc.). There would be only one container object, but the user would specify of what type it is in the properties.


A basic example:

You want to move the camera from one point on the map to another. would link to two containers: startgoal (giving information about starting coordinates) and endgoal (giving information about end coordinates). The user wouldn't have to write the actual coordinates in the script, but simply place the container on the map and connect it with the script. This would be useful, if the user made changes on the map. Instead of editing the script, you would simply move the endgoal or stargoal containers.

In addition you would only have to write the once,
then you would only copy it, rename it and assign it to different containers.

The containers would also be used for exiting areas on the map. When the player would walk over the container (=activate it), you would start a script to load a new map.


This way the user wouldn't be limited by actions offered only by the editor. Advanced users would write their own scripts and then link them to containers. So the questions left to answer:

1. What container types are needed?

2. Should a container link to more than one script? If yes, how many?

3. If multiple scripts are started by a container, how do you make sure they are executed in a particular order? How does the user define this order?

4. Is a container per map object? If you load a new map x, can you also execute script y on this new map, both started by one and the same container on the old map?

Comments, proposals and everything else is welcome :)
« Last Edit: November 04, 2007, 02:35:07 pm by Lamoot »