[Top][All Lists]

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

Re: [liquidwar-user] random map generator

From: Christian Mauduit
Subject: Re: [liquidwar-user] random map generator
Date: Sat, 8 Nov 2003 11:19:49 +0100
User-agent: Mutt/1.3.28i


On Thu, Nov 06, 2003 at 02:23:17PM -0500, Redick David A wrote:
> Hiya,
> I seem to remember someone wanting a random map generator
> for liquid war but I haven't heard much about it since.
> Anyway I started to hack and got a fairly good framework.
> Source:
This is a bright idea you had! Thanks 8-)

> Currently its "pre-alpha" but it can create playable maps.
> All be it, rather boring ones.  Just random rectangles =]
> Its a stand alone program that creates bitmaps.
> Hopefully I'll be able to write some cooler functions and
> provide a interface with the liquidwar game.
mmm, well, my very short term decision was to add your program to the
current LW source tree. So it will be included in the next LW release so
that everyone can start using it if he likes - as you released your
program under the terms of the GPL this should not be a problem.

Now to be honest I'd really like to include your map generator *in* the
game so that people can click on "random map" and get one. 

AFAIK it should not be really difficult for me to make a sort of wrapper
which uses your program in Liquid War directly, since your program is
not that big and your code is (from what I've seen yet) perfectly
readable. Same can not been said from LW's core code but I'm lucky
enough to know my way through it 8-)

My idea would be to stick a button right in the middle of the "map menu"
that reads "Generate a random map" on it and another "Random map
options" button that would lead the player to another menu where one can
tune your generator.

> Compile it and play with it.  Let me know what you think.
I haven't tried all the options yet, will try to find some time to
really test all of them.
> BTW: to create and alter bitmaps in allegro I have to create
> an allegro window to get the palette.  Is there a way around
> that?  This is my first allegro program and I don't know the api
> that well.
Well, AFAIK you should do what is done in the utilities like
"liquidwarcol" stored in the ./utils directory of LW, that's to say:
install_allegro (SYSTEM_NONE, &errno, atexit);
set_color_depth (8);
set_color_conversion (COLORCONV_REDUCE_TO_256);

instead of a plain:

I had to do this for LW to compile nicely in pure console mode, which is
required by Debian for instance.

Note that I regularly have some problems with this however. Don't know
why but sometimes but when I "su" and/or wreck my X11 environnement
variables things go crazy and liquidwarcol doesn't work anymore. Doesn't
prevent me from sleeping anyway.

BTW, you might be interested by a direct CVS access to LW source code on
Savannah. Contact me if you're insterested.

OK, now what I'll do is concretely try to make a 5.6.0 or 5.5.9 release
(depends on how much I put in it) which will include the Danish
translation, the association of maps with textures (already done) and
possibly a basic wrapper for the map generator. 

The point is that to release this I need to spend some time installing
OS'es and computers since I recently fried two motherboards and need to
re-install a bunch of things. This is boring but must be done 8-)

Have a nice day,


Christian Mauduit <address@hidden>     __/\__ ___
                                        \~/ ~/(`_ \   ___                   /_o _\   \ \_/ _ \_            \/      \___/ \__)

reply via email to

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