help-liquidwar6
[Top][All Lists]
Advanced

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

Re: [Help-liquidwar6] Re: Questions about graphic


From: Christian Mauduit
Subject: Re: [Help-liquidwar6] Re: Questions about graphic
Date: Sat, 02 Sep 2006 23:31:01 +0200
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051019)

Hi,

Back from vacation, finally 8-) 've been coding on evenings, but I was
offline (unbelievable, I stayed totally offline 4 weeks...).

Kasper Hviid a écrit :
> The logical 356 x 508 has an aspect ratio of about 2.8 x 4. This is a
> bit smaller than the standard 3 x 4 aspect ratio for the screen. This
> would be good if the standard game should have the HUD at the top or
> the bottom of the screen. But is the size and aspect ratio of the
> logical 356 x 508 something that has been carefully thought through,
> or is it just "for the moment"?
> What I'm after with all this, is what size and proportions the level
> graphic should have. I know the proportions will change after the
> players HUD settings, but I want to create graphic so it have the
> right proportions with the standard HUD settings.
I understand your situation, before creating graphics, you need to know
what are the requisites. Well, I'm a little embarassed since I'm trying
to do my best so that there are as few requisites as possible.
Basically, any 4x3 map will fit (be it 320x240, 200x150, whatever...).
Square and moderately flat maps with a ratio up to 2/1 should fit too.

In LW6, there are 3 steps when rendering a map.

First is a background. You could even forget it, this is pure eye candy.
There are 4 background themes (water, earth, air, fire) and each themes
comes with default colors.

Then the map is drawn. The first map renderer I'm coding, the simplest
one, displays a "floating" map in the middle of the screen, resized so
that it keeps it width/height ratio but fits 90% of the screen on its
longest edge. Whatever it does, does not really matter, the point is
that the map renderer is just something separated from the rest, and one
could code another for other purposes. I mean, this one is developped,
and works, should any player/map designer need something else, I'd
better code another one that modify the existing one. The thing I'm
after is being able to make the player play one a 3D sphere or a moebius
ring or such things. Think of a chess game, you would have a simple bare
2D view, a "war room" design with a complete hud, and a fancy 3D view
just to enjoy your 3D hardware 8-) That's the kind of things I'm after.

Third, there's the menu over it, but this is a secondary, uninteresting
aspect.

As a(n intermediate) conclusion, I'd say, if you have a nice idea for a
hud -> go ahead. By default, I will personnally go for the simplest
solution:
- fill tubes with colors on the right side to represent the strenght of
each army
- display various informations such as time left, network messages, at
the bottom
- keep the ratio of the free area (the area available to display the
map) to 4/3 so that I don't break things, and that operations such as
"switch hud on/off" can be handled smoothly.

Also think that a floating hud (think of Quake 3 ammos & health)
displayed with transparency over the map is perfectly feasible too.
That's a nice option (probably the one I'll choose if left alone) to
keep a 4/3 ratio...

> I'm not sure how the themes works. If I create a texture.png, how will
> it be affected by the theme?
For now, it's not affected, the theme concerns the background, the
menus, and possibly some colors in the cursors, but the map itself are
not affected. It's the responsability of the map designer to have its
map fit with the theme. Or, put in another way, the map designer can
just pick the theme that fits best with its map once he's designed it,
knowing that water theme is blueish, air is white/clear, fire is read
and fierce and earth is well, muddy? 8-)

But well, this should be much clearer when "meat" will be here, I mean
up and running code 8-) I could take some screenshots from the current
work in progress, to save you the hassle of compiling all this.

> I think a nice feature (In non-network games) is to be able to let the
> 356 x 508 be replaced with the current screen size, so 1 logical px =
> 1 px.
Mmm, yeah, resizing the logical map according to display capacities. Is
that what you mean? I didn't think about it but I like the idea.

> I have an idea, which was originally intended for a minigolf game: Let
> it be possible to define properties for certain colors in map.png,
> with a config.txt file:
> 
> COLOR = #00FF01
>  RESISTANCE = 12
>  WALL = FALSE
>  WARRIOROPACITY = 50
> 
> COLOR = #000000
>  WALL = TRUE
>  GRAVITY = 20
Mmm, I'd personnally stick to my idea of having the light/dark threshold
to decide wether there's a wall or not. The problem with assigning
properties to colors is that you can't handle cases when a given square
must have 2 properties. Take your example, you have 4 parameters:
- RESISTANCE
- WALL
- WARRIOROPACITY
- GRAVITY
if each parameter can have 10 values (but for wall), that's already 2000
colors you'll need for all combinations. The idea in the current LW6
implementation is to have 4 png files:
- map.png (you could also name this one wall.png)
- resitance.png
- warrioropacity.png
- gravity.png
and read gray information from them (but you can draw them in blue red
or yellow if you find it more convenient).
As of today, only "map.png" (ie walls) is read, but the idea is:
whenever there's a new property, make a new png file which represents
it. If the map designer wants a global view of all the properties, let
him use layers in Gimp or run the game.

As a side note, there's already a text file associated with each map to
specify various properties, if you read the file:
./data/map/alpha$ cat pure-fight/param.xml
it contains:
----8<------------------------------------------------------
<?xml version="1.0"?>
<lw6mapparam>
  <string key="background-style" value="fire" />
  <string key="menu-style" value="cylinder" />
  <string key="view-style" value="simple" />
</lw6mapparam>
----8<------------------------------------------------------
It's XML foolishery, but basically it's a file that comes with each map
and can overide any built-in default. Typically, the strength of each
fighter, the speed at which their forces decrease when they are
attacked, could be overrided here.

Have a nice day,

Christian.

-- 
Christian Mauduit <address@hidden>     __/\__ ___
                                        \~/ ~/(`_ \   ___
http://www.ufoot.org/                   /_o _\   \ \_/ _ \_
http://www.ufoot.org/ufoot.pub (GnuPG)    \/      \___/ \__)




reply via email to

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