スクリプト/RmakeでACTゲームをつくろう / 番外 外部ツールと連携してみよう(履歴ID:209)

最終投稿者:Cdv30200 aoi icon mini aoihikawa 更新:2012/03/22 18:44:04
RmakeでACTゲームをつくろう

 番外 外部ツールと連携してみよう


  こんにちは。
 フリーデザイナープログラマー(自称)の
 簸川 葵(ひかわ あおい)と申します。


  過去のシリーズ RmakeでACTゲームをつくろう
 ACTゲームを作成しましたが、マップデータのエディトに
 苦労されている方もいらっしゃると思います。

  そこで、今回はより手軽にマップがエディトできるよう、
 外部ツールを利用してみましょう。



番外-01 外部ツールを用意する




  マップエディトに必要な外部ツールを用意します。

  今回、利用するツールは
 「Platinum」という名前のフリーソフトです。

  まずは、配布サイト からダウンロードします。
 ダウンロードが完了したら、解凍ソフトを利用して
 ファイルを開ける状態にしましょう。


  次は、ツールに読み込むマップチップ画像を用意します。
 次の2つのファイルを右クリックして保存し、
 jpeg形式のファイルに変換してください。

(1)


(2)



  それでは、実際にツールを利用して
 マップエディトを行ってみましょう。


 解凍したフォルダに含まれている、Platinum.exeを起動します。

 起動したら、新規作成でマップデータファイルを作成します。
 今回のマップ情報設定は、マップの横幅100、縦幅19、
 パーツの横幅32、縦幅32、データサイズを16ビットにします。




  マップチップ画像をマップデータに取り込みます。

 パーツウインドウの左上にある
 パーツ画面の読み込みボタンをクリックします。

 先ほど準備した、マップチップ画像を選択し、開きます。




  レイヤーを追加します。
 今回は0を背景、1をマップ、2をアイテムなどとします。

 レイヤーウインドウの左上にある
 新規レイヤー作成ボタンをクリックします。

 レイヤーを作成したら、先ほどと同様に
 レイヤー1にマップチップ画像、
 レイヤー2にキャラクターチップ画像を開きます。




  透過チップの設定を行います。
 編集、プロジェクト設定を開き、
 透明パーツを有効にするにチェックを入れます。
 透明パーツの番号は19番に設定します。




  いよいよ、マップを配置していきます。
 まずは、塗りつぶしツールを使用し
 透過チップで塗りつぶしましょう。

 編集するレイヤーを選択。
 塗りつぶすチップを選択、今回は画像右上の19番です。
 塗りつぶしツールを選択してマップを塗りつぶします。

 同様に、レイヤー1と2も19番で塗りつぶしておきましょう。



  さて、ここからマップの配置は自由に行ってかまいませんが
 注意するポイントがあります。

 まず、1つめ。
 チップを配置するレイヤーを間違えないようにしましょう。
 雲などの背景はレイヤー0
 床などのオブジェクトはレイヤー1
 敵などのオブジェクトはレイヤー2です。

 2つめ。
 敵やアイテムは左上の場所が設置場所となります。
 敵キャラクタはー64×64なので2マス×2マス
 アイテム、ゴールは64×96なので2マス×3マスの位置に
 設定する必要があります。



 3つめ。
 あまり配置しすぎると処理が重くなります。
 1画面内で表示されるパーツの数を調整しながら
 作成しましょう。


  完成したら、一度保存しておきます。
 保存したファイルはppj形式で保存され、
 次回、ppjファイルを開くことで
 再編集できるようになります。


  完成したマップデータを
 スクリプトに取り込める状態で出力しましょう。

 ファイル、書き出しを選択し、
 ファイルの種類を「CSV Text File」にします。
 ファイル名をいれたら、保存ボタンを押します。
 CSVの出力タイプを聞かれるので、
 「Type1」を選択してOKを押してください。


  出力したデータを編集します。
 先ほど作成したcsvファイルを
 テキストエディタで開いてみましょう。

 「,」で区切られた数字の列が保存されています。
 途中にある空白の行は、
 別のレイヤーに切り替わっている箇所です。
 上から順に、レイヤー0~2となっています。

 この,区切りのデータを、文字列の配列変数とする
 スクリプトに変更します。
 配列の作成はcreateArray関数でしたね。
 また、データ部分は文字列なので「"」で囲みます。
map_data = createArray()

map_data[00] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[01] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[02] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[03] = "19,19,19,19,19,19,(中略)9,19,19,19,19,19,19,19,19,19,19,19"
map_data[04] = "19,19,19,19,19,19,(中略)9,19,19,19,19,19,19,19,19,19,19,19"
map_data[05] = "19,19,19,3072,3073(中略)9,19,19,19,19,19,19,19,19,19,19,19"
map_data[06] = "19,19,19,19,19,19,(中略)19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[07] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[08] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[09] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[10] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[11] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[12] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[13] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[14] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[15] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[16] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[17] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[18] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"

map_data[00] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[01] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[02] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[03] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[04] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[05] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[06] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19"
map_data[07] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[08] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[09] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[10] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[11] = "19,19,19,19,19,19,(中略)19,19,19,19,19,19,19,19,19"
map_data[12] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19"
map_data[13] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[14] = "19,19,19,19,19,19,(中略)19,19,19,19,19,19,19"
map_data[15] = "19,19,19,19,19,19,(中略)19,19,19,19,19,19,19,19,19"
map_data[16] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19,19,19"
map_data[17] = "19,19,19,19,19,19,(中略),19,19,19,19,19,19,19,19"
map_data[18] = "6,6,6,6,6,6,6,6,6,(中略)"

item_data = createArray()

item_data[00] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[01] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[02] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[03] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[04] = "19,19,19,19,19,19(中略)19,19,19,19,19,19,19,19,19,19"
item_data[05] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[06] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[07] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[08] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[09] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[10] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[11] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[12] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[13] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[14] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[15] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,2,19"
item_data[16] = "19,19,19,19,19,19(中略),19,19,19,19,19,19,19,19,19,19"
item_data[17] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"
item_data[18] = "19,19,19,19,19,19(中略)9,19,19,19,19,19,19,19,19,19,19"



  ここまでで、スクリプトに取り込める状態の
 マップデータが完成しました。




番外-02 マップデータをスクリプトに取り込もう




  外部ツールを利用して作成したマップデータを
 スクリプトに取り込みましょう。


  それではチャプター0にて、関数の追加から。
 マップデータ設定とアイテムデータ設定の関数を
 編集したものを使用します。
#ここから↑は省略
                k = k + 1
            end
            j = j + 1
        end
        i = i + 1
    end
end

#_/_/_/_/_/_/_/_/_/_/_/_/ 追加分 _/_/_/_/_/_/_/_/_/_/_/_/
#マップを設定
def setCreateMapP(img_name, img_no, pos, set_z, map_dat)
    x = 0; y = 1; w = 2; h = 3
    set_map = createArray(); get = createArray(); set = createArray()
    get[x] = 0; get[y] = 0; get[w] = 32; get[h] = 32
    set[x] = 0; set[y] = 0; set[w] = 32; set[h] = 32
    #レイヤーが4なら当たり判定の配列を作成
    if set_z == 4
        hit_map = createArray()
    end
    i = 0; ilen = getArrayLength(map_dat)
    while i < ilen
        if set_z == 4
            hit_map[i] = createArray()
        end
        map_d = splitString(map_dat[i],",")
        j = 0; jlen = getArrayLength(map_d)
        while j < jlen
            #画像の切り出しポイントを算出
            chk = map_d[j]
            chk3 = false
            #画像の貼り付けポイントを算出
            if chk == 0
                set_map[x] = 0; set_map[y] = 0
            else
                set_map[x] = floor(chk % 256); set_map[y] = floor(chk / 256)
                if set_map[y] > 24
                    set_map[y] = set_map[y] - 25
                    chk3 = true
                end
            end
            #画像を切り出して貼り付けする
            chk = floor(chk)
            if (chk != 19) #019番目の画像の場合、画像とあたり判定をセットしない
                get[x] = set_map[x] * 32; get[y] = set_map[y] * 32
                set[x] = 32 * j; set[y] = 32 * i
                if (chk != 3603) #3603番目の画像の場合、画像をセットしない
                  setCreateSprite(img_name, img_no, get, set, set_z, getVariable(pos))
                  if set_z == 2
                      setSpriteIndependentCamera(getVariable(img_name), true)
                  end
                end
                if set_z == 4
                     hit_map[i][j] = chk
                end
            else
                if set_z == 4
                    hit_map[i][j] = 19
                end
            end
            j = j + 1
        end
        i = i + 1
    end
    if set_z == 4
      setVariable("hit_map", hit_map)
    end
    return jlen
end

#アイテム・敵を設定
def setCreateItemP(max_enemy, max_item, max_goal, map_dat)
    x = 0; y = 1; w = 2; h = 3
    enemy_count = 0; item_count = 0; goal_count = 0
    pos_enemy = "pos_enemy"; pos_item = "pos_item"; pos_goal = "pos_goal"
    set_map = createArray(); get = createArray(); set = createArray()
    i = 0; ilen = getArrayLength(map_dat)
    while i < ilen
        map_d = splitString(map_dat[i],",")
        j = 0; jlen = getArrayLength(map_d)
        while j < jlen
            #画像の切り出しポイントを算出
            chk = map_d[j]
            #画像の座標を算出
            if chk == 0
                set_map[x] = 0; set_map[y] = 0
            else
                set_map[x] = floor(chk % 256); set_map[y] = floor(chk / 256)
                if set_map[y] > 24
                    set_map[y] = set_map[y] - 25
                end
            end
            #画像を座標にセットする
            chk = floor(chk)
            if (chk != 19)
                if (chk == 0) && (enemy_count < max_enemy)
                    #敵
                    set[x] = 32 * j; set[y] = 32 * i
                    getVariable(pos_enemy)[enemy_count][x] = set[x]
                    getVariable(pos_enemy)[enemy_count][y] = set[y]
                    setSpritePos("img_enemy", getVariable(pos_enemy), enemy_count)
                    enemy_count = enemy_count + 1
                elsif (chk == 1) && (item_count < max_item)
                    #アイテム
                    set[x] = 32 * j - 16; set[y] = 32 * i
                    getVariable(pos_item)[item_count][x] = set[x]
                    getVariable(pos_item)[item_count][y] = set[y]
                    setSpritePos("img_item", getVariable(pos_item), item_count)
                    item_count = item_count + 1
                elsif (chk == 2) && (goal_count < max_goal)
                    #ゴール
                    set[x] = 32 * j - 16; set[y] = 32 * i - 4
                    getVariable(pos_goal)[goal_count][x] = set[x]
                    getVariable(pos_goal)[goal_count][y] = set[y]
                    setSpritePos("img_goal", getVariable(pos_goal), goal_count)
                    goal_count = goal_count + 1
                end
            end
            j = j + 1
        end
        i = i + 1
    end
end
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/

#当たり判定の座標を算出
def setHitMap(char_atari, map_count)
#ここから↓は省略

  基本の内容は以前に作成した
 setCreateMap、setCreateItemと変わりません。
 「,」区切りのデータを配列として取り込むために
 splitString関数が追加されています。


  次は、チャプター1にて、
 マップデータと使用する関数を変更します。
#ここから↑は省略
#敵キャラクターの設定
#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
max_enemy = 5
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/
enemy_speed = 5
enemy_w_max = 800 - 63
enemy_anime_change = 2

enemy_hit = createArray()
enemy_hit[x] = 10;          enemy_hit[y] = 10
enemy_hit[w] = 35;          enemy_hit[h] = 35
enemy_point = 100

#アイテムの設定
#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
max_item = 5
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/

#中略

#マップデータの配列を準備
#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
map_data = createArray()
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/

set_z = 2

map_bg_stno = getVariable(img_bg_name) + 1

#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
map_data[00] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[01] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[02] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[03] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,3076,3077,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[04] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,3076,3077,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[05] = "19,19,19,3072,3073,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[06] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,3072,3073,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,3074,3075,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[07] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[08] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[09] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[10] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[11] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[12] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[13] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[14] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[15] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[16] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[17] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[18] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"

setCreateMapP(img_map_name, img_no, pos_map_bg, set_z, map_data)
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/

map_bg_edno = getVariable(img_map_name) + 1

set_z = 4

#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
#マップデータを作成
map_data[00] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[01] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[02] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[03] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[04] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[05] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[06] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[07] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[08] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[09] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[10] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[11] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[12] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[13] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[14] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[15] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[16] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[17] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,2,2,2,2,3,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
map_data[18] = "6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,19,19,19,19,19,5,6,6,6,6,6,6,6,6,7,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,5,6,6,6,6,6,6,6,6,6,6,6,6"

#マップデータの設定
map_count = setCreateMapP(img_map_name, img_no, pos_map, set_z, map_data)
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/
map_max_w = map_count * 32
map_w  = map_max_w - 800

#中略

#敵・アイテム設定データ
#_/_/_/_/_/_/_/_/_/_/_/_/ 変更分 _/_/_/_/_/_/_/_/_/_/_/_/
item_data = createArray()

item_data[00] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[01] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[02] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[03] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[04] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[05] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[06] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[07] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[08] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[09] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[10] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[11] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[12] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[13] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[14] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,1,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[15] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,2,19"
item_data[16] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,0,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[17] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
item_data[18] = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"

setCreateItemP(max_enemy, max_item, 1, item_data)
#_/_/_/_/_/_/_/_/_/_/_/_/ここまで_/_/_/_/_/_/_/_/_/_/_/_/

#ここから↓は省略

  敵キャラクターとアイテムの設定に使用する値は
 自分の作成したマップで設定した
 敵キャラクター数、アイテム数にあわせます。


  スクリプト全体

  これで、完成です。
 保存、終了をして、テストプレーを行い、
 マップが変更されたか確認してみましょう。


  ゲームを公開状態にするときは、
 こちらを参考に、オープニング、エンディング、ゲームオーバーの設定も
 忘れないようにしましょう。




番外-03 おわりに


  いかがでしたでしょうか。
 このように、Rmake内の機能に
 外部ツールなどの組み合わせを加えることで
 ぐっと分かりやすく、便利にすることができます。

  それには、外部ツールの仕組みの理解や
 どうやって取り込んでいくかという工夫も
 必要になってきますが、
 十分それ以上の価値が得られるものです。

  今回までのシリーズをきっかけに、
 面白いアイデアの作品、新しいジャンルのゲームなどが
 Rmakeにて登場することを
 心より期待、応援しております。


  なお、今回のシリーズで完成したサンプルのゲームを
 公開しておりますので、実際にプレイしてみたい方は
 是非、遊んでみてください。
アクションサンプルゲーム - 【ノベルゲーム】




この記事についてご質問等がありましたら
こちらのブログ記事のコメントへご投稿、
よろしくお願いいたします。
メニュー
目次