File: README

package info (click to toggle)
vgagamespack 1.3-7
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 292 kB
  • ctags: 418
  • sloc: ansic: 3,755; makefile: 79
file content (248 lines) | stat: -rw-r--r-- 9,434 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
==============
GamesPack v1.3
==============

This package contains a collection of simple games using a VGA mode
(640x480x16) and (optionally, but highly recommended) a mouse.


------------
Requirements
------------
* svgalib (tested with version 1.24).
  Some distributions (e.g. slackware) have separated the svgalib
  shared libraries from the rest of the distribution.  In these cases,
  ensure that both packages are installed.

------------
Installation
------------
* Edit the Makefile, setting/changing USEMOUSEFUNCS, NOMOUSE,
  MOUSEDEFAULTRATE, USEGETPIXEL, BINDIR, LIBDIR and PREFIX, if necessary.
  - USEMOUSEFUNCS should be set to use the mouse_ functions, rather than
    vga_setmousesupport().  This allows console switching for svgalib
    versions earlier than 1.20.  If problems are encountered with
    console switching, undefine this.  You should not need to define
    it if you are using svgalib 1.20 or later.
  - NOMOUSE removes mouse support.
  - MOUSEDEFAULTRATE changes the mouse sampling rate from the default, if
    USEMOUSEFUNCS is also defined.
  - The PREFIX is to avoid clashes with other programs with the same
    name.  I suggest using vga_ or nothing as the prefix.
  - USEGETPIXEL can be set to use the vga_getpixel() function instead of
    maintaining a shadow copy of the screen.  Thus, it will result in less
    memory being used.  For svgalib v1.24 and earlier this should not be
    used, because it doesn't work properly.  Hopefully this will work in a
    future version of svgalib.  If USEGETPIXEL is defined, screen redrawing
    is not available.  This is probably not an issue for most people.
    However, I'll look into this if/when vga_getpixel() works.
* Type 'make'.
* As root, type 'make install'.

------
Thanks
------
* Keith Pomakis <kppomaki@jeeves.uwaterloo.ca> for writing the
  Connect-4 algorithm and putting it into the public domain.  See the
  directory c4 for more information.
* Bennett Todd <bet@std.sbi.com> for writing the Othello algorithm and
  posting it to alt.sources.  See the directory othello for more
  information.
* Harm Hanemaayer <hhanemaa@cs.ruu.nl>,
  Michael Weller <eowmob@exp-math.uni-essen.de>,
  and other contributors for svgalib.
* Rob Malouf <malouf@csli.stanford.edu> for (unknowingly) contributing
  the font from dvgt (a very nice svgalib dvi viewer).
* Adam Jenkins <apj@twain.oit.umass.edu> for reporting the keyboard
  checking bug in connectN.
* Laszlo <root@light-house.gts.org> for reporting the mouse pointer
  display bug and suggesting I use less CPU time.
* Thomas Roettgers <tom@bangor.franken.de> for prompting the
  improvement in the mines losing end of game scenario, to provide
  more information.

-----
Notes
-----
* In addition to the mouse, there are keyboard shortcuts for the grey
  buttons presented on the right of the screen: n for New Game, q for Quit.
  The cursor keys will move the pointer and the return key performs the
  same function as the mouse button.  These allow you to play, even if you
  don't have a mouse.  As a bonus, the interrupt character (often ^C) also
  works.
* Console switching is enabled using the usual mechanism (Alt-Fn) if
  the programs were compiled with either USEMOUSEFUNCS or NOMOUSE
  defined, or if svgalib 1.20 or later is used.
* Screen redrawing is available using either the r key, or ^L.  This
  feature may be useful if the screen gets corrupted as a result of console
  switching.

----------
Known Bugs
----------
* None.  8-)

----------------------
Potential Improvements
----------------------
The following will invalidate compatibility with older versions of
svgalib:
* Investigate keyboard_ functions so we can use select() rather than
  polling the keyboard/mouse (this would require at least svgalib
  1.20, assuming it works).

--------
Feedback
--------
All feedback should be sent to me, Evan Harris, at evan@cs.mu.oz.au.

---------
ChangeLog
---------
1.0	19 Jul 1994	First Linux version completed:
			ConnectN v1.0, Othello v1.0, Mines v1.0
1.1	26 Jan 1995	ConnectN v1.1, Othello v1.1, Mines v1.1
1.1.1	 5 Feb 1995	ConnectN v1.1, Othello v1.1, Mines v1.1.1
1.2	18 Feb 1995	ConnectN v1.2, Othello v1.2, Mines v1.2
1.3	26 Feb 1995	ConnectN v1.3, Othello v1.3, Mines v1.3

#######################################################################

==========
Game Notes
==========

---------
Connect-N
---------

This is the standard game of Connect-4 with additional parameters to
allow the player to play Connect-3 to Connect-10 on boards varying in
size from 4x3 to 21x19.

The computer player was very well written by Keith Pomakis
<kppomaki@jeeves.uwaterloo.ca>, the interface by myself.  Keith's
original distribution can be found in the subdirectory c4.  It was
used unmodified.

Moves can be made by clicking the left mouse button (or return key)
anywhere in the column you want to put a block in.  If the board width
is less than 10, typing a number from 1 to 9 puts a block in that
column. 

The intelligence of the computer may be set to any number between 1
and 10, the default is 5.  The more intelligent it is (higher
numbers), the longer it takes to make a move.  The board size has a
similar effect.

At the default intelligence on the default board size, it takes an
acceptable period of time to think of its moves (on my 486DX33), at 3
it's really quick, at 10 it takes "forever".  On a 386 you may want
the default to be -i4, on a faster 486, perhaps -i6.  Try them and
find out.

While the computer is thinking, the only button which works is the
quit button.

Some ways of playing the game:

$ vga_connectN 			# Connect-4 on a 7x6 board
$ vga_connectN -i3 -r		# decide moves quickly, reverse player colours
$ vga_connectN -n5 -w9 -h8	# Connect-5 on a 9x8 board
$ vga_connectN -n3 -w5 -h4 -c	# Connect-3 on a 5x4 board, computer starts

I suggest making aliases for your favourite incantations (connect4,
connect5, etc).

ChangeLog:
1.0	 9 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Keyboard checking bug fixed
			Mouse pointer display bug fixed
			Less CPU used waiting for user input
1.2     18 Feb 1995	Added vga_getpixel() support to vga16.c
1.3     26 Feb 1995	Added screen redrawing

-------
Othello
-------

This is the standard game of Othello.

The computer player was written by Bennett Todd <bet@std.sdi.com>, the
interface by myself.  Bennett's original posting to alt.sources can be
found in the subdirectory othello.  I modified it quite a bit.

Moves can be made by clicking the left mouse button (or return key)
anywhere in the square you want to put a block in.

The depth to which the computer will search may be set to any number
between 1 and 9.  The default is a variable depth, which is 3 for most
of the game.  The more intelligent it is (higher numbers), the longer
it takes to make a move.  There is an upper limit of (around) 30
seconds for a computer move.  At that point, the search is terminated.
Clearly a faster processor will be able to check more positions in the
30 seconds.

While the computer is thinking, the only button which works is the
quit button.

Some ways of playing the game:

$ vga_othello -r		# reverse player colours
$ vga_othello -d5 -c		# computer starts, search depth of 5

ChangeLog:
1.0	19 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Mouse pointer display bug fixed
			Less CPU used waiting for user input
1.2     18 Feb 1995	Added vga_getpixel() support to vga16.c
1.3     26 Feb 1995	Added screen redrawing

-----
Mines
-----

This is the game of mines, sharing many similarities with the Windows
game of minesweeper, and xmines.

The availability of this game, along with vga_klondike from
vga_cardgames (available separately), makes Windows obsolete.  8-)

Moves can be made by pressing the left mouse button (or return key)
anywhere in the square you want to expose.  If it is a mine, the game
is over.

Pressing the middle mouse button (or both left and right mouse
buttons, for those with two button mice) in a square which is already
exposed will highlight all the squares around it, except those marked
with a flag, if the number of squares around it marked with a flag is
less than the number on the exposed square.  If the number of squares
around it marked with a flag is equal to (or greater than) the number
on the exposed square, the squares not marked with a flag will be
cleared.

Pressing the right mouse button (or space key) on a square will cycle
the mark on the square from nothing, to a flag, to ?, to nothing.  The
? mark does not protect you if you click on the square with the left
mouse button.

Some ways of playing the game:

$ vga_mines				# play on a 20x20 board with 100 mines
$ vga_mines -w 10 -h 10 -d 0.1		# play on a 10x10 board with 10 mines
$ vga_mines -w 8 -h 8 -d 0.16 		# minesweeper "Beginner" board
$ vga_mines -w 16 -h 16 -d 0.16		# minesweeper "Intermediate" board
$ vga_mines -w 30 -h 16 -d 0.207	# xmines, minesweeper "Expert" board

ChangeLog:
1.0	19 Jul 1994	First Linux version completed
1.1	26 Jan 1995	Mouse pointer display bug fixed
			Less CPU used waiting for user input
			Losing end of game display enhanced
1.1.1	 5 Feb 1995	Losing end of game bug fixed
1.2     18 Feb 1995	Width/height bug fixed
			Added vga_getpixel() support to vga16.c
1.3	26 Feb 1995	Fixed non-detonation bug on incorrect flag placement
			Fixed width checking bug
			Increased MAXWIDTH, BOARDWIDTH
			Added screen redrawing