From: David Jenkins Newsgroups: comp.os.msdos.djgpp Subject: Re: Question about making maps for tile-based games Date: Sun, 24 Aug 1997 03:39:29 +0100 Organization: None Distribution: world Message-ID: <2YA$FAAh75$zEw7u@jenkinsdavid.demon.co.uk> References: <5tnql1$ko1 AT camel12 DOT mindspring DOT com> NNTP-Posting-Host: jenkinsdavid.demon.co.uk MIME-Version: 1.0 Lines: 54 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <5tnql1$ko1 AT camel12 DOT mindspring DOT com>, Chris writes >Hello, > I am just beginning to make a tile-based >RPG using Allegro and DJGPP. I've already read many > of the tile FAQs, but I need some help with the maps. >(Please bear with me, these are newbie questions) > >Does anyone know of a good map editor that works >with Allegro? Something that I can make my maps on >and then bring them into my program? I've heard about >some, but I don't know where they are and how to get >the map files into the game. > Not sure if it's good or not :) but I started one a while ago, it's sort of 1/2 complete. Saving/loading and editing maps are possible. Look on my website (URL in sig.) for MAD. >If not, what is the next best way to get huge maps into a game? I wrote mine to use .pcx files. I'm not sure of the limitations in size of these but they're pretty big. Only real limitation is the 256 colours useable in a .pcx file, untill Allegro supports more colours that is. I also have a couple of programs which load one of the .pcx maps and scroll it around. I just load the .pcx in and getpixel the bitmap into an array. (It works. :) >If anyone could help me write a function that can translate >numbers from an integer (or character) array into tiles to be plotted >at certain places on the screen? > Are you talking about using special tiles?? Like locations of monsters, traps, etc,etc. The best way is to use two maps. (.pcx files.) 1'st map layer holds ONLY the actual terrain type of map tile, eg. colour 1=earth, 2=grass, 3=sand, 4=water. etc. 2'nd map layer holds your object locations. eg. colour 1=tree1, 2=tree2, 3=monster1, 4=monster4, 5=building1 etc. > >I hope this makes sense. Any help would be greatly appreciated. >Thanks! > >-------------- >Chris > > -- http://www.jenkinsdavid.demon.co.uk for C programmers. David Jenkins