hlwrld1
This commit is contained in:
19
res/maps/map_editor.py
Normal file
19
res/maps/map_editor.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import json
|
||||
from copy import deepcopy
|
||||
|
||||
width = 10
|
||||
height = 8
|
||||
|
||||
grass_def = {"id": "1", "name": "2", "sprite": "grass_small.png"}
|
||||
cell_def = {"type": "Ground", "cell": {"terrain_obj": grass_def, "creature_obj": {}, "item_obj": {}}}
|
||||
|
||||
out = {}
|
||||
|
||||
for i in range(0, height):
|
||||
buff = []
|
||||
for j in range(0, width):
|
||||
buff.append(deepcopy(cell_def))
|
||||
out[i] = buff
|
||||
|
||||
with open("def_map.json", "w") as file:
|
||||
json.dump(out, file, indent = 4)
|
||||
BIN
res/sprites/elf_left.png
Normal file
BIN
res/sprites/elf_left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
BIN
res/sprites/elf_right.png
Normal file
BIN
res/sprites/elf_right.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
BIN
res/sprites/grass.jpg
Normal file
BIN
res/sprites/grass.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 458 KiB |
BIN
res/sprites/grasss_small.jpg
Normal file
BIN
res/sprites/grasss_small.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user