Board index » delphi » mazes

mazes

Hey there!
Could anyone help me with a maze constructing algorithm?? I'm trying to do a
redo of the old Snipes game :)

??
<>

 

Re:mazes


Quote
Student, T.U.E. <YourN...@student.tue.nl> wrote in message

news:8cv155$abv$1@news.tue.nl...

Quote
> Hey there!
> Could anyone help me with a maze constructing algorithm?? I'm trying to do
a
> redo of the old Snipes game :)

Ooh, snipes! I remember that. Can't help you with the mazes, but where did
that program come from? I went looking for it some months back and couldn't
find it.

FP

Re:mazes


Quote
Frank Peelo wrote:

> Student, T.U.E. <YourN...@student.tue.nl> wrote in message
> news:8cv155$abv$1@news.tue.nl...
> > Hey there!
> > Could anyone help me with a maze constructing algorithm?? I'm trying to do
> a
> > redo of the old Snipes game :)

> Ooh, snipes! I remember that. Can't help you with the mazes, but where did
> that program come from? I went looking for it some months back and couldn't
> find it.

> FP

Could you please describe this game to me in a few words. Maybe in
Germany it was sold with an other name. If I translated "maze" right,
it means "Irrgarten" in german language, then I have a game named
"3-Demon" (shareware).
It was available from
PC Research, Inc.
shareware - 3D
8 Village Lane
Colts Neck, NJ 07722

It cost in 1983 $10. You also could by the source code for $50.

I hope this helps

Martin
--
 Martin Stahl
 e-mail: kram...@uplink.de
 http://www.user.uplink.de/krampus

Re:mazes


On Wed, 12 Apr 2000 00:54:48 +0200, Martin Stahl <kra...@uplink.de>
wrote:

Quote
>Frank Peelo wrote:

>> Student, T.U.E. <YourN...@student.tue.nl> wrote in message
>> news:8cv155$abv$1@news.tue.nl...
>> > Hey there!
>> > Could anyone help me with a maze constructing algorithm?? I'm trying to do
>> a
>> > redo of the old Snipes game :)

>> Ooh, snipes! I remember that. Can't help you with the mazes, but where did
>> that program come from? I went looking for it some months back and couldn't
>> find it.

>> FP

>Could you please describe this game to me in a few words. Maybe in
>Germany it was sold with an other name. If I translated "maze" right,
>it means "Irrgarten" in german language,

That'd be a maze alright. The program was, what, a 20K .COM file?
Something tiny like that. Worked in 40-column CGA text mode. Displayed
a maze in dark blue, with a sort of owl-like face representing you.
You could shoot in any of 8 directions using 4 keys under your left
hand, while your right hand worked 4 keys on the numeric keypad to
move you around the place. Scattered around the maze were boxes out of
which came blobs called "snipes" which would attempt to kill you. As
with many games the plot is simple: if it moves, shoot it, if it
doesn't move shoot it anyway. If you wipe out the snipes and the boxes
out of which they come, then you win. In some skill levels your
"bullets" bounce and you usually kill yourself; in other levels you
die if you touch the walls of the maze, and so on.

I never saw a copyright message displayed by the program, or any
acknowledgement of the authors. I have no idea where it came from,
whether it was shareware, public domain or what. Someone told me that
there was a version that worked over a network, so maybe it was a demo
from some network manufacturer. As I said, I did a wee web search some
months back to see if I could find a copy or any information about it,
but I didn't have any luck. What impressed me was that it was so
small, compared to today's games anyhow, and that it worked from
4.77MHz 8088 machines up to 386s. I'd love to know if it worked on the
faster machines we have these days, it wouldn't surprise me if it did.

FP

Re:mazes


Quote
Student, T.U.E. <YourN...@student.tue.nl> writes:
> Hey there! Could anyone help me with a maze constructing algorithm??
> I'm trying to do a redo of the old Snipes game :)

----------------------------------------------------------------------
An appropriate construction technique would depend on the "type" of
maze you are trying to create.  For mazes where there is one and only
one path from any cell to any other cell, methods for the construction
of a tree can be applied.  For example, the program below creates a
tree by making sure that every cell on row "n" has one and only one
route to row "n+1".

program maze;
const width=25; leng=12;
var  i,j,k,t,b:integer; row:array[1..1000] of integer;
function isolated (i,s:integer):boolean;
var j:integer;
begin
  isolated:=true;
  for j:=s to width do if (row[j]=row[i]) and (i<>j) then isolated:=false
end;
begin
  randomize; b:=width;
  for i:=1 to width do begin write('+--'); row[i]:=i end; writeln('+');
  for i:=1 to leng-1 do begin write('|');
    for j:=1 to width-1 do begin
      if (random(100)<=80) and (row[j]<>row[j+1]) then begin
           write('   '); t:=row[j+1];
           for k:=1 to width do if row[k]=t then row[k]:=row[j]
         end
         else write('  |')
    end;
    writeln('  |');
    for j:=1 to width do begin
      if isolated(j,1) or (random(100)<=50) then write('+  ')
         else begin write('+--'); b:=b+1; row[j]:=b end
    end;
    writeln('+');
  end;
  write('|');
  for j:=1 to width-1 do begin
    if isolated(j,j+1) then begin
         write('   ');t:=row[j+1];
         for k:=1 to width do if row[k]=t then row[k]:=row[j]
       end
       else write('  |')
  end;
  writeln('  |'); for j:=1 to width do write('+--'); write('+')
end.
----------------------------------------------------------------------
Derek Asari   bp 6...@scn.org

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:mazes


Quote
Student, T.U.E. wrote in message <8cv155$ab...@news.tue.nl>...
>Hey there!
>Could anyone help me with a maze constructing algorithm?? I'm trying to do
a
>redo of the old Snipes game :)

>??
><>

var
   m:array[0..127,0..127] of byte;
    dx,dy:array[0..3] of integer;
   xl,yl:integer;

procedure makemaze(x,y,d:integer);
var dc:integer;
    nx,ny,nx2,ny2:integer;

begin
     m[x,y]:=1;
     dc:=0;

     repeat

     d:=d and 3;

     nx:=(x+dx[d]) and 127;
     ny:=(y+dy[d]) and 127;
     nx2:=(nx+dx[d]) and 127;
     ny2:=(ny+dy[d]) and 127;

     if m[nx,ny]=0 then
        if m[nx2,ny2]=0 then begin
           m[nx,ny]:=1;
           makemaze(nx2,ny2,random(4));
        end;

     inc(d);
     inc(dc);
     until dc=4;
end;

begin
    dx[0]:=0;dx[1]:=1;dx[2]:=0;dx[3]:=-1;
    dy[0]:=-1;dy[1]:=0;dy[2]:=1;dy[3]:=0;

    for xl:=0 to 127 do
        for yl:=0 to 127 do m[x,y]:=0;

    randomize;
    makemaze(random(128),random(128),random(4));
end.

UNTESTED - ripped out of some old code.

This procedure will make a maze of size 128*128.  As it is it wraps around
off the edges to
the opposide edge but Im sure you get the gist.

Kenn

Re:mazes


YourN...@student.tue.nl (Student, T.U.E.) wrote in
<8cv155$ab...@news.tue.nl>:

Quote
>Could anyone help me with a maze constructing algorithm??

http://www.pablop.demon.co.uk/marley/maze.htm

--

Mark Vaughan
____________

Visit the Numerical Methods in Pascal web page at
http://www-rab.larc.nasa.gov/nmp/fNMPhome.htm

Re:mazes


Quote
Frank Peelo wrote:

[snipped]

Quote
> That'd be a maze alright. The program was, what, a 20K .COM file?
> Something tiny like that. Worked in 40-column CGA text mode. Displayed
> a maze in dark blue, with a sort of owl-like face representing you.
> You could shoot in any of 8 directions using 4 keys under your left
> hand, while your right hand worked 4 keys on the numeric keypad to
> move you around the place. Scattered around the maze were boxes out of
> which came blobs called "snipes" which would attempt to kill you. As
> with many games the plot is simple: if it moves, shoot it, if it
> doesn't move shoot it anyway. If you wipe out the snipes and the boxes
> out of which they come, then you win. In some skill levels your
> "bullets" bounce and you usually kill yourself; in other levels you
> die if you touch the walls of the maze, and so on.

The game you describe is not the game I mean (3-demon). In this game
you only see the way you walk, not your own face. You have to walk
through a maze and collect yellow pieces. You can not shoot, but you
have to beware of owl-like ghosts which want to kill you.
The "3-demon" program is 55 kByte "big" .EXE file with a file to store
the highscore.

Quote
> I never saw a copyright message displayed by the program, or any
> acknowledgement of the authors. I have no idea where it came from,
> whether it was shareware, public domain or what. Someone told me that
> there was a version that worked over a network, so maybe it was a demo
> from some network manufacturer. As I said, I did a wee web search some
> months back to see if I could find a copy or any information about it,
> but I didn't have any luck. What impressed me was that it was so
> small, compared to today's games anyhow, and that it worked from
> 4.77MHz 8088 machines up to 386s. I'd love to know if it worked on the
> faster machines we have these days, it wouldn't surprise me if it did.

"3-demon" worked fine at 8 MHz 8086 machine. Last night I tested it on
a 133 MHz Pentium and it worked in the same speed. (No
rocket-propelled ghosts ;-) ) If you are interested in a copy, I can
send you one. Because it is shareware there would be no licence
problem. In 1983 you could order the complete pascal source code.
Maybe the company still exist and one can have still the code.

regards

Martin
--
 Martin Stahl
 e-mail: kram...@uplink.de
 http://www.user.uplink.de/krampus

Other Threads