help-liquidwar6
[Top][All Lists]
Advanced

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

Re: [Help-liquidwar6] Help making a second player locally -- did the fi


From: Christian Mauduit
Subject: Re: [Help-liquidwar6] Help making a second player locally -- did the first one get thru?
Date: Tue, 17 Nov 2009 07:35:27 +0100 (CET)
User-agent: SquirrelMail/1.4.15

Hi,

On Tue, November 17, 2009 2:51 am, Andy Armstrong wrote:
> Hi Christian,
>
> Thank you for your extended support - it is very useful and I am very
> thankful.
>
> Taking a look at the code you have highlighted - I could for instance do a
> rather bad hack - but would fix the problem by using the team colour which
> is passed into that function - and if it is a specific colour - return
> false - so it wont attack?
That's exactly it. Note that I did not test what I'm suggesting you to do,
but really, the return value of this functio (0: false, 1:true) is the
answer to the question "should I attack?". Note that the test needs *2*
input values. The team of fighters we're moving, and the team of the
fighter (if it exists) which is on the adjacent position. You certainly
don't want any any team "never to be attacked by anyone".

> As for the option on collaborate locally - will the armies split into two
> pools instead of just one then - and the armies simply follow whose
> closest?
They split in two pools.

See attached screenshot.

Have a nice day,

Christian.

PS: answering your other question, I do not really have any "development
environment". The "Makefile.am" files that ship with the game are all I
use to maintain dependencies between files and tell how to build the
binaries. I tend to only fire 3 terminals when I develop. One is in the
source tree to use commands like grep or find. One is in the build tree
just to type "make && ./src/liquidwar6". The last one runs GNU Emacs, to
edit files. Whenever I feel this is not enough, I try to simplify
something in the code and/or split into more manageable modules. I tend to
think programs which are not maintainable with this kind of crude
environment tend to be not maintainable at all. That's clearly not in the
Eclipse spirit. Note that I now and then hesitate to switch to Eclipse but
I'm so accustomed to my current practices that I didn't make the move yet.
Eclipse is very good for all I know about it (I get in touch with it at
work), and I see no reason you would not be able to edit the code with it.
Only all the "project" stuff, that is, putting files together with
Eclipse, building binaries with auto-generated Makefiles (I dunno if
Eclipse does this, I suspect it does) won't work, you'll probably have to
rely on the good ol' Makefiles, at least at the beginning. Still, I
wouldn't mind having some sort of "HOWTO hack LW6 with Eclipse". If it can
attract hackers arround ;) Note that the ./configure script does some
interesting checks on standard GNU/POSIX platforms, but it clearly happens
on MS-Windows it always does the same test and yields the same result, so
in this peculiar case, IDE-based Makefiles might work as well. My feeling
is that right now, hacking the C code is sort of real hands-in-the-dirt
work, given the fact that I regularly revamp and rewrite stuff. That's why
LW6 is still "beta", I'm still doing "heavy" hacking on it. I'm pretty
impressed you got that far, to be honest, given the fact that
documentation on the game internals is scarce.

-- 
Christian Mauduit <address@hidden> - http://www.ufoot.org/ ___ __/\__
Liquid War 6 - http://www.gnu.org/software/liquidwar6/     / _")\~ \~/
"Les amis de la vérité sont ceux qui la cherchent et non _/ /   /_ o_\
ceux qui se vantent de l'avoir trouvée" - Condorcet     (__/      \/

Attachment: 00000237.jpg
Description: JPEG image


reply via email to

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