zoukankan      html  css  js  c++  java
  • Game: Map Design Considerations 游戏地图设计指南

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

    生成的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, 1, 1},
      { 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 2, 8, 8, 8, 8, 8, 8, 4, 1, 5, 5, 6, 1},
      { 1, 5, 6, 1, 1, 1, 1, 1, 1, 5, 6, 1, 2, 8, 4, 4, 4, 4, 4, 4, 1, 7, 7, 1, 1},
      { 1, 7, 1, 1, 1, 5, 6, 1, 1, 7, 1, 1, 2, 8, 4, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1},
      { 1, 1, 1, 1, 1, 7, 1, 1, 1, 2, 2, 2, 2, 8, 4, 1, 5, 6, 1, 1, 5, 6, 1, 1, 1},
      { 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 8, 8, 8, 8, 4,10, 7, 1, 1, 1, 7, 1, 1, 5, 6},
      { 1, 1, 1, 5, 6, 1, 2, 2, 2, 2, 8, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1},
      { 1, 1, 1, 7, 1, 1, 2, 8, 8, 8, 8, 4, 1, 1, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1},
      { 1, 1, 1, 1, 1, 1, 2, 8, 4, 4, 4, 4, 1, 1, 5, 6, 1, 7, 1, 1, 1, 5, 6, 1, 1},
      { 2, 2, 2, 2, 2, 2, 2, 8, 4, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1},
      { 8, 8, 8, 8, 8, 8, 8, 8, 4, 1, 5, 6, 1, 1, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1},
      { 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1},
      { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
    
    unsigned short tile_set_2Map1BoundMapData[18][25] =
      {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
      {0,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

  • 相关阅读:
    Thrift的安装以及问题
    nodejs安装和配置
    angularjs ng-bind-html中的ng-model不生效
    设计模式之美---接口和抽象类的区别
    angular 8 不兼容IE11
    Xamarin 打包生成 Android apk 文件
    微服务的4个设计原则和19个解决方案
    RESTful API设计规范
    windows下 安装 rabbitMQ
    关于C#应用的授权认证
  • 原文地址:https://www.cnblogs.com/dyllove98/p/3237156.html
Copyright © 2011-2022 走看看