public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* Pre-alpha version of a coating-based terrain module
@ 2004-09-21  5:43 Lincoln Peters
  2004-09-21 16:39 ` Feeling left out of the terrain talk Elijah Meeks
  2004-09-21 16:41 ` Pre-alpha version of a coating-based terrain module Eric McDonald
  0 siblings, 2 replies; 12+ messages in thread
From: Lincoln Peters @ 2004-09-21  5:43 UTC (permalink / raw)
  To: Xconq list

I've given up on implementing bodies of water as coatings (I'll make
them cell terrain), I've given up on soil composition (at least for
now), and I've re-implemented climate as cell terrain.  It's still a
rather complicated terrain module, and it has a ways to go before it's
usable, but it should offer at least a general idea of what I'm trying
to do.

You can download it at:
http://homepage.mac.com/lmpeters/omniterr.g

Right now, it's probably usable for the Xconq/GIS project, but for
anything else, the following issues need to be addressed:

1. The existing code for generating maps does not allow me to place
climate zones in a realistic manner.  Currently (though this may be
partially due to the means by which I laid out terrain), it sees nothing
wrong with placing a "tropical wet" zone right next to a "polar ice cap"
zone!  Eventually, I would also need a way to ensure that, for example,
a random map does not place a Mediterranean climate on the east coast of
a continent (Mediterranean climates are *never* found on the east coast
of anything).

2. There needs to be a synthesis method for applying coatings to terrain
when the coatings are unlikely to change over time (as would be the case
when climates and vegetation are defined as coatings).  Perhaps some way
to run the make-fractal-percentile-terrain (or a variant thereof, as per
#1) on coatings after running it on cell terrain?  (For now, I'm not
even going to consider making dynamic coatings work!)


The following issues affect the Xconq/GIS project, although they would
not necessarily preclude the use of this module for that project:

3. I opened the module in "Design" mode, since I could then apply
coatings to cells manually with little fuss.  I discovered that, when
multiple coatings exist on one cell, only the coating defined first in
the module will appear.  For example, if you apply a "savanna grass"
coating to a cell, followed by a "rain" coating, only the "savanna
grass" coating shows up on the map (both show up correctly in the text
on the "description" bar).  There needs to be a way to display multiple
coatings simultaneously on the map.

4. There need to be terrain images that would correspond to each of
these 20 different climate zones (not to mention the 8 types of
vegetation, though they tend to be specific to one or two climate
zones).  If you don't understand why, try running the module and notice
the color scheme I had to use!*

5. As soon as I put some real-world figures into the temperature
definitions, I found snow spontaneously appearing, due to the hard-coded
hack that was used to make ww2-eur-42.g work!

6. While trying to make the best of the unexpected snow, I discovered
that, when a cell is in night conditions, coatings are *not* drawn at
all.  Weird.


* Actually, I didn't try very hard to make the terrain images look
good.  At the moment, they're each basically the same color that is used
in the color-coded map I was studying while writing the GDL code, and it
didn't turn out very well.

---
Lincoln Peters
<sampln@sbcglobal.net>

A committee takes root and grows, it flowers, wilts and dies, scattering the
seed from which other committees will bloom.
		-- Parkinson


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Feeling left out of the terrain talk
  2004-09-21  5:43 Pre-alpha version of a coating-based terrain module Lincoln Peters
@ 2004-09-21 16:39 ` Elijah Meeks
  2004-09-22  0:26   ` Eric McDonald
  2004-09-21 16:41 ` Pre-alpha version of a coating-based terrain module Eric McDonald
  1 sibling, 1 reply; 12+ messages in thread
From: Elijah Meeks @ 2004-09-21 16:39 UTC (permalink / raw)
  To: Xconq list

Keep up the good work guys, I expect to shamelessly
profit from your effort in the future.

On a terrain-related note, though, I have been porting
a beautiful, quirky and interesting tileset into XConq
based on J. R. R. Tolkien's style of mapmaking.  That
means hand-drawn mountains and swamps, et cetera.  I
like it, though it will probably involve some effort
on the part of designers to make units that look right.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-21  5:43 Pre-alpha version of a coating-based terrain module Lincoln Peters
  2004-09-21 16:39 ` Feeling left out of the terrain talk Elijah Meeks
@ 2004-09-21 16:41 ` Eric McDonald
  2004-09-22  1:15   ` Lincoln Peters
  1 sibling, 1 reply; 12+ messages in thread
From: Eric McDonald @ 2004-09-21 16:41 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: Xconq list

On Mon, 20 Sep 2004, Lincoln Peters wrote:

> 1. The existing code for generating maps does not allow me to place
> climate zones in a realistic manner.  Currently (though this may be
> partially due to the means by which I laid out terrain), it sees nothing
> wrong with placing a "tropical wet" zone right next to a "polar ice cap"
> zone!  

You can at least partially deal with this with the adjacent 
terrain stuff that I added a while back ago.

> 5. As soon as I put some real-world figures into the temperature
> definitions, I found snow spontaneously appearing, due to the hard-coded
> hack that was used to make ww2-eur-42.g work!

That hack is disgusting and must go.

> 6. While trying to make the best of the unexpected snow, I discovered
> that, when a cell is in night conditions, coatings are *not* drawn at
> all.  Weird.

Sounds like a bug.

Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Feeling left out of the terrain talk
  2004-09-21 16:39 ` Feeling left out of the terrain talk Elijah Meeks
@ 2004-09-22  0:26   ` Eric McDonald
  2004-09-22  1:45     ` Lincoln Peters
  0 siblings, 1 reply; 12+ messages in thread
From: Eric McDonald @ 2004-09-22  0:26 UTC (permalink / raw)
  To: Elijah Meeks; +Cc: Xconq list

On Mon, 20 Sep 2004, Elijah Meeks wrote:

> On a terrain-related note, though, I have been porting
> a beautiful, quirky and interesting tileset into XConq
> based on J. R. R. Tolkien's style of mapmaking.  That
> means hand-drawn mountains and swamps, et cetera.  I
> like it, though it will probably involve some effort
> on the part of designers to make units that look right.

Excellent. I had always thought that it would be nice to make a 
map like that sometime. Now we just need some fancy lettering for 
things like the "Desolation of Smaug"....

Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-21 16:41 ` Pre-alpha version of a coating-based terrain module Eric McDonald
@ 2004-09-22  1:15   ` Lincoln Peters
  2004-09-22 22:39     ` Steven Dick
  0 siblings, 1 reply; 12+ messages in thread
From: Lincoln Peters @ 2004-09-22  1:15 UTC (permalink / raw)
  To: Eric McDonald; +Cc: Xconq list

On Tue, 2004-09-21 at 09:39, Eric McDonald wrote:
> On Mon, 20 Sep 2004, Lincoln Peters wrote:
> 
> > 1. The existing code for generating maps does not allow me to place
> > climate zones in a realistic manner.  Currently (though this may be
> > partially due to the means by which I laid out terrain), it sees nothing
> > wrong with placing a "tropical wet" zone right next to a "polar ice cap"
> > zone!  
> 
> You can at least partially deal with this with the adjacent 
> terrain stuff that I added a while back ago.

Actually, I ended up using the adjacent terrain stuff to generate the
climates in the first place (you may notice a terrain-type called "land"
that never appears on the map).  Although a more sophisticated
terrain-generating algorithm is still needed in order to lay out
climates in a way that's even remotely realistic.

I'll give it a try, though.

> 
> > 5. As soon as I put some real-world figures into the temperature
> > definitions, I found snow spontaneously appearing, due to the hard-coded
> > hack that was used to make ww2-eur-42.g work!
> 
> That hack is disgusting and must go.

Agreed.  Probably the best way to re-write it would be to have actual
tables to control how coatings appear due to temperature, such as:

tt_temperature-min-to-coat
tt_temperature-max-to-coat

Maybe also an interpolation list so that one could actually apply
different thicknesses to the coating, as well.


This would solve the mud/snow problem in a way that would work for both
omniterr.g and ww2-eur-42.g (although ww2-eur-42.g would need to have
the tables added to it).  It still wouldn't allow me to make the
presence or absence of coatings affected by other properties (e.g. in
extremely arid climates, it almost never snows, regardless of
temperature, because the precipitation just isn't there), but it would
be a step in the right direction.

> 
> > 6. While trying to make the best of the unexpected snow, I discovered
> > that, when a cell is in night conditions, coatings are *not* drawn at
> > all.  Weird.
> 
> Sounds like a bug.

On the other hand, as I think back to the way the colors turned out in
the terrain module, it may look even worse if all of the coatings are
drawn.

While this bug does need to be (eventually) addressed, I think I'll have
to improve the graphics before then, so that I never have to find out
how it looks with all of the coatings in place.

---
Lincoln Peters
<sampln@sbcglobal.net>

 eat Depends: cook | eat-out.
       But eat-out is non-free so that's out.
       And cook Recommends: clean-pans.
	-- Seen on #Debian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Feeling left out of the terrain talk
  2004-09-22  0:26   ` Eric McDonald
@ 2004-09-22  1:45     ` Lincoln Peters
  2004-09-22  1:59       ` Eric McDonald
  0 siblings, 1 reply; 12+ messages in thread
From: Lincoln Peters @ 2004-09-22  1:45 UTC (permalink / raw)
  To: Eric McDonald; +Cc: Xconq list

On Tue, 2004-09-21 at 09:41, Eric McDonald wrote:
> On Mon, 20 Sep 2004, Elijah Meeks wrote:
> 
> > On a terrain-related note, though, I have been porting
> > a beautiful, quirky and interesting tileset into XConq
> > based on J. R. R. Tolkien's style of mapmaking.  That
> > means hand-drawn mountains and swamps, et cetera.  I
> > like it, though it will probably involve some effort
> > on the part of designers to make units that look right.
> 
> Excellent. I had always thought that it would be nice to make a 
> map like that sometime. Now we just need some fancy lettering for 
> things like the "Desolation of Smaug"....

Perhaps you could handle the "Desolation of Smaug" with the right
combination of terrain coatings (or lack thereof), units (ruins?), and
the ability to use unusual fonts (preferably with the ability to provide
a list of fonts to fall back on, should your font of choice not exist on
the player's computer).  Of course, most of these *will* require
additional kernel code, but if I understand what you're describing, only
the font thing would require code beyond what I've proposed already.

---
Lincoln Peters
<sampln@sbcglobal.net>

Love makes fools, marriage cuckolds, and patriotism malevolent imbeciles.
		-- Paul Leautaud, "Passe-temps"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Feeling left out of the terrain talk
  2004-09-22  1:45     ` Lincoln Peters
@ 2004-09-22  1:59       ` Eric McDonald
  0 siblings, 0 replies; 12+ messages in thread
From: Eric McDonald @ 2004-09-22  1:59 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: Xconq list

Lincoln Peters wrote:

> the ability to use unusual fonts (preferably with the ability to provide
> a list of fonts to fall back on, should your font of choice not exist on
> the player's computer).  Of course, most of these *will* require
> additional kernel code, but if I understand what you're describing, only
> the font thing would require code beyond what I've proposed already.

I don't think any additional kernel code would be required. It is 
essentially GUI code.

I have eventual plans to allow game designers to specify custom fonts 
(probably in small, medium, and large sizes) for the various elements 
of the SDL interface. Currently SDL has no direct knowledge of fonts; 
the way that fonts are "emulated" is by extracting images from a file 
(see 'font.bmp' in the 'images' dir to see what I am talking about). The 
goal would be for some new GDL gvars so that one could do:
   (set ui-sdl-small-font "sdlfont-futhark-small.bmp")
   (set ui-sdl-medium-font "sdlfont-feanorean-medium.bmp")
   (set ui-sdl-large-font "sdlfont-westernesse-large.bmp")
or something like that, and then each of the UI elements that uses a 
particular sized font would then display text with those fonts. (Of 
course, runic alphabets would probably prove to be unrecognizable to 
most and certainly don't have exact English analogues, but the above was 
just for demonstration purposes.)

> Love makes fools, marriage cuckolds, and patriotism malevolent imbeciles.
> 		-- Paul Leautaud, "Passe-temps"

And France makes flaming cynics. ;-)

Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-22  1:15   ` Lincoln Peters
@ 2004-09-22 22:39     ` Steven Dick
  2004-09-23  0:10       ` Elijah Meeks
  2004-09-23  2:37       ` Eric McDonald
  0 siblings, 2 replies; 12+ messages in thread
From: Steven Dick @ 2004-09-22 22:39 UTC (permalink / raw)
  To: Xconq list

One way to maybe display multiple coatings would be to make custom
tiles for each coating
with holes in them...for instance, for grass make a cloating that is
"patchy", so you
can see the underlying tile terrain underneath.  For rain, clouds, and
snow, it could be patchy
in alternating areas, so that you could put a grass coating and a rain
coating together
and have the holes in one merge with the patches in the other.

For thick forest, you could fill the center totally with tree texture,
and leave a couple of
corners open to show other coatings/terrain...

This might only work for the larger size tiles, though.

An idea anyway.

   - Steve

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-22 22:39     ` Steven Dick
@ 2004-09-23  0:10       ` Elijah Meeks
  2004-09-23  0:46         ` Lincoln Peters
  2004-09-23  3:03         ` Eric McDonald
  2004-09-23  2:37       ` Eric McDonald
  1 sibling, 2 replies; 12+ messages in thread
From: Elijah Meeks @ 2004-09-23  0:10 UTC (permalink / raw)
  To: Steven Dick, Xconq list


> One way to maybe display multiple coatings would be
> to make custom
> tiles for each coating
> with holes in them...for instance, for grass make a
> cloating that is
> "patchy", so you
> can see the underlying tile terrain underneath.  For
> rain, clouds, and
> snow, it could be patchy
> in alternating areas, so that you could put a grass
> coating and a rain
> coating together
> and have the holes in one merge with the patches in
> the other.
> 
> For thick forest, you could fill the center totally
> with tree texture,
> and leave a couple of
> corners open to show other coatings/terrain...
> 

I think this is the best way, and I'd take it a step
farther by saying you don't need any caveats to show
the terrain underneath, except insofar as, say a
forested hill would need to be obvious.  As it stands,
a high-K-dirt hex, with a sparse-grass coating and a
dense-redwood-forest coating on top of that can look
like just the top coating, with further information
available to players in the position to gather it. 
For the most part, the top coating in this style of
terrain is the dominant terrain in our current method
and that seems to work fine for players.

Now, if the Tolkien-style map tiles works, and we can
import GIS data, does that mean we could one day have
a Tolkien-style map of, say, North America?  Maybe
complete with 'The Desolation of Pittsburgh'...




		
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-23  0:10       ` Elijah Meeks
@ 2004-09-23  0:46         ` Lincoln Peters
  2004-09-23  3:03         ` Eric McDonald
  1 sibling, 0 replies; 12+ messages in thread
From: Lincoln Peters @ 2004-09-23  0:46 UTC (permalink / raw)
  To: Elijah Meeks; +Cc: Xconq list

On Wed, 2004-09-22 at 15:39, Elijah Meeks wrote:
> > One way to maybe display multiple coatings would be
> > to make custom
> > tiles for each coating
> > with holes in them...for instance, for grass make a
> > cloating that is
> > "patchy", so you
> > can see the underlying tile terrain underneath.  For
> > rain, clouds, and
> > snow, it could be patchy
> > in alternating areas, so that you could put a grass
> > coating and a rain
> > coating together
> > and have the holes in one merge with the patches in
> > the other.
> > 
> > For thick forest, you could fill the center totally
> > with tree texture,
> > and leave a couple of
> > corners open to show other coatings/terrain...
> > 
> 
> I think this is the best way, and I'd take it a step
> farther by saying you don't need any caveats to show
> the terrain underneath, except insofar as, say a
> forested hill would need to be obvious.  As it stands,
> a high-K-dirt hex, with a sparse-grass coating and a
> dense-redwood-forest coating on top of that can look
> like just the top coating, with further information
> available to players in the position to gather it. 
> For the most part, the top coating in this style of
> terrain is the dominant terrain in our current method
> and that seems to work fine for players.

I hadn't thought of that, but I suspect that we might be able to get
away with using the existing partial implementation of the coating view
code as long as the most important coatings are defined first.  That
way, the most important one will always be the one that shows up.

> 
> Now, if the Tolkien-style map tiles works, and we can
> import GIS data, does that mean we could one day have
> a Tolkien-style map of, say, North America?  Maybe
> complete with 'The Desolation of Pittsburgh'...

I think it would work.  Of course, the terrain module needs to be able
to model 'The Desolation of Pittsburgh' in an appropriate manner.  Maybe
the omniterr.g module needs a few more coating types to represent
different kinds of pollution... (I'll worry about that later.)

---
Lincoln Peters
<sampln@sbcglobal.net>

Push where it gives and scratch where it itches.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-22 22:39     ` Steven Dick
  2004-09-23  0:10       ` Elijah Meeks
@ 2004-09-23  2:37       ` Eric McDonald
  1 sibling, 0 replies; 12+ messages in thread
From: Eric McDonald @ 2004-09-23  2:37 UTC (permalink / raw)
  To: Steven Dick; +Cc: Xconq list

Steven Dick wrote:

> One way to maybe display multiple coatings would be to make custom
> tiles for each coating
> with holes in them...for instance, for grass make a cloating that is
> "patchy", so you
> can see the underlying tile terrain underneath.  For rain, clouds, and
> snow, it could be patchy
> in alternating areas, so that you could put a grass coating and a rain
> coating together
> and have the holes in one merge with the patches in the other.
> 
> For thick forest, you could fill the center totally with tree texture,
> and leave a couple of
> corners open to show other coatings/terrain...

Interesting thought. As long as a transparency color in the coating 
images is supported, this should work.

Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pre-alpha version of a coating-based terrain module
  2004-09-23  0:10       ` Elijah Meeks
  2004-09-23  0:46         ` Lincoln Peters
@ 2004-09-23  3:03         ` Eric McDonald
  1 sibling, 0 replies; 12+ messages in thread
From: Eric McDonald @ 2004-09-23  3:03 UTC (permalink / raw)
  To: Elijah Meeks; +Cc: Steven Dick, Xconq list

Elijah Meeks wrote:

> I think this is the best way, and I'd take it a step
> farther by saying you don't need any caveats to show
> the terrain underneath, except insofar as, say a
> forested hill would need to be obvious.  As it stands,
> a high-K-dirt hex, with a sparse-grass coating and a
> dense-redwood-forest coating on top of that can look
> like just the top coating, with further information
> available to players in the position to gather it. 
> For the most part, the top coating in this style of
> terrain is the dominant terrain in our current method
> and that seems to work fine for players.

I would expect that a dense redwood coating would pretty much obscure 
any other lower coatings by virtue of not having much transparency in 
the image, except maybe along an edge to indicate things such as snow, 
as Steven suggested. In principle, I like the idea of being able to see 
all layers that one can reasonably see.

> Now, if the Tolkien-style map tiles works, and we can
> import GIS data, does that mean we could one day have
> a Tolkien-style map of, say, North America?  Maybe
> complete with 'The Desolation of Pittsburgh'...

Here there be steel mills....

Honestly, I have only been to Pittsburg once, and it was the area around 
Squirrel Hill (IIRC?), CMU*, and UPitt, and it wasn't all that bad.

Eric

* Carnegie-Mellon University, not Central Michigan University. As if 
anyone even knew the latter existed....

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-09-23  2:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21  5:43 Pre-alpha version of a coating-based terrain module Lincoln Peters
2004-09-21 16:39 ` Feeling left out of the terrain talk Elijah Meeks
2004-09-22  0:26   ` Eric McDonald
2004-09-22  1:45     ` Lincoln Peters
2004-09-22  1:59       ` Eric McDonald
2004-09-21 16:41 ` Pre-alpha version of a coating-based terrain module Eric McDonald
2004-09-22  1:15   ` Lincoln Peters
2004-09-22 22:39     ` Steven Dick
2004-09-23  0:10       ` Elijah Meeks
2004-09-23  0:46         ` Lincoln Peters
2004-09-23  3:03         ` Eric McDonald
2004-09-23  2:37       ` Eric McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).