|
|
|
|
|
August 31st, 2004, 10:19 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Leif_- said:
I've updated the DomMap.zip with the ability to turn the new shading on and off and changing the various colours through command-line parameters.
|
Very interesting. I take it for granted that the "amount of brightening" and the "amount of shading" variables refer to the range of light and the range of dark that the plains pixel colors will be shifted?
I understand the elevation reference. Whats the "shadow map" reference? Possibly something like the effect we got from using the "bumps" filter? A bit of texturizing so that the color-by-elevation was more landscapey and less smooth? (I havent played with it yet to see)
This is turning out SO nice compared to what I found in all my hunts for a random generator, that it might want to be used outside of the Dom2 community. Would it be hard to add a switch to turn off the dominion items such as capitals and borders?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
August 31st, 2004, 11:06 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Hmmm the default border color for the water provinces should probably be changed. The MapEdit tool uses red borders to find provinces. I asked and Johan says that he thinks its any color where both gg and bb are below the setting of rr. So we should be able to use red for land provinces and something like a pinkish purple for water which would look pretty good.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
August 31st, 2004, 11:12 AM
|
Sergeant
|
|
Join Date: Sep 2003
Location: Norway
Posts: 346
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Gandalf Parker said:
Very interesting. I take it for granted that the "amount of brightening" and the "amount of shading" variables refer to the range of light and the range of dark that the plains pixel colors will be shifted?[/b]
|
Pretty much, yes.
Quote:
I understand the elevation reference. Whats the "shadow map" reference? Possibly something like the effect we got from using the "bumps" filter? A bit of texturizing so that the color-by-elevation was more landscapey and less smooth? (I havent played with it yet to see)
|
The amount of shadowing in position (x,y) depends on the elevation at position (x,y). However, as the terrain in position (x,y) also depend on the elevation, this makes for rather subtle differences; since all the terrain of one type would normally be at similar elevations and thus be brightened or shaded to the same level. (For instance, since almost all low-level elevation positions will be water, you won't see much shading unless you turn on the shading of water.)
To allow for more dramatic shading/brightening, I added an additional "shadows map" which is also used to shade the colours. By changing the factors for the elevation and the shadow shading and brightening, you can change from a very subtle to a more dramatic (but less natural) shading.
Quote:
This is turning out SO nice compared to what I found in all my hunts for a random generator, that it might want to be used outside of the Dom2 community. Would it be hard to add a switch to turn off the dominion items such as capitals and borders?
|
I don't know - I haven't looked at that part of the code. My assumption is that it's pretty straight-forward, though.
__________________
"Freefall, my old nemesis! All I have to do is activate my compressed gas rocket boots and I will cheat you once again! Belt control ON!…On?" [i]Othar Trygvasson[i]
|
August 31st, 2004, 02:43 PM
|
|
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Leif_- said:
I've updated the DomMap.zip with the ability to turn the new shading on and off and changing the various colours through command-line parameters.
|
The copy of this file that I host on my website has now been updated with this Version. I also took the liberty of updating the Version number (in dommap.h) to 1.96. Please let me know if you feel that the Version number should be bumped to 2.00.
|
August 31st, 2004, 03:59 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Arryn said:
Quote:
Leif_- said:
I've updated the DomMap.zip with the ability to turn the new shading on and off and changing the various colours through command-line parameters.
|
The copy of this file that I host on my website has now been updated with this Version. I also took the liberty of updating the Version number (in dommap.h) to 1.96. Please let me know if you feel that the Version number should be bumped to 2.00.
|
Sounds good to me. Moving it into VGA I feel has fully migrated the old Dom1 Version fully into Dom2
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
August 31st, 2004, 04:06 PM
|
|
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Gandalf Parker said:
Sounds good to me. Moving it into VGA I feel has fully migrated the old Dom1 Version fully into Dom2
|
Okay, I've updated the Version number to 2.00 and updated my site accordingly.
|
August 31st, 2004, 09:17 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Hmmm I seem to be having problems getting the border to change. There were two places in the code for the border colors. Is the variable changing both?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
September 19th, 2004, 11:10 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Quote:
Gandalf Parker said:
Hmmm I seem to be having problems getting the border to change. There were two places in the code for the border colors. Is the variable changing both?
|
Hey Leif,
here is some of the code PRIOR to the Last change when you made the colors into command-line variables.
Code:
static long BORDER_COLOR_A = 0xFF0000;
static long BORDER_COLOR_B = 0xFF0000;
static long CAPITAL_COLOR = 0xFFFFFF;
/*
* Colors for each type of terrain.
*/
static long color_map[] =
{
0x32CD32, /* PLAINS DEFAULT Lime Green was C58F54 misnammed WATER */
0x4682B4, /* WATER was 4E7283 now Steel Blue */
0x5B4524, /* MOUNTAIN */
0x7CFC00, /* FARMLAND was 0xC8BE51 now LawnGreen */
0x228B22, /* FOREST was 0x708841 now Forest Green */
0x20B2AA, /* SWAMP was 34969F now Light Sea Green */
0x808080, /* TUNDRA was C4B0A4 now Gray */
0xBC8F8F, /* WASTELAND was AD9374 now Rosey Brown */
0xFF0000, /* BORDER1 was C3572C now Red */
0xFF0000, /* BORDER2 was 2C87C3 now Orange */
0xFFFFFF /* CAPITAL do NOT change this one */
};
I dont read C very well. Looking at your new code I can kindof follow what happened with the color_map variables. But I dont see where the things like "static long BORDER_COLOR_A" went to. Is this maybe why I cant seem to get the border colors to accept?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
September 21st, 2004, 12:49 PM
|
Sergeant
|
|
Join Date: Sep 2003
Location: Norway
Posts: 346
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: can you speak C? fractal terrain? vga? tga?
Hmm. It works for me. Are you sure you're using the latest code? Except that the land and sea colours are reversed, there doesn't seem to be a problem in setting them from the command line.
__________________
"Freefall, my old nemesis! All I have to do is activate my compressed gas rocket boots and I will cheat you once again! Belt control ON!…On?" [i]Othar Trygvasson[i]
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|