Game: Map Design Considerations 游戏地图设计指南

时间:2022-01-14 23:04:42

依据前文伏击战场景手稿, 用Tile Studio "草草"制作出该场景的地图:

Game: Map Design Considerations 游戏地图设计指南

生成的C源码:

#ifndef _open_war_1Gfx_c
#define _open_war_1Gfx_c #ifndef _GFX_BITMAP_DATA
#define _GFX_BITMAP_DATA
/* structure with bitmap data */
typedef struct GFX_BITMAP_DATA
{
char * BitmapIdentifier;
int BitmapWidth;
int BitmapHeight;
int TileWidth;
int TileHeight;
int TileCountX;
int TileCountY;
int TransparentX;
int TransparentY;
int Sequences;
int ** SequenceData;
int * SequenceLength;
int * SequencePosition;
int * SequenceCounter; } GFX_BITMAP_DATA;
#endif #ifndef _GFX_EMPTY
#define _GFX_EMPTY
static int Empty[] = {0};
#endif /* tile sequences */ int Tiles1SeqLength[] =
{
-1
}; int Tiles1SeqPosition[0 + 1];
int Tiles1SeqCounter[0 + 1]; int * Tiles1Sequences[] =
{
Empty
}; #define Gfxtile_set_2Map1MapWidth (25)
#define Gfxtile_set_2Map1MapHeight (18) signed short tile_set_2Map1MapData[18][25] =
{{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1,
1},
{ 1, 1, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1, 1, 5, 5, 6, 1, 1, 1, 2, 3, 4, 1, 1},
{ 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 5, 6, 1, 7, 7, 1, 2, 2, 2, 2, 3, 4, 1, 1},
{ 1, 1, 5, 6, 1, 1, 1, 1, 5, 6, 1, 7, 1, 5, 6, 1, 1, 2, 8, 8, 8, 8, 4, 1, 1},
{ 1, 1, 7, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 1, 1, 1, 2, 8, 4, 4, 4, 4, 1, 1},
{ 1, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 8, 4, 1, 1, 1, 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}; /* tile sequences */ int tile_set_2SeqLength[] =
{
-1
}; int tile_set_2SeqPosition[0 + 1];
int tile_set_2SeqCounter[0 + 1]; int * tile_set_2Sequences[] =
{
Empty
}; /* tile sequences */ int objsSeqLength[] =
{
-1
}; int objsSeqPosition[0 + 1];
int objsSeqCounter[0 + 1]; int * objsSequences[] =
{
Empty
}; /* bitmap data */
const struct GFX_BITMAP_DATA GfxTiles1Bitmap =
{ "Tiles1", 320, 32, 32, 32,
10, 1, 81, 1, 0,
&Tiles1Sequences[0], &Tiles1SeqLength[0],
&Tiles1SeqPosition[0], &Tiles1SeqCounter[0]
}; const struct GFX_BITMAP_DATA Gfxtile_set_2Bitmap =
{ "tile_set_2", 320, 32, 32, 32,
10, 1, 81, 1, 0,
&tile_set_2Sequences[0], &tile_set_2SeqLength[0],
&tile_set_2SeqPosition[0], &tile_set_2SeqCounter[0]
}; const struct GFX_BITMAP_DATA GfxobjsBitmap =
{ "objs", 320, 32, 32, 32,
10, 1, 81, 1, 0,
&objsSequences[0], &objsSeqLength[0],
&objsSeqPosition[0], &objsSeqCounter[0]
}; #endif

如你也是地图制作初学者,可以看看:Game: Map Design Considerations 游戏地图设计指南,希望对你有帮助。

Enjoy~

Mars

August 4,2013

Any to share, e-me: mars.fu@foxmail.com