public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* border_slide compensation problem
@ 2006-06-18 16:01 Ed Hurst-Frost
  2006-06-18 17:14 ` Lincoln Peters
  0 siblings, 1 reply; 2+ messages in thread
From: Ed Hurst-Frost @ 2006-06-18 16:01 UTC (permalink / raw)
  To: xconq7

Hello. Although I've known xconq for a very long time, I've only recently 
started developing with it. This is my first posting to this list.

I'm hoping to start (yet another) xconq revival, but I'm not going to go 
into too much detail right now, because I've got a long way to go and anyway 
I'm not sure anyone's listening.

But to find out whether there is, I'll start by asking about a possible bug 
that's been hampering me:

It's in move.c rev 1.55, line 401:
if ((dist == 2 && !border_slide_possible(u, ox, oy, x, y)) && dist > 
u_move_range(u2)) return A_ANY_TOO_FAR;

If I understand correctly, this allows a border_slide to move a unit a 
distance of 2 even if its move_range is only 1.

But I have units whose move_range is greater than 1, and this line stops 
them moving.

Wouldn't it be better written:
if (dist > u_move_range(u2) + (border_slide_possible(u, ox, oy, x, y)?1:0)) 
return A_ANY_TOO_FAR;

This helps units with a move_range over 1, however it probably doesn't 
compensate for multiple slides between ox,oy and x,y. But I don't feel I 
understand border_slides enough yet to fix it completely.

Can anyone help? 

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

* Re: border_slide compensation problem
  2006-06-18 16:01 border_slide compensation problem Ed Hurst-Frost
@ 2006-06-18 17:14 ` Lincoln Peters
  0 siblings, 0 replies; 2+ messages in thread
From: Lincoln Peters @ 2006-06-18 17:14 UTC (permalink / raw)
  To: Ed Hurst-Frost; +Cc: xconq7, xconq-developers

Ed Hurst-Frost wrote:
> This helps units with a move_range over 1, however it probably doesn't 
> compensate for multiple slides between ox,oy and x,y. But I don't feel 
> I understand border_slides enough yet to fix it completely.

Border sliding is a very awkward mechanism for movement, and I think the 
general consensus now is that it never should have existed in the first 
place.  There has to a better way to get the same results.

I'm also pretty sure that there are no games in the library that 
actually support moving a unit more than one cell in a single action, so 
I wouldn't be surprised if you found bugs there (Xconq has an 
unfortunate history of being loaded with new features that don't get 
tested until years later).


By the way, it looks like you're posting to the old site that was hosted 
by Red Hat, which has not been updated for about two years (although the 
mailing lists still function).  The Xconq project is now being hosted on 
SourceForge:

<http://sourceforge.net/projects/xconq>


-- 
Lincoln Peters
<sampln@sbcglobal.net>

The devil finds work for idle glands.

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

end of thread, other threads:[~2006-06-18 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-18 16:01 border_slide compensation problem Ed Hurst-Frost
2006-06-18 17:14 ` Lincoln Peters

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).