* display centering
@ 2003-10-10 14:46 Peter Garrone
2003-10-10 16:14 ` Eric McDonald
0 siblings, 1 reply; 5+ messages in thread
From: Peter Garrone @ 2003-10-10 14:46 UTC (permalink / raw)
To: xconq7
Hi,
When the turn is finished, the AI player does its thing off-screen so
to speak, which is all a bit boring. I have tried the following simple
patch a bit which re-centers the screen whenever the ai player does
any combat. It may not be the best fix to the problem, as sometimes
the display is disconcertingly re-centered when doing combat with
your own units. Anyway, i thought i would post it to stimulate
anyone interested.
diff -r -U 5 -p tcltk_old/tkmap.c tcltk/tkmap.c
--- tcltk_old/tkmap.c Sun Oct 5 16:40:33 2003
+++ tcltk/tkmap.c Mon Oct 6 00:47:15 2003
@@ -3531,10 +3531,11 @@ void
draw_unit_blast(Map *map, Unit *unit, int blasttype, int duration)
{
int sx, sy, sw, sh;
MapW *mapw = (MapW *) map->widget;
VP *vp = mapw->vp;
+ put_on_screen(map,unit->x,unit->y);
if (between(0, blasttype, 2)) {
if (vp->hw > 10 && !vp->isometric) {
x_xform_unit(mapw, unit, &sx, &sy, &sw, &sh);
} else {
@@ -3557,10 +3558,11 @@ draw_unit_blast(Map *map, Unit *unit, in
void
draw_cell_blast(Map *map, int x, int y, int blasttype, int duration)
{
int sx, sy, sw, sh;
MapW *mapw = (MapW *) map->widget;
+ put_on_screen(map,x,y);
if (blasttype == 3) {
xform(mapw, x, y, &sx, &sy);
sw = mapw->vp->hw; sh = mapw->vp->hh;
mapw->blastsx = sx; mapw->blastsy = sy;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: display centering
2003-10-10 14:46 display centering Peter Garrone
@ 2003-10-10 16:14 ` Eric McDonald
2003-10-10 21:22 ` Hans Ronne
2003-10-13 11:39 ` Peter Garrone
0 siblings, 2 replies; 5+ messages in thread
From: Eric McDonald @ 2003-10-10 16:14 UTC (permalink / raw)
To: xconq7
Hi again,
On Sat, 11 Oct 2003, Peter Garrone wrote:
> When the turn is finished, the AI player does its thing off-screen so
> to speak, which is all a bit boring. I have tried the following simple
> patch a bit which re-centers the screen whenever the ai player does
> any combat.
I haven't tried your patch yet, but one of my concerns would be
that things would get re-centered twice if you have follow-action
on, and are viewing an attack on one of your own units. Another
concern would be: how annoying is it if the turns are progressing
simultaneously rather than sequentially?
I certainly agree that things can get a bit boring waiting for
the AI to finish its turns. One idea would be to make the
interface more responsive to the user during that phase, perhaps
by putting in some "DoEvents" or whatever hooks into the AI code.
That way a user could review his/her strategic posture, tactical
situations, and force stats while the AI turns are progressing.
Regards,
Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: display centering
2003-10-10 16:14 ` Eric McDonald
@ 2003-10-10 21:22 ` Hans Ronne
2003-10-13 11:39 ` Peter Garrone
1 sibling, 0 replies; 5+ messages in thread
From: Hans Ronne @ 2003-10-10 21:22 UTC (permalink / raw)
To: Eric McDonald; +Cc: xconq7
>Hi again,
>
>On Sat, 11 Oct 2003, Peter Garrone wrote:
>
>> When the turn is finished, the AI player does its thing off-screen so
>> to speak, which is all a bit boring. I have tried the following simple
>> patch a bit which re-centers the screen whenever the ai player does
>> any combat.
>
>I haven't tried your patch yet, but one of my concerns would be
>that things would get re-centered twice if you have follow-action
>on, and are viewing an attack on one of your own units. Another
>concern would be: how annoying is it if the turns are progressing
>simultaneously rather than sequentially?
Yes. There is another consideration, too. In games with several sides and
many units, the game slows down to a crawl if everything the AI does
offscreen is shown. This is because the hit-unit-animations are the by far
the most time-consuming parts of the game (somehting like 95% of the total
time). I posted some profiling data on this about one year ago.
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: display centering
2003-10-10 16:14 ` Eric McDonald
2003-10-10 21:22 ` Hans Ronne
@ 2003-10-13 11:39 ` Peter Garrone
2003-10-13 15:02 ` Eric McDonald
1 sibling, 1 reply; 5+ messages in thread
From: Peter Garrone @ 2003-10-13 11:39 UTC (permalink / raw)
To: Eric McDonald; +Cc: xconq7
On Fri, Oct 10, 2003 at 11:07:40AM -0400, Eric McDonald wrote:
> Hi again,
>
> On Sat, 11 Oct 2003, Peter Garrone wrote:
>
> > When the turn is finished, the AI player does its thing off-screen so
> > to speak, which is all a bit boring. I have tried the following simple
> > patch a bit which re-centers the screen whenever the ai player does
> > any combat.
>
> I haven't tried your patch yet, but one of my concerns would be
> that things would get re-centered twice if you have follow-action
> on, and are viewing an attack on one of your own units. Another
> concern would be: how annoying is it if the turns are progressing
> simultaneously rather than sequentially?
Yes, this patch is totally unnecessary because "follow-action" does
exactly what I want to achieve, thanks. Perhaps it should be the default
for newbies such as myself.
Cheers,
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-13 14:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 14:46 display centering Peter Garrone
2003-10-10 16:14 ` Eric McDonald
2003-10-10 21:22 ` Hans Ronne
2003-10-13 11:39 ` Peter Garrone
2003-10-13 15:02 ` Eric McDonald
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).