MapMatic +2

Creating game materials? Monsters, spells, classes, adventures? This is the place!
User avatar
Solomoriah
Site Admin
Posts: 12453
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: MapMatic +2

Post by Solomoriah »

The filter would do whatever I decide it would do; I'd be writing it myself.

But the obvious thing is to do this:

1) Load each tile into Gimp
2) Add a white layer below the current image
3) Flatten the image, then add an alpha channel
4) Convert white to transparency

Here's the tricky part: Sometimes, gray areas should be partially transparent. Sometimes they should not. Certain tiles were meant to cover the border lines, for example. The white fill inside doors has to stay "solid" as does the gray fill inside things like the diagonal walls.

I'm honestly not certain how to do what you are asking, actually. The closer I look, the more complicated it seems.
My personal site: www.gonnerman.org
User avatar
Clever_Munkey
Posts: 288
Joined: Fri Sep 11, 2015 12:08 am
Location: Central California

Re: MapMatic +2

Post by Clever_Munkey »

Solomoriah wrote: Here's the tricky part: Sometimes, gray areas should be partially transparent. Sometimes they should not. Certain tiles were meant to cover the border lines, for example. The white fill inside doors has to stay "solid" as does the gray fill inside things like the diagonal walls.

I'm honestly not certain how to do what you are asking, actually. The closer I look, the more complicated it seems.
Another option might be, instead of worrying about each tile responding the same, to do vector addition with a floor at 0 and ceiling at 255. So (0,0,0,???) would become whatever color was input (or stay 0 if it was negative). (255,255,255,???) would remain 255 if the vector was positive and would become something else if it was negative. It would definitely be a bit trickier to use, but might be easier to program.

The fade tiles already alter color technically, or at least appear to. Could we get away with creating green, red, and blue fade tiles, and then just use a combination of those 4 (red, green, blue, and white) to create whatever color was desired? It would be very awkward for sure, but might work.

There is also the fall back option of having separate images for each color. The name of the PNG could just be [hexcode][normal tile name]. This might take a while, but I would be willing to put in the work.
Call me Joe. Mr. Munkey is my father.
User avatar
Solomoriah
Site Admin
Posts: 12453
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: MapMatic +2

Post by Solomoriah »

The fade tiles are partially transparent black, (0, 0, 0, 0.5) or something like that; the fill tiles are actually gray, (127, 127, 127, 1.0). This is what causes a problem... how do we colorize that properly?
My personal site: www.gonnerman.org
User avatar
Clever_Munkey
Posts: 288
Joined: Fri Sep 11, 2015 12:08 am
Location: Central California

Re: MapMatic +2

Post by Clever_Munkey »

Change all grey to (0,0,0) and then have the program set the color to (127, 127, 127, 1.0) by default? If a color was already defined in the line, then don't set it to grey.

Every tile that has grey with a black outline would lose their outline. To fix that we would have to create an image that is just the outline. Some already have this (angled walls) others don't (castle walls, window, arch, etc). Honestly I like the idea of being able to manipulate the outlines separately, but it requires more work.
Call me Joe. Mr. Munkey is my father.
User avatar
chiisu81
Posts: 4106
Joined: Fri Aug 19, 2011 3:05 pm

Re: MapMatic +2

Post by chiisu81 »

How do we view maps on +2? Right now I have to download the .map file and paste that code into +1 to get the PNG. +2 gives this error:
Traceback (most recent call last):
File "/var/www/mapmatic.basicfantasy.org/html/index.cgi", line 13, in <module>
mapmatic2.main("../lib")
File "../lib/mapmatic2.py", line 789, in main
img.save(name, "png")
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1725, in save
fp = builtins.open(filename, "w+b")
IOError: [Errno 13] Permission denied: 'maps/1536853368.59.png'
User avatar
Solomoriah
Site Admin
Posts: 12453
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: MapMatic +2

Post by Solomoriah »

Well, after I fix the permissions of the entire MapMatic +2 directory tree on the server, it all works much better...
My personal site: www.gonnerman.org
User avatar
chiisu81
Posts: 4106
Joined: Fri Aug 19, 2011 3:05 pm

Re: MapMatic +2

Post by chiisu81 »

Yes it does, thanks! 8-)
User avatar
chiisu81
Posts: 4106
Joined: Fri Aug 19, 2011 3:05 pm

Re: MapMatic +2

Post by chiisu81 »

Any (easy) way the rendered PNG can be at 200 DPI rather than 150? That seems to be the min that doesn't have any blur in LO at a full page.
User avatar
Solomoriah
Site Admin
Posts: 12453
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: MapMatic +2

Post by Solomoriah »

I chose 150 dpi as it makes sharp images at the sizes I need; rather than 200 dpi, why not change it to 300 dpi? Simply resize the final image using Gimp (or whatever image editor you use) to 200% with interpolation set to "none" and the result will be double-sized, sharp-edged little squares, just as required; just remember to set the DPI to 300 at the same time.
My personal site: www.gonnerman.org
User avatar
Solomoriah
Site Admin
Posts: 12453
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: MapMatic +2

Post by Solomoriah »

Okay, so I've updated MapMatic +2 in a couple of ways.

First, the "targets" for the rotation, flip, and mirror links are larger, so they're easier to hit. This does mean the center of the tile, where you click to add additional bits, is smaller and thus harder to hit, but I think it's a fair tradeoff.

Second, I've added targets for - (delete) and x (clear) on the left and right of the selected square. Delete removes the last tile added, while clear empties the square.
My personal site: www.gonnerman.org
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Rik Pease and 52 guests