.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 2: The Ascension Wars (http://forum.shrapnelgames.com/forumdisplay.php?f=55)
-   -   JAVA programmer? (and Win-DomMap, and some GIMP) (http://forum.shrapnelgames.com/showthread.php?t=17585)

E. Albright February 24th, 2004 09:08 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

You mean I only have to change the fopen() calls and it will work on Windows?
<font size="2" face="sans-serif, arial, verdana">Well, I had to change random/srandom to rand/srand, and maybe tweak a few other things (and I don't know, and can't currently test, if my port functions correctly, but it seems to do so), but yeah, there wasn't much to change.

[Edit: And per Leif_-'s suggestion, I changed the fopen().]

[ February 24, 2004, 19:10: Message edited by: E. Albright ]

PhilD February 24th, 2004 09:25 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by Leif_-:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">quote:</font><hr /><font size="2" face="sans-serif, arial, verdana">Originally posted by Gandalf Parker:
But the EASIEST thing Ive found is a blur.

<font size="2" face="sans-serif, arial, verdana">You might want to look at adding a bump-map to that as well. (To do that manually in Gimp copy the original map to a new layer, and create an additional empty layer. Fill the empty layer with plasma (Filter -> Render -> Clouds -> Plasma), then select the copy of the map, blur it and choose Filter -> Map -> Bump Map and use the plasma layer as the bump map.)

Next, select by colour to select the borders and capital-dots on the original map and cut these parts away from the copy. Delete the plasma map.)
</font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">OK, so now we have someone who really knows what he's talking about... cool http://forum.shrapnelgames.com/images/icons/icon7.gif

I tried to do what you said: if you check the "compensate darkening" on the bump-mapping filter, it looks nice... only, now the sea's all bumpy. I thought I'd select capital dots, plus borders, plus the sea, and invert the selection before blurring and bump-mapping, but then, the problem seems to be that colors from the unselected part still blur (which means the area around capital dots will be lighter); and, if I cut this part away, it will either blur to background, or blur to transparent if I make the background transparent.

I don't know if all this is clear...

OK, now here's what I get, starting with a dommap output with default settings except a 500x500 size...

Original dommap output

(JPG Version)



Same map after blurring and bump-mapping

(JPG Version)

What do you all think?

(The .map file, in case you like it)

PhilD February 24th, 2004 09:28 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by E. Albright:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">quote:</font><hr /><font size="2" face="sans-serif, arial, verdana">You mean I only have to change the fopen() calls and it will work on Windows?
<font size="2" face="sans-serif, arial, verdana">Well, I had to change random/srandom to rand/srand, and maybe tweak a few other things (and I don't know, and can't currently test, if my port functions correctly, but it seems to do so), but yeah, there wasn't much to change.

[Edit: And per Leif_-'s suggestion, I changed the fopen().]
</font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">OK; when someone can confirm that it runs fine, and produces viewable output, could you email me the source at: duchon (dot) philippe (at) free (dot) fr

(I'd like to reconcile the Versions, as much as possible, in case I decide to tweak features...)

Gandalf Parker February 24th, 2004 09:31 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by E. Albright:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">quote:</font><hr /><font size="2" face="sans-serif, arial, verdana">You mean I only have to change the fopen() calls and it will work on Windows?
<font size="2" face="sans-serif, arial, verdana">Well, I had to change random/srandom to rand/srand, and maybe tweak a few other things (and I don't know, and can't currently test, if my port functions correctly, but it seems to do so), but yeah, there wasn't much to change.

[Edit: And per Leif_-'s suggestion, I changed the fopen().]
</font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">OK I have Win compiled copies from both you and Leif. They both seem to work but have one strange quirk. Little loops of water border create un-capitaled water provinces. Not a big problem since the windows Version was mostly desired by people who wanted to edit the maps in paint programs anyway.

Arryn February 24th, 2004 09:31 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by E. Albright:
</font><blockquote><font size="1" face="sans-serif, arial, verdana">quote:</font><hr /><font size="2" face="sans-serif, arial, verdana">You mean I only have to change the fopen() calls and it will work on Windows?
<font size="2" face="sans-serif, arial, verdana">Well, I had to change random/srandom to rand/srand, and maybe tweak a few other things (and I don't know, and can't currently test, if my port functions correctly, but it seems to do so), but yeah, there wasn't much to change.

[Edit: And per Leif_-'s suggestion, I changed the fopen().]
</font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">The variable "near" is also a (obsolete) reserved word and I had to change that (to "nearby" http://forum.shrapnelgames.com/images/icons/tongue.gif ). The only thing blocking my compile at present is a missing def for "M_PI". Of course, I presume this is related to the value of Pi, but I don't know what the "M" is supposed to imply.

Once I have the console port in Windows compiled and working okay, then I can begin the "fun" task of rebuilding the app as a native Windows MFC app, with GUI and all the other niceties. Well, that's the plan, FWIW.

Gandalf Parker February 24th, 2004 09:35 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
OK that makes 3 in the running. http://forum.shrapnelgames.com/images/icons/icon7.gif
Anyone feel like "Source Forge"ing this project? http://forum.shrapnelgames.com/images/icons/shock.gif

Gandalf Parker February 24th, 2004 09:38 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by PhilD:
(JPG Version)

What do you all think?

<font size="2" face="sans-serif, arial, verdana">I like that. The "canvas" thing that Illwinter uses was interesting also (I think Saber Cherry recommended it in another thread) but I think I like this one better.

But I suspect this is farther away from being batch-useable than blur is. Im sure ImageMagick commands can do what I want. I just dont understand enough about masks and such.

[ February 24, 2004, 19:39: Message edited by: Gandalf Parker ]

Taqwus February 24th, 2004 09:45 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
M_PI is normally the value of PI from math.h or a subinclude. For instance, on a Linux box I've nearby, /usr/include/math.h contains
# define M_PI 3.14159265358979323846 /* pi */
(in a block of defines surrounded by an #ifdef relating to BSD).

Arryn February 24th, 2004 09:58 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Quote:

Originally posted by Taqwus:
M_PI is normally the value of PI from math.h or a subinclude. For instance, on a Linux box I've nearby, /usr/include/math.h contains
# define M_PI 3.14159265358979323846 /* pi */
(in a block of defines surrounded by an #ifdef relating to BSD).

<font size="2" face="sans-serif, arial, verdana">Thanks! My linux box is downstairs collecting (a lot of) dust. Two years worth at least.

I've gotten the code to compile and produce a map & tga. You can get the v1.94a console .exe w/ sample output from my site. If no one finds any other problems (besides the odd water loops that happen with my compile also), then I can begin the conVersion into a real Windows app. That is, assuming anyone is interested in the fancy Windows trappings (GUI, etc.) ...

[ February 24, 2004, 20:00: Message edited by: Arryn ]

Gandalf Parker February 24th, 2004 10:22 PM

Re: JAVA programmer? (and Win-DomMap, and some GIMP)
 
Not to curb your enthusiasm but so far what we have managed to do is get the DomMap from Dominions 1 to work for Dom2. There is a wish-list for this program. Many things that could be upgraded. If we wander into two code-sets it will be hard to keep up. Your choice of course.

There are also other 3rd party program requests where window-dressing (pun intended) is what is being asked for.


All times are GMT -4. The time now is 12:39 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.