🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #23

Re: Map formats - I need help

#23
From: J. Chris Clark
Date: Thu, 29 Oct 1992 03:08
51 lines
2455 bytes
In article <82540@ut-emx.uucp>, baylor@ccwf.cc.utexas.edu (Baylor) writes...
> 
>	In ultima (Vampyr is better i think) you can go in castles that
>are small, houses that are tiny, and the world map which is huge.
> 
>	So any of you ever write or come close to finishing an Ultima/Tile
>type game? Where did you guys have problems?

Never got as far as writing one, but I've designed lots in my head!

Seriously though...
Unless I misunderstood your question, why can't you write a map file with
a little index in the front?  Something like:

int Xdimension
int Ydimension
struct MapStorageFormat

(Basically, the same way you store a bitmap...  :)

To aid with my editor idea following, you might want the header to be:

int X; int Y; int LengthOfIconLibraryName; char[] LibraryNAme; Points...

As for an editor design...
Personally, I would have an "Icon Set" file which would contain all the icons
you plan on using for this map.  Then, when you select a new file, the editor
would prompt for the dimensions, and present (via menu or icon-picklist) all
the icons you have to work with and the grid which is your map.  You then just
pick an icon and plop it down (mouse, cursor, coordinates) where you want it.

To make it fancy, you build in a way to insert and delete columns rows etc.

The icon library file would have a format like:

int NumOfIcons;
long[]  OffsetInFileToEachIcon;
srtuct Icon[];   //one for each.  

The struct for the icons would contain the bitmap (or whatever) and some
index which could be used to look up the characteristics of that icon.
(I.e.  Passable terrain, searchable object etc.)  Alternately, these
characteristics could be stored in the struct as some bit-flags.  The map
file would simply be a 2D array of the icon indexes.

So, did I totally miss the point of the question, or does this help anybody?

Chris C.

#include <disclaimer.h>
//  All opinons and typos are mine, but you're free to use them if you wish!
Technical Details
Message-ID: <28OCT199222080346@trentu.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!blaze.trentu.ca!trentu.ca!cclark
References: <82540@ut-emx.uucp>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!blaze.trentu.ca!trentu.ca!cclark
From: cclark@trentu.ca (J. Chris Clark)
Subject: Re: Map formats - I need help
Message-ID: <28OCT199222080346@trentu.ca>
News-Software: VAX/VMS VNEWS 1.41    
Sender: news@trentu.ca (USENET News System)
Organization: Trent University Computer Services Department
References: <82540@ut-emx.uucp>
Date: Thu, 29 Oct 1992 03:08:00 GMT
Lines: 52