Marco van de Voort wrote:
I've dug up an old source that I still had lying around for years to add to
the FPC demoes with the idea to make a little Laz demo, as a pilot for
porting the other FPC games. The src is at

http://www.stack.nl/~marcov/chainsrc.zip

I however and encountered a problem (on win32) that I can't exactly
pinpoint, but suspect to be either something wrong with resizing of
components, or something that I'm doing wrong.

The game is called chainreaction (versions existed for at least C=64 and
pre-vga PC), for rules see below.

The _problem_ is when I resize the screen (to bigger), and then reinit using
the "new game" button. Everything resizes, even the events (clicking in the
playfield) work, but the playfield is only partially drawn. I can't find a
good reason for this. (see also the memo field where some debug info is
written to)

Rules:

- Two players (or more, but that is NI) take turns placing bullets on a
matrix sized playfield. Players are identified by colour
- Bullets may only be placed in matrix-cells that already have bullets of
that player, or cells without any bullets.
- If a cell reaches a certain threshold, it explodes, and bullets in the
cell are distributed evenly among all vertical and horizontal neighbours.
- If during such explosion result a bullet is added to a cell of a different
player, the ALL the bullets in the cell change players.
- The threshold is the sum of its direct vertical and horizontal
neighbouring cells. Which is 4 for cells in the bulk, 3 on the edges, and 2
in the corners.
- The winner is the first that drives the other player(s) of the screen.

I'm suspecting my rules are not 100% original. Probably one bullet should
remain in a cell after an explosion.


The game is still in a very rough state.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



known issue:
http://www.lazarus.freepascal.org/mantis/view.php?id=1713

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to