Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 23 24 [25] 26 27 ... 30

Author Topic: IsoWorld - An Isometric worldmap viewer: Now at version 2.1! New map names!  (Read 396949 times)

Dotto

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #360 on: September 03, 2014, 08:24:52 pm »

I'm trying to use isoworld, but it keeps crashing when loading an exported map.
Logged

Timeless Bob

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #361 on: September 03, 2014, 11:03:47 pm »

Hi!
Few days ago I started working on a simple commandline app written in C to stitch IsoWorld tiles into one big image. There were some problems like crashes on really big pngs (LodePNG) so I'm switching to libpng. The plan is to release it as open source - need to finish libpng migration, cleanup the code, add some options (everything is harcoded right now) and other stuff.

The results so far:
Here is resized 6x6 area of a pocket world (17x17), text added in GIMP:
Spoiler (click to show/hide)
Fullsize PNG (9215x4768): http://www.mediafire.com/download/39kts4xn8uad9z4/Osmlo_Olzul.png


You need to rename them to the old naming sceme for it to work, though it's not supposed to crash.

I really need to update this to use the new names, but I'm really busy with a lot of other things.
It crashed on my end (64bit Gentoo linux) I think gdb was pointing to al_path_cstr in allegro lib - can provide backtrace if needed - but that clearly leads to new naming scheme, also there was a small error while compiling (tested with gcc 4.8.3 and 4.9.1):
Spoiler (click to show/hide)
fixed by adding c/cxx flag -fpermissive

Thank you guys for your hard work!

For really big image files ('Small' world sizes or larger), it might be good to take a cue from other atlas programs and create a "zoomed out" overview map with a grid overlay.  Each grid square could represent one of the stitched-together maps, and clicking on it would run the stitching program for that portion of the world - if each map had overlapping edges, this redundancy would allow portions of the two large maps to be joined together to show the area between the two maps as a cohesive whole as well, allowing a map-maker to center the map precisely.
Logged
L33tsp34k does to English what Picasso did to faces.

Dwarfopoly
The Luckiest Tourist EVER
Bloodlines of the Forii

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #362 on: September 04, 2014, 03:14:55 am »

Old naming scheme:

world_graphic-<kind of map>-region<#>-<world age>-<numbers, fuck if I know what they mean>.bmp

New naming scheme:

region<#>-<fucking numbers again>-<kind of map>.bmp

The important thing is the region, and the kind of map (elevation, structures, biome, etc).
Don't know about the numbers, maybe world size, age, etc
For details, just generate worlds in 34.11 and 40.11, export the maps and compare for yourselves.

Edit: If someone has the time, the relevant code appears to be in main.cpp starting at line 226

Might give it a try after I finish my IsoWorld map stitcher (probably next week unless I encounter some major problems)
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #363 on: September 10, 2014, 05:30:43 pm »

Trying to build IsoWorld on Linux (along with dfhack) gives the following error:
Spoiler (click to show/hide)
Which is weird since there is such a file, maybe a PATH problem or something?
« Last Edit: September 11, 2014, 05:49:58 am by Nopenope »
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #364 on: September 11, 2014, 05:04:45 am »

You need a Linux version of agui
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #365 on: September 11, 2014, 06:24:18 am »

After adding the header files, the error seems to have evolved:

Spoiler (click to show/hide)
Logged

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #366 on: September 11, 2014, 10:59:43 am »

After adding the header files, the error seems to have evolved:

Spoiler (click to show/hide)

You can do one of the following:
add -fpermissive to your c/cxx flags, or apply this patch
Code: [Select]
--- plugins/isoworld/MapSection.h 2014-09-11 17:47:18.331186059 +0200
+++ plugins/isoworld/MapSection.h 2014-09-09 12:12:36.000000000 +0200
@@ -32,7 +32,7 @@
  void pointToSprite(float *inx, float *iny, int inz);
  void load_heights(ALLEGRO_BITMAP * heightmap);
  void load_water_level(ALLEGRO_BITMAP * watermap);
- void MapSection::load_colors(s_maplist * map_list);
+ void load_colors(s_maplist * map_list);
  void load_level(ALLEGRO_BITMAP * levelmap, int level);
  void load_biome_tiles(s_maplist * maplist);
  void load_structure_tiles(ALLEGRO_BITMAP * structuremap);
Just save it to a file, say mapsection.patch in dfhack source directory and run patch -p0 <mapsection.patch
« Last Edit: September 11, 2014, 11:02:30 am by majiin »
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #367 on: September 11, 2014, 12:20:13 pm »

Thanks for the tip. However the error keeps evolving, even though it does seem to build further:

Spoiler (click to show/hide)
Logged

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #368 on: September 11, 2014, 12:45:23 pm »

The compilation was successful, the linking process failed. You need to modify dfhack/plugins/isoworld/CMakeLists.txt file and add agui to linker. Here is my patch:
Code: [Select]
--- plugins/isoworld/CMakeLists.txt 2014-09-11 19:32:10.998717669 +0200
+++ plugins/isoworld/CMakeLists.txt 2014-08-28 01:18:09.000000000 +0200
@@ -91,6 +92,11 @@
  allegro_image
  allegro_ttf
  ${PROJECT_LIBS}
+ /home/majiin/repos/Agui/build/libagui_allegro5.a
+ /home/majiin/repos/Agui/build/libagui.a
+ )
+ include_directories (
+ /home/majiin/repos/Agui/include
  )
  ENDIF()
  ENDIF()

Of course you need to change /home/majiin/repos/Agui/build/ and /home/majiin/repos/Agui/include to the location where you have those files. Maybe there is a simpler way to do this but this worked for me.

Edit:
You also need to set
STONESENSE_INTERNAL_SO           OFF
when configuring dfhack build so that it will pick system allegro library.
Also the above CMakeLists.txt patch may not be needed if agui/agui-dev is avaliable in your linux distro. Gentoo doesn't have it so I had to compile agui manually and link to it.
« Last Edit: September 11, 2014, 03:46:57 pm by majiin »
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #369 on: September 11, 2014, 04:01:22 pm »

Thanks, it builds properly now. Now the error is at runtime, it crashes on startup:
Code: [Select]
Starting up log window.
success.
Loading font 'isoworld/DejaVuSans.ttf'...success.
Starting main loop.
*** Error in `./isoworld/isoworld': double free or corruption (out): 0x095d8d30 ***
Aborted (core dumped)

gdb doesn't say much more...I'm probably missing something here.
For information, I made a link from isoworld/isoworld to hack/isoworld since the runisoworld bash script seems to call a program in the wrong place.

Also there's no agui-dev header files in the debian repos as far as I know, I compiled them all (in 32 bit) from https://github.com/jmasterx/Agui
« Last Edit: September 11, 2014, 04:06:51 pm by Nopenope »
Logged

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #370 on: September 11, 2014, 04:13:10 pm »

Depending on where make install installs dfhack files - you need to manually copy (at least on Gentoo) executable file from <your build directory>/plugins/isoworld/isoworld to <dfhack install directory>/isoworld/ and run isoworld by starting runisoworld script from dfhack dir. I don't know why executable file isn't copied when you do make install, probably some bug in dfhack cmake build scripts.

Edit:
It seems that dfhack installs isoworld executable into hack directory, not isoworld. Also your error is a bit odd, I don't remember seeing it.
« Last Edit: September 11, 2014, 04:21:16 pm by majiin »
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #371 on: September 11, 2014, 04:22:32 pm »

Actually it is copied to hack/isoworld and not isoworld/isoworld, so it's simply a wrong path issue I guess. However I still get the above crash on load whenever I run the runisoworld script with the correct path.
Logged

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #372 on: September 11, 2014, 05:03:10 pm »

You can try and compile dfhack as Debug instead of Release, gdb should provide more useful info, but at this point you should have isoworld up and running, that error message baffles me. Maybe some more experienced programmers can help. Please note that if you're using 64bit compiler you need to add -m32 to c/cxx flags.
If anyone wants, I will make a step-by-step tutorial how I managed to compile a working dfhack+isoworld on Linux Gentoo ~AMD64 with 64bit gcc (it will be different on other distros but still may help)

But first I need to finish my TileStitcher - almost done (today managed to crosscompile windows executable and nailed down some rare stitching bug, need to add few more commandline options). And as promised I'll TRY to add new map naming scheme to IsoWorld.

Example of TileStitcher console output (may change):
Spoiler (click to show/hide)
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #373 on: September 11, 2014, 05:11:48 pm »

Quote
Please note that if you're using 64bit compiler you need to add -m32 to c/cxx flags.

Yeah I added the relevant flags when compiling the agui and allegro libs. Also I should note that
Code: [Select]
STONESENSE_INTERNAL_SO           OFF Actually raises a library error (probably because it skips the 64 bit libraries and doesn't find the 32 bit ones) while setting it on doesn't raise anything on build time.
Logged

majiin

  • Bay Watcher
    • View Profile
Re: IsoWorld - And Isometric worldmap viewer: Now at version 2.0! Detaile maps!
« Reply #374 on: September 11, 2014, 05:20:45 pm »

Quote
Please note that if you're using 64bit compiler you need to add -m32 to c/cxx flags.

Yeah I added the relevant flags when compiling the agui and allegro libs. Also I should note that
Code: [Select]
STONESENSE_INTERNAL_SO           OFF Actually raises a library error (probably because it skips the 64 bit libraries and doesn't find the 32 bit ones) while setting it on doesn't raise anything on build time.
Well, I get the error when I have this ON, can you share what linux distro are you using? Maybe other linux users could help.
« Last Edit: September 11, 2014, 05:25:29 pm by majiin »
Logged
Pages: 1 ... 23 24 [25] 26 27 ... 30