www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/22/22:43:21

From: "Marvin G Wise Jr" <mgwise AT seidata DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Map file
Date: Thu, 21 Jan 1999 18:37:17 -0500
Organization: University of Cincinnati, ECE/CS News Server
Lines: 39
Message-ID: <788dne$rpn$1@news.ececs.uc.edu>
References: <hIJp2.399$477 DOT 691 AT news DOT get2net DOT dk>
NNTP-Posting-Host: t11-11.ra.uc.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.0810.800
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

It's funny you should ask:) I am writing a crpg game myseld and I just
finished my map editor program.  If you'd like a copy of it let me know and
I'll send it to you.  I haven't tested it on anything other than my computer
yet, but it works fine.  My map file data is stored in a map structure:

             typedef struct
            {
               unsigned char base[SIZE][SIZE];
               unsigned char fringe[SIZE][SIZE];
               unsigned char obj[SIZE][SIZE];
               unsigned char walkable[SIZE][SIZE];
            } map;

I have SIZE defined as 128, so you could have (theoretically)   16384 tiles
(also i have my tiles set to be 32x32, but I could set both of these to
anything you might need and recompile.  Then, all you would need to do is
make a DAT file with the Grabber program containing 255 images....the first
65 images should be your base tiles, next 64 fringe tiles, the next 128
object tiles, and the last one will be used as a background image for the
various windows used in the program.

ANDERS PEDERSEN <anders_p AT get2net DOT dk> wrote in message
news:hIJp2.399$477 DOT 691 AT news DOT get2net DOT dk...
>Hi!
>I'm making a crpg using Djgpp and Allegro. I want to create a map-file
>that store the map information, but I don't know how.
>Right now i'm using something like:
>
>int map[100][100]{0,0,0,0,0,.....,}
>
>Does anybody know how to create a map-file that i can read from, and write
>to. I don't wan't a file you can edit in a text editor.
>
>Anders
>
>
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019