File: curses-sect.texi

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (201 lines) | stat: -rw-r--r-- 7,647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
@node Introduction to curses Xconq, Playing curses Xconq, Playing Xconq, Playing Xconq

@section Introduction to curses Xconq

@i{cconq} is a version of @i{Xconq}
that requires only an ASCII terminal
and a @i{curses} library for cursor movement and screen management.
As a result, it will run almost anywhere.

@c including DOS - should try to build it under go32 or some such

However, in exchange for this higher degree of portability,
you lose a lot in display power, and games may become much more
difficult to play.  For instance, roads and rivers cannot be
represented directly, and you will have to rely on the textual
displays to see which directions have them.

(Incidentally, this curses interface is the oldest one in Xconq,
predating even the X10 interface that was part of version 1's
release in 1987.)

@menu
* Installing curses Xconq::
* Playing the Introductory Game with curses Xconq::  
@end menu

@node Installing curses Xconq, Playing the Introductory Game with curses Xconq, Introduction to curses Xconq, Introduction to curses Xconq

@subsection Installing curses Xconq

The usual @samp{make} and @samp{make install} will generate and install
the executable and library into @file{usr/games/bin} and
@file{usr/games/lib/xconq}, respectively.  (See the file @file{INSTALL}
in the main source directory for more detailed instructions.)

The name of the executable is @file{cconq}.

@node Playing the Introductory Game with curses Xconq, , Installing curses Xconq, Introduction to curses Xconq

@subsection Playing the Introductory Game with curses Xconq

To begin an introductory game, give the command @samp{cconq -g intro}.

@node Playing curses Xconq, Troubleshooting curses Xconq, Introduction to curses Xconq, Playing Xconq

@section Playing curses Xconq

@menu
* curses Xconq Command Line Options::
* curses Xconq Screen::
* curses Xconq Commands::
@end menu

@node curses Xconq Command Line Options, curses Xconq Screen, Playing curses Xconq, Playing curses Xconq

@subsection curses Xconq Command Line Options

The command options are as for X11 Xconq (see @xref{Xconq Command Options}),
except that the X-specific options will not be recognized.

@node curses Xconq Screen, curses Xconq Commands, curses Xconq Command Line Options, Playing curses Xconq

@subsection curses Xconq Screen

When @file{cconq} starts up, it takes over the whole screen,
in the usual fashion of curses programs.

The layout is generally similar to the appearance of the X11
map window.  Some changes were dictated by the need to fit
everything into the standard 24x80 terminal screen
(@file{cconq} can use a bigger or smaller screen
if necessary though).

@example
Your town Drumheller will build 99 armor                     Turn   1

your town Drumheller  HP 20  ACP 0/1       |1*  83%/6   Brazilians (term)
In desert(Elev 1825) road/NE at 12,12      |2  100%     Japanese ()
Occ 1 a                                    |-Sides------------------------
fuel 500/500  ammo 200/200                 | *1 Hooker             1w
                                           | *1 Joe Batt's Arm     1w
   ?   ?   ?   ? ++++....  ?   ?   ?   ?   | *1 East Missoula      1w
                ^#+#......                 |**1 Drumheller           
 ?   ?   ?   ? ^#+#+#......  ?   ?   ?   ? | *1 Nirmal             1w
              ^^^^*1@@1......               | @@1 Wonthaggi          1w
   ?   ?   ?   ^^^^*1==....?   ?   ?   ?   |
                ^^^^+#*1....               |
     ?   ?   ?   ^^^^*1+#*1..?   ?   ?   ? |
                  ^#^^~~+#++..             |
       ?   ?   ?   ^#~~~~++++  ?   ?   ?   |
                                           |
         ?   ?   ?   ?   ?   ?   ?   ?   ? |
                                           |
           ?   ?   ?   ?   ?   ?   ?   ?   |
                                           |
             ?   ?   ?   ?   ?   ?   ?   ? |
                                           |
--Map--Survey----(units)-------------------|-Units--ALL---by side---------
@end example

The main display is the map, which is in the lower left.  It uses game-defined
characters to represent units and terrain - in the above example, @code{'..'},
@code{'++'}, etc represent sea, land, and so forth respectively.  Units appear
as a character for the type (@code{'*'} is a town) followed by a decimal digit
indicating the side.  Unknown terrain is a combination of blanks and question
marks, while the presence of borders and connections is flagged by a @code{'#'}.

Above the map is a textual description of the currently selected unit and its
current location.

At the top is a couple of lines for notices of events and feedback from commands.

The turn or date appears in the top right corner, while below it is a list of
the sides, their numbers as appearing on the map, and their progress in the turn.
Also, the side being displayed has the display @code{term}.

Below that is a list area, which you can use to display a list of actual units,
or a summary of the numbers of each type that you have.

Interaction and display modes appear on the bottom line of each major subwindow.
The map window indicates survey/move modes, as well as the kinds of optional
data being displayed, while the list window indicates units/types, selectivity
(all or only some units), and sorting of the list.

@node curses Xconq Commands,  , curses Xconq Screen,  Playing curses Xconq

@subsection curses Xconq Commands

The following are single-character commands specific to curses Xconq.

@table @code

@item @code{ _ }
(@code{set-info-lines}) Set number of lines in info window.
This command sets the number of lines used by the unit info
window above the map.  The default is 4, which is insufficient
to display the plan's tasks, or all of the supplies in games
with many kinds of materials.  The prefix argument is the
number of lines.

@item @code{ v }
(@code{list-view}) Set list view.

@item @code{ > }
(@code{grow}) Grow the map.
This increases the amount of screen used by the map and decreases the
amount used by the lists.
The prefix argument is the number of columns to change; its default
value is 5.

@item @code{ < }
(@code{shrink}) Shrink the map.
This decreases the amount of screen used by the map and increases the
amount used by the lists.
The prefix argument is the number of columns to change; its default
value is 5.

@end table

The following are long-name commands; use @code{'o'} to enter them.

@table @code

@item @code{run}
Run continuously for several turns.
By default, you must manually end each turn.
This command allows you to set the number of turns that will
auto-finish.  Note that if the AI is controlling your side,
and turns auto-finish, you will not be able to do any of sort
of input, even to look around, unless the AI allows for it
(by giving one or more units a @code{passive} plan).

@item @code{show}
Show/hide elements of the map.
The arguments to this command enable and disable various features of the
map display.  You may prefix any of the arguments with @code{!} or @code{no}
to achieve the opposite of the usual effect.

@code{terrain}, @code{t}
Display or blank out the terrain.

@code{unit}, @code{u}
Display or blank out the units.

@code{name}, @code{n}
Display or blank out the names of features and units.

@code{people}, @code{p}
Display or blank out people.

@code{one}, @code{1}, @code{two}, @code{2}
Display the terrain character in one or two character positions of each
displayed cell.

@end table

@node Troubleshooting curses Xconq, , Playing curses Xconq, Playing Xconq

@section Troubleshooting curses Xconq

Screen gets messed up on Sun4, for reasons I don't understand.