I don't know. Isilkor mentioned some problems with Gtk I think.
mape isn't that useful at the moment as long as it doesn't support map scripts (when it does, it will be insanely useful again).
mape isn't that useful at the moment as long as it doesn't support map scripts (when it does, it will be insanely useful again).
> Should be insanely useful again, now :)
I couldn't use it at all :(
See bugtracker: http://bugs.openclonk.org/view.php?id=1092
The .zip file of the Win64 bit build seems to be broken - both OC snapshot and mape. The 32 bit build works :o
Do you mean you cannot open the zip archive at http://www.openclonk.org/builds/nightly/snapshots/mape-snapshot-20140805-1b425696ac-win32-amd64-mingw.zip? This works for me, I can extract its contents...
Great news!
It could not locate a syntax highlighting for Map.c for me though, and also the preview size for the map could not be increased :(
It could not locate a syntax highlighting for Map.c for me though, and also the preview size for the map could not be increased :(
Are you using the Linux version? The syntax highlighting files are stored in the mape-syntax folder, and it is searched for in these directories: ~/.mape-syntax, ./mape-syntax, ./src/mape/mape-syntax. So if you are running mape not from the repository or from the same directory where the mape-syntax folder is, it might not find it. An easy solution would be to copy the mape-syntax directory from the snapshot or from src/mape/mape-syntax to ~/.mape-syntax.
For Map.c scripts that resize the map themselves (for example Goldrush), mape will always take the size specified in Map.c, and ignore its own settings. Otherwise the preview size should work; if not maybe you can show me a script for which it doesn't and I'll take a look.
For Map.c scripts that resize the map themselves (for example Goldrush), mape will always take the size specified in Map.c, and ignore its own settings. Otherwise the preview size should work; if not maybe you can show me a script for which it doesn't and I'll take a look.
One of maps now does not work since it depends on some System.ocg script functions in the global System.ocg folder, do you include those?
No, System.ocg scripts are not included. I can probably add it, maybe you can create a bugtracker entry for it? At the moment, only Objects.ocd/Libraries.ocd/Library_Map.ocd is loaded (hardcoded).
I gave this a try; however loading most System.ocg scripts causes script errors at link time since they use identifiers that are not defined in the limited script context that mape uses, for example everything that has to do with C4Object:
Now, in principle, errors at link time could be ignored. They would not even show up when typing around in mape because these scripts are untouched. However, when actually trying to call a function which has such an unknown identifier in it, one only obtains an unhelpful "see above for details" error message.
Furthermore, linking all the System.ocg scripts seems to take quite some time (1-2s on my computer), which would basically add to the startup time of mape. Maybe not such a big deal.
The only System.ocg scripts which do not produce link time errors (and, therefore, I suppose are useful for Map.c scripts), are:
Unfortunately there is no straightforward way to find out which scripts can be loaded in which cannot that comes to my mind. Which System.ocg scripts do you actually need? Maybe we can simply hardcode a few? Do you have a suggestion how to proceed?
ERROR: unknown identifier: SetVertex (in SetVertexXY, /home/ck/devel/openclonk/planet/System.ocg/Vertices.c:12:9)
Now, in principle, errors at link time could be ignored. They would not even show up when typing around in mape because these scripts are untouched. However, when actually trying to call a function which has such an unknown identifier in it, one only obtains an unhelpful "see above for details" error message.
Furthermore, linking all the System.ocg scripts seems to take quite some time (1-2s on my computer), which would basically add to the startup time of mape. Maybe not such a big deal.
The only System.ocg scripts which do not produce link time errors (and, therefore, I suppose are useful for Map.c scripts), are:
Array.c
, ClonkControl.c
, Colors.c
, Proplists.c
.Unfortunately there is no straightforward way to find out which scripts can be loaded in which cannot that comes to my mind. Which System.ocg scripts do you actually need? Maybe we can simply hardcode a few? Do you have a suggestion how to proceed?
It wouldn't need to be hardcoded, but could be an option in the preferences.
Or we could move everything that depends on objects from System.ocg into Objects.ocd.
Or we could move everything that depends on objects from System.ocg into Objects.ocd.
Still not working unfortunately. I would propose only loading Array.c and Math.c for now. We need to clean up Math.c for this, but there are many functions which do not belong there. I can do this.
It would be good to have a function to export the create MapFg.bmp and MapBg.bmp's as well as a command line option like: ./mape foo.c --export bar (creating barFg.bmp and barBg.bmp). I can use this for my tower of despair script.
It would be good to have a function to export the create MapFg.bmp and MapBg.bmp's as well as a command line option like: ./mape foo.c --export bar (creating barFg.bmp and barBg.bmp). I can use this for my tower of despair script.
>It would be good to have a function to export the create MapFg.bmp and MapBg.bmp's as well as a command line option like: ./mape foo.c --export bar (creating barFg.bmp and barBg.bmp). I can use this for my tower of despair script.
I built a tool like this. (Well, I wanted to experiment with Rust FFI and ended up with command-line mape.) It currently doesn't export the background but that's easy to add.
I uploaded binaries for Windows and Linux here. Unfortunately, it's dynamically linked only, so it probably won't work on most distributions. The binary only depends on zlib without any GTK stuff, so it should be usable on Windows as a poor mape substitute while mape doesn't run there (is that actually still an issue?). (There's also a zoo of libstdc++ dlls because I couldn't figure out how to link that statically.)
I managed to load System.ocg now (in ocmapgen). It involves loading a hackily created compatibility script file before any System.ocg scripts. With these changes, the tool can now render most Map.c in the repository as well as the tower without changes! Those failing call GetStartupPlayerCount() or need some function or constant from the scenario script. Providing GetStartupPlayerCount() shouldn't be an issue.
Could you implement a zoom factor for the map preview, now it is just too small with typical maps around 200 x 200 pixels, with that preview size I can't see anything.
Done... at the moment it uses bilinear scaling, but that could possibly be improved.
I found another bug if I type something like this:
Draw("Tunnel-", algo);
The "-" causes mape to crash and telling me to email you :) The command line leaves me with this trace:
(mape:3490): GLib-CRITICAL **: Source ID 7500 was not found when attempting to remove it
(mape:3490): GLib-CRITICAL **: Source ID 7664 was not found when attempting to remove it
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
Draw("Tunnel-", algo);
The "-" causes mape to crash and telling me to email you :) The command line leaves me with this trace:
(mape:3490): GLib-CRITICAL **: Source ID 7500 was not found when attempting to remove it
(mape:3490): GLib-CRITICAL **: Source ID 7664 was not found when attempting to remove it
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
maikel@maikel:~/openclonk/repos/build$ ./mape
mape: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
mape: /home/maikel/openclonk/repos/src/script/C4Aul.cpp:316: C4AulFuncMap::~C4AulFuncMap(): Assertion `!FuncCnt' failed.
Aborted (core dumped)
Doesnt launch on windows (best bug report ever). Could you please fix it? :(
I don't have a Windows dev machine... Isilkor said it has to do with the GTK icon theme he's (not?) packaging with the autobuild.
Does it work when you unzip mape-gtk3-icons.zip next to mape.exe?
Sort of! :|
Program ist starting up, but selecting a folder on the left side is impossible. Error Message: "Could not open [path]: OpenRealGrpFile: Cannot open standard file".
Program ist starting up, but selecting a folder on the left side is impossible. Error Message: "Could not open [path]: OpenRealGrpFile: Cannot open standard file".
Works for me, though. However, Loading Map.c does not work, because I have no idea how to tell Mape where to find Library_Map.
It's supposed to be in Objects.ocd/Libraries.ocd/Map.ocd, with the Objects.ocd expected at the same location as the loaded Material.ocg.
It starts with the icons!
But some map script error messages are not very useful. For example, when you open a map from the Worlds folder, it will just say syntax error: see above for details. But there are no details.
Turns out, this an error you get when you refer to a variable that is not defined. In the case of the official maps, you have to define the
But some map script error messages are not very useful. For example, when you open a map from the Worlds folder, it will just say syntax error: see above for details. But there are no details.
Turns out, this an error you get when you refer to a variable that is not defined. In the case of the official maps, you have to define the
SCENPAR_MapSize
variable, before it can be rendered. But Mape doesn't tell you that, so I was puzzled art first.
Mape now works with S2 map scripts? Can I post this to /r/clonk?
I posted the news to reddit.
Should I write the blog post? Don't expect too much details on it from my side, as I don't have too much knowledge about the matter.
Should I write the blog post? Don't expect too much details on it from my side, as I don't have too much knowledge about the matter.
I made a draft, this is my first time using wordpress.
I think adding a full landscape screenshot would be cool. What would be a suitable scenario for that? Spiral was already posted on the blog. Maybe maze, but would that spoil the scenario?
I think adding a full landscape screenshot would be cool. What would be a suitable scenario for that? Spiral was already posted on the blog. Maybe maze, but would that spoil the scenario?
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill