.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)
-   -   can you speak C? fractal terrain? vga? tga? (http://forum.shrapnelgames.com/showthread.php?t=20604)

Gandalf Parker August 28th, 2004 09:23 PM

can you speak C? fractal terrain? vga? tga?
 
There is a utility called DomMap which generates random maps for Dominions (raw C code, source code available). It was written for Dominions 1 where the map images were 16 colors. A few of us have updated bits and pieces so that it works with Dom2 but there is more that I would like to see touched up.

The fractal routine sems to generate alot of variable heighth points but then it squeezes them into 16 colors. Id like to have that part "undone" and see if we cant get a vga smoothing look (I can provide visual examples of all of this if it helps). There are other things we could use but thats a main point for me.

Thufir August 28th, 2004 10:25 PM

Re: can you speak C? fractal terrain? vga? tga?
 
Probably not - but I wouldn't mind looking. I take it there is some C source to start with? And would there be a reference on fractals that the original programmer used when writing his code?

Arryn August 28th, 2004 10:38 PM

Re: can you speak C? fractal terrain? vga? tga?
 
DomMap is available for download from my site. Go have a look-see.

Thufir August 28th, 2004 10:52 PM

Re: can you speak C? fractal terrain? vga? tga?
 
Quote:

Arryn said:
DomMap is available for download from my site. Go have a look-see.

Got it - thanks. I'll check it out.

Cainehill August 29th, 2004 01:17 AM

Re: can you speak C? fractal terrain? vga? tga?
 

I'll see about taking a look, if I have the time and energy - map conVersion / extraction utilities were among the programs I developed in my previous life, albeit (because of X quirks and needing a bunch of overlays) the maps were all in 256 color mode.

PhilD August 29th, 2004 09:21 AM

Re: can you speak C? fractal terrain? vga? tga?
 
As the one who tweaked (not much more than that) dommap so as to move it from dom1 to dom2 format, I can say that the fractal algorithms are basically undocumented.

Arryn August 29th, 2004 10:26 AM

Re: can you speak C? fractal terrain? vga? tga?
 
Quote:

Gandalf Parker said:
The fractal routine sems to generate alot of variable heighth points but then it squeezes them into 16 colors. Id like to have that part "undone" and see if we cant get a vga smoothing look (I can provide visual examples of all of this if it helps).

I just took a quick peek at the code and if I'm not mistaken, the relevant code snippet that is responsible for this is to be found in the function "dump_color" in the file "targa.c" (very first function in that source file). Assuming I've correctly ID'd the responsible code segment, "fixing" it should be trivial.

Leif_- August 29th, 2004 10:30 AM

Re: can you speak C? fractal terrain? vga? tga?
 
Well, it's pretty ugly coding, and it doesn't play well with the prettifying script, but I've hacked something together. Have a look here:

http://home.Online.no/~rmoldskr/Dominions/DomMap.zip

Gandalf Parker August 29th, 2004 11:09 AM

Re: can you speak C? fractal terrain? vga? tga?
 
Quote:

Leif_- said:
Well, it's pretty ugly coding, and it doesn't play well with the prettifying script, but I've hacked something together. Have a look here:

http://home.Online.no/~rmoldskr/Dominions/DomMap.zip

Looks MUCH better to me. Thank You. Here is a quick test run on default settings.
http://www.dom2minions.com/~dominion/full_fract.jpg

Now I need to see if it messed up the #terrain code
EDITED: Ok the terrain is fine.

WHile you were in there did you happen to notice anything that would make it run alittle "nicer"? The automatic generation scripts have to be carefully scheduled on my system to avoid trying to run when other cpu/memory hogs are running.

Leif_- August 29th, 2004 11:13 AM

Re: can you speak C? fractal terrain? vga? tga?
 
I'm afraid not - I didn't really look at the inner loops in much detail. I added a third fractal map, though; which will slow things down a little.


All times are GMT -4. The time now is 12:13 PM.

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