[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] look updated

From: Andrew Sayers
Subject: Re: [glob2-devel] look updated
Date: Mon, 19 Dec 2005 00:02:07 +0000
User-agent: Mutt/1.5.11

Since I've started down this road of doing up the background tiles, I
thought I'd move on, and have a go at redoing the sand tiles.  Before I
start, This experience has taught me something I ought to share with you
all.  I don't consider myself at all artistic, and have never done
anything before more than look through the menus of the GIMP.  One of
the nicest things about working on an open source project is that it
gives you the chance to do something completely off-the-wall that you've
never done before.  With a little perseverance and some constructive
criticism, you can bootstrap a decent understanding of a topic, and I
would recommend anyone reading this that's said to themselves "I'd love
to help with Globulation 2, but I don't have <whatever skill>" to stop
making excuses and start using our community as the teaching tool that
we are.

Anyway, I've been thinking about the texture that tiles have.  As
Stephane previously mentioned, water was changed long ago.  As I
understand it, one huge tile is used for a plane of water instead of
32x32 tiles.  I love the effect of the water - it gives a feeling of an
ocean with calm waves.  On the other hand, the new grass tiles are based
on random noise, where every pixel has a slightly different hue,
unrelated to its neighbours.  Again, this seems very appropriate to me,
because that's what grass is like - every blade slightly different.
However, neither of these approaches is really applicable to sand, which
is made up of rather grainier pebbles.  After playing around some more
with different effects, here's the method I settled on:

1) Create a new 672x672 image (again, the size is important)

2) Fill it with yellow.  This colour will be the basic colour of your
sand, so choose it carefully.

3) Filters->Distorts->Mosaic.  You should play around with the settings,
but I've found it's best to have a low neatness and a tile size of 16.

4) If you look carefully, the mosaic tool messes up the right and bottom
edges of the screen, with a white or black line and some shading by it.
I don't know why it does this, but rather than fix it, shrink the canvas
size down to 640x480 with an offset of 0, so as to remove the corrupt

5) Scale the image down to 128x128 pixels.  This obscures the mosaic
nature of the image, and leaves you with just a nice gritty patch of

6) Cut the image up as before.  Well, not quite as before - I've managed
to make a slightly less ugly version of my scripts from before:

(define (my-copy-square x y from base) (gimp-rect-select from (* x 32) (* y 32) 
32 32 2 0 0) (gimp-edit-copy (car (gimp-image-get-active-drawable from))) (let* 
((image (car (gimp-image-new 32 32 RGB))) (layer (car (gimp-layer-new image 32 
32 RGB-IMAGE "foobar" 100 NORMAL-MODE))) (filename (string-append "terrain" 
(string-append (number->string (+ base (+ x (* 4 y)))) ".png")))) 
(gimp-image-add-layer image layer 0) (gimp-display-new image) (gimp-rect-select 
image 0 0 32 32 0 0 0) (gimp-edit-paste (car (gimp-image-get-active-drawable 
image)) 0) (gimp-image-flatten image) (file-png-save 1 image (car 
(gimp-image-get-active-drawable image)) filename filename 0 9 0 0 0 1 1) 
(gimp-display-delete image) ))

(define (my-copy-row y from base) (my-copy-square 0 y from base) 
(my-copy-square 1 y from base) (my-copy-square 2 y from base) (my-copy-square 3 
y from base) )

(define (my-copy-all from base) (gimp-image-undo-disable from) (my-copy-row 0 
from base) (my-copy-row 1 from base) (my-copy-row 2 from base) (my-copy-row 3 
from base) (gimp-selection-none from) (gimp-image-undo-enable from) )

(my-copy-all (aref (car (cdr (gimp-image-list))) 0) 128)

This script should work so long as you only have one image open, even if
that image isn't the first one opened in this session.  Note that the
last line starts terrain numbers from 128 instead of 0, as sand terrain
tiles start at 128.

7) Again, copy these images into ~/.glob2/data/gfx and play.

Using this method, I've created some sand tiles: (make sure to use the new grass
tiles I mentioned in my previous post too).  Personally, I'm undecided
about these tiles.  They give a real impression of a pebbly beach to
me, but I'm not sure whether the yellow is too much.  The transitions
between sand and water/grass now look very silly - they'll be the
hardest thing, so I'm leaving them until I'm happy with the two on their

Stephane: the sand/water transition is currently done with the sand
becoming transparent with water underneath.  Is it possible to do the
same with sand/grass?  Also, do you know whether Glob2 can support
partial transparency yet?

        - Andrew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]