Re: [dcrpg-devel] DC RPG
Status: Inactive
Brought to you by:
falkkin
|
From: Colin M. <mcm...@tc...> - 2002-02-04 17:05:48
|
> Well, this is as much as I know:
> -I am assigned the map engine
> -Colin is doing the fighting engine
> -Dan is working on ... ? (I must have missed this)
I don't know what Dan is working on either... I've not heard back from him
recently. We have two new developers on the project (Atonkelton and
banandgia2), and I don't know what they'd like to work on yet.
> For start, are we just going to rip graphics from FF1 and use them? Or are
> we going to create our own?
I actually have some "open-source" map tiles, donated by a guy who's done
tiles for ZAngband... don't know what we'll do for other graphics; I don't
feel good using ripped graphics of a copyrighted game, so we might just use
abstract shapes like colored rectangles to represent some things until we get
some real art.
> And this may sound rediculous or obvious... but do we have a story plan?
Not yet. RIght now I'm only interested in the engine, not the story. I figure
it'll be time to work on story once we have the engine in a workable state.
> Should we design the maps so that they wrap around?
I think that should be a flag in the map struct itself -- some maps, like a
world map, should probably wrap around, while others, such as in-dungeon or
in-town maps, should not. Each map will probably have some global data in it,
in addition to the tile data, and we don't need to worry about being as
sparse about the data for maps, as there'll only ever be one map loaded into
memory at a time.
I'm picturing something like this (pseudo-C code):
typedef struct map {
int length, width;
tile* tiles; // 2-d array will be filled in here
int wraps; // 0 or 1
char* name;
// possibly more data as we need it
} map;
> Should we design a map size limit? If so, what should it be? (ie:
> 512x512, 1024x1024, etc)
I don't think we should build one in... the DC has 8 MB of memory (if i
remember right) so we'd currently be unable to store anything larger than
1024x1024 in main memory at a time (assuming we keep to our design criterion
of ~64 bits/tile)... however that's no reason to build an arbitrary limit in;
maybe someone would rather have the map be 4096 x 128 for some reason, or
whatever.
What I'd do is make a map "constructor" that allocates a map, and a map
"destructor" that deallocates it, something like this:
map* map_new(int length, int width) {
map* m = (map*) malloc(sizeof(map));
m->length = length;
m->width = width;
m->tiles = (tile*) malloc(length * width * sizeof(tiles));
// etc
}
void map_free(map* m) {
free(m->tiles);
free(m);
m = NULL;
}
In general I'd like a "constructor" and "Destructor" like this for any data
structure that needs to malloc() memory; it'll make memory management much
easier. (Memory leaks on the DC being quickly fatal, with only 8 MB of RAM :))
> Should we design the maps so that they HAVE to be a square matrix? Or a
> matrix at all? Or maybe just a an array of arrays?
I'd go with a rectangular matrix, as I don't see any need to have a
non-rectangular, ragged map. However, any rectangle should work, not just
squares.
- Colin
|