Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: Advice requested on implementation of maps in crossfire



Peter wrote:
>   For random maps, I'd like to be able to link to human-defined
> maps, and have the human-defined maps lead back to the random maps.
> 
>   Can anyone suggest anything which isn't an ugly hack, for doing
> this?
> 
>   This is my idea of an ugly hack:
> 
>   1)  Copy the human-defined map to some new name.  (Allows the
> re-use of human maps in several random maps, like re-use of some
> small chapels, little shops, etc.)
> 
>   2)  Load the just-copied map, and insert an exit at the maps
> startx/starty location, which leads back to the random map.
> 
>   The ugliness of this technique offends me, can anyone come up
> with something more elegant?
> 
> Thanks,
> 
> PeterM

I think it would be reasonable to have two types of map exits.
1)  Current: path to map
2)  New: script/program to execute which returns path to new map.
Script would contain parameters and such for whichever desired
random map generator.  This should be very easy to implement via
popen then fgets then pclose.

						sdw
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]