Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiled output idea #62

Open
wziard opened this issue Nov 1, 2018 · 0 comments
Open

Tiled output idea #62

wziard opened this issue Nov 1, 2018 · 0 comments

Comments

@wziard
Copy link

wziard commented Nov 1, 2018

I currently use minetestmapper to generate tiles for a slippy map using the --geometry option to create the tiles.

For a big map, this is very inefficient, because minetestmapper will loop over all blocks (chunks?) in the whole world to generate each tile.

Generating the whole world as 1 big image and then chopping it up currently leads to crashes (in gd?) because the image gets too big. But even when fixed this would lead to very unwieldy big images.

I have some ideas about looping once over the blocks (in loadBlocks) and keeping multiple m_position arrays for different tiles, sorting the blocks into the different m_position arrays. and then afterwards call rendermap which each position array to generate the differing tiles, re-using the gd image.

However, this would add quite some new functionality, so I didn't want to jump in and just create it without first deliberating a bit about the api and implementation

I propose a new flag:
-- tiled , where wxh is the requested tile size. The size passed to --geometry (or the autodetected size) would be rounded up to a multiple of the tile size. and tile sizes must be a multiple of 16.

then we also need a convention to generate the output filenames. I'd think it would be best to keep it simple end just use an xxxx_yyyy_basename . with xxxx and yyyy the tile numbers and basename the name specified with -o. I put it at the end to not have to worry about the extension :-)

or I could use the actual coordinates in the filenames?

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants