- use toggle tile for all toggling entities (transient, switch, door)
- get rod of hard coded sprites (exception: particle class, to be
  fixed later)
- changed switch sprite (rect instead of elipse)
This commit is contained in:
2024-03-31 20:16:15 +02:00
parent f6f2172f11
commit faf0fd99c2
24 changed files with 334 additions and 339 deletions

View File

@@ -1,18 +0,0 @@
Description: open the door
MinMoves: 2
Background: background-lila
#######
#o #
# t #
#> S <#
# #
# ^ #
#######

View File

@@ -1,18 +0,0 @@
Description: test obstacles
MinMoves: 14
Background: background-lila
#############
# t #
#> S # #
# ># ^#
#< #W#####
# o v# o#
#############

View File

@@ -1,18 +0,0 @@
Description: collect all yellow dots
MinMoves: 7
Background: background-lila
# ############
# #
############ #
# o S #
# ######## ###
+ #
############ #
# o # #
# # ######## #
# # o
# ############

View File

@@ -1,18 +0,0 @@
Description: some enemies can be moved
MinMoves: 5
Background: background-lila
########
# o <o#
#v S # #
# #### #
# #### #
# #
# ^#
########

View File

@@ -1,18 +0,0 @@
Description: the more players the better
MinMoves: 4
Background: background-lila
########W#
# v#
# #
#S s#
############
# o #
######## #

View File

@@ -1,18 +0,0 @@
Description: don't fall off the world
MinMoves: 3
Background: background-lila
W
S # o
o
#

View File

@@ -1,30 +0,0 @@
#!/bin/bash
width=$(grep "width " ../../main.go | awk '{print $4}')
height=$(grep "height " ../../main.go | awk '{print $4}')
read -p " Enter level name: " name
read -p " Enter background: " background
read -p "Enter description: " des
if test -z "$name"; then
name="newlevel"
fi
if test -z "$bbackground"; then
background="background-lila"
fi
w=$(($width/32))
h=$(($height/32))
(
echo "Description: $des"
echo "Background: $background"
for x in $(seq 1 $h); do
for y in $(seq 1 $w); do
echo -n " "
done
echo
done
)

View File

@@ -11,7 +11,7 @@
"iid": "267e9380-d7b0-11ee-a97e-35bec9c19d52",
"jsonVersion": "1.5.3",
"appBuildId": 473703,
"nextUid": 70,
"nextUid": 76,
"identifierStyle": "Capitalize",
"toc": [],
"worldLayout": "Free",
@@ -425,7 +425,48 @@
"limitBehavior": "MoveLastOne",
"pivotX": 0,
"pivotY": 0,
"fieldDefs": []
"fieldDefs": [
{
"identifier": "Toggle",
"doc": null,
"__type": "Tile",
"uid": 75,
"type": "F_Tile",
"isArray": false,
"canBeNull": true,
"arrayMinLength": null,
"arrayMaxLength": null,
"editorDisplayMode": "Hidden",
"editorDisplayScale": 1,
"editorDisplayPos": "Above",
"editorLinkStyle": "StraightArrow",
"editorDisplayColor": null,
"editorAlwaysShow": false,
"editorShowInWorld": true,
"editorCutLongValues": true,
"editorTextSuffix": null,
"editorTextPrefix": null,
"useForSmartColor": false,
"exportToToc": false,
"searchable": false,
"min": null,
"max": null,
"regex": null,
"acceptFileTypes": null,
"defaultOverride": {
"id": "V_String",
"params": ["64,128,32,32"]
},
"textLanguageMode": null,
"symmetricalRef": false,
"autoChainRef": true,
"allowOutOfLevelRef": true,
"allowedRefs": "OnlySame",
"allowedRefsEntityUid": null,
"allowedRefTags": [],
"tilesetUid": 57
}
]
},
{
"identifier": "Switch",
@@ -468,7 +509,7 @@
"uid": 69,
"type": "F_EntityRef",
"isArray": false,
"canBeNull": true,
"canBeNull": false,
"arrayMinLength": null,
"arrayMaxLength": null,
"editorDisplayMode": "RefLinkBetweenCenters",
@@ -497,6 +538,46 @@
"allowedRefsEntityUid": 65,
"allowedRefTags": [],
"tilesetUid": null
},
{
"identifier": "Toggle",
"doc": null,
"__type": "Tile",
"uid": 74,
"type": "F_Tile",
"isArray": false,
"canBeNull": true,
"arrayMinLength": null,
"arrayMaxLength": null,
"editorDisplayMode": "Hidden",
"editorDisplayScale": 1,
"editorDisplayPos": "Above",
"editorLinkStyle": "StraightArrow",
"editorDisplayColor": null,
"editorAlwaysShow": false,
"editorShowInWorld": true,
"editorCutLongValues": true,
"editorTextSuffix": null,
"editorTextPrefix": null,
"useForSmartColor": false,
"exportToToc": false,
"searchable": false,
"min": null,
"max": null,
"regex": null,
"acceptFileTypes": null,
"defaultOverride": {
"id": "V_String",
"params": ["96,192,32,32"]
},
"textLanguageMode": null,
"symmetricalRef": false,
"autoChainRef": true,
"allowOutOfLevelRef": true,
"allowedRefs": "OnlySame",
"allowedRefsEntityUid": null,
"allowedRefTags": [],
"tilesetUid": 57
}
]
},
@@ -570,6 +651,46 @@
"allowedRefsEntityUid": 66,
"allowedRefTags": [],
"tilesetUid": null
},
{
"identifier": "Toggle",
"doc": null,
"__type": "Tile",
"uid": 71,
"type": "F_Tile",
"isArray": false,
"canBeNull": true,
"arrayMinLength": null,
"arrayMaxLength": null,
"editorDisplayMode": "Hidden",
"editorDisplayScale": 1,
"editorDisplayPos": "Above",
"editorLinkStyle": "StraightArrow",
"editorDisplayColor": null,
"editorAlwaysShow": false,
"editorShowInWorld": true,
"editorCutLongValues": true,
"editorTextSuffix": null,
"editorTextPrefix": null,
"useForSmartColor": false,
"exportToToc": false,
"searchable": false,
"min": null,
"max": null,
"regex": null,
"acceptFileTypes": null,
"defaultOverride": {
"id": "V_String",
"params": ["64,192,32,32"]
},
"textLanguageMode": null,
"symmetricalRef": false,
"autoChainRef": true,
"allowOutOfLevelRef": true,
"allowedRefs": "OnlySame",
"allowedRefsEntityUid": null,
"allowedRefTags": [],
"tilesetUid": 57
}
]
},
@@ -1053,13 +1174,13 @@
},
{
"__cWid": 4,
"__cHei": 6,
"__cHei": 7,
"identifier": "Entitymap",
"uid": 57,
"relPath": "../sprites/entitymap.png",
"embedAtlas": null,
"pxWid": 128,
"pxHei": 192,
"pxHei": 224,
"tileGridSize": 32,
"spacing": 0,
"padding": 0,
@@ -1069,8 +1190,8 @@
"customData": [],
"savedSelections": [],
"cachedPixelData": {
"opaqueTiles": "000000000111111111111100",
"averageColors": "1b47987d687d3b355c355c355c355c353c96faa8f166f299f5b7f853f799f777f222f888f444f765f555f53200000000"
"opaqueTiles": "0000000001111111111111000000",
"averageColors": "1b47987d687d3b355c355c355c355c353c96faa8f166f299f5b7f853f799f777f222f888f444f765f555f532e866ab85000000003743aa95"
}
}
], "enums": [], "externalEnums": [], "levelFields": [
@@ -3960,7 +4081,7 @@
"height": 32,
"defUid": 24,
"px": [192,224],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": -32,
"__worldY": 1856
},
@@ -3976,7 +4097,7 @@
"height": 32,
"defUid": 24,
"px": [320,320],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 96,
"__worldY": 1952
},
@@ -4040,7 +4161,7 @@
"height": 32,
"defUid": 24,
"px": [416,224],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 192,
"__worldY": 1856
}
@@ -4200,7 +4321,7 @@
"height": 32,
"defUid": 24,
"px": [192,224],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 672,
"__worldY": 1856
},
@@ -4280,7 +4401,7 @@
"height": 32,
"defUid": 24,
"px": [192,96],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 672,
"__worldY": 1728
},
@@ -4486,7 +4607,7 @@
"height": 32,
"defUid": 24,
"px": [64,224],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 1248,
"__worldY": 1856
},
@@ -4518,7 +4639,7 @@
"height": 32,
"defUid": 24,
"px": [128,160],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 1312,
"__worldY": 1792
},
@@ -4841,7 +4962,7 @@
"height": 32,
"defUid": 24,
"px": [416,96],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2304,
"__worldY": 1728
},
@@ -4857,7 +4978,7 @@
"height": 32,
"defUid": 24,
"px": [416,352],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2304,
"__worldY": 1984
},
@@ -4905,7 +5026,7 @@
"height": 32,
"defUid": 24,
"px": [288,128],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2176,
"__worldY": 1760
},
@@ -4921,7 +5042,7 @@
"height": 32,
"defUid": 24,
"px": [192,256],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2080,
"__worldY": 1888
},
@@ -4937,7 +5058,7 @@
"height": 32,
"defUid": 24,
"px": [480,288],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2368,
"__worldY": 1920
},
@@ -4953,7 +5074,7 @@
"height": 32,
"defUid": 24,
"px": [480,64],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2368,
"__worldY": 1696
},
@@ -4969,7 +5090,7 @@
"height": 32,
"defUid": 24,
"px": [512,128],
"fieldInstances": [],
"fieldInstances": [{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 128, "w": 32, "h": 32 }, "__tile": null, "defUid": 75, "realEditorValues": [] }],
"__worldX": 2400,
"__worldY": 1760
},
@@ -6072,15 +6193,18 @@
"height": 32,
"defUid": 66,
"px": [352,160],
"fieldInstances": [{ "__identifier": "Entity_ref", "__type": "EntityRef", "__value": {
"entityIid": "81e502b0-d7b0-11ee-9add-6193c766edeb",
"layerIid": "50624190-d7b0-11ee-968e-3dbcbdc42f40",
"levelIid": "50621a80-d7b0-11ee-968e-a98c2d35fbdb",
"worldIid": "267ee1a0-d7b0-11ee-a97e-53f0a359eae1"
}, "__tile": null, "defUid": 69, "realEditorValues": [{
"id": "V_String",
"params": ["81e502b0-d7b0-11ee-9add-6193c766edeb"]
}] }],
"fieldInstances": [
{ "__identifier": "Entity_ref", "__type": "EntityRef", "__value": {
"entityIid": "81e502b0-d7b0-11ee-9add-6193c766edeb",
"layerIid": "50624190-d7b0-11ee-968e-3dbcbdc42f40",
"levelIid": "50621a80-d7b0-11ee-968e-a98c2d35fbdb",
"worldIid": "267ee1a0-d7b0-11ee-a97e-53f0a359eae1"
}, "__tile": null, "defUid": 69, "realEditorValues": [{
"id": "V_String",
"params": ["81e502b0-d7b0-11ee-9add-6193c766edeb"]
}] },
{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 96, "y": 192, "w": 32, "h": 32 }, "__tile": null, "defUid": 74, "realEditorValues": [] }
],
"__worldX": 128,
"__worldY": 2912
},
@@ -6096,15 +6220,10 @@
"height": 32,
"defUid": 65,
"px": [224,224],
"fieldInstances": [{ "__identifier": "Entity_ref", "__type": "EntityRef", "__value": {
"entityIid": "7d975370-d7b0-11ee-9add-971995295000",
"layerIid": "50624190-d7b0-11ee-968e-3dbcbdc42f40",
"levelIid": "50621a80-d7b0-11ee-968e-a98c2d35fbdb",
"worldIid": "267ee1a0-d7b0-11ee-a97e-53f0a359eae1"
}, "__tile": null, "defUid": 68, "realEditorValues": [{
"id": "V_String",
"params": ["7d975370-d7b0-11ee-9add-971995295000"]
}] }],
"fieldInstances": [
{ "__identifier": "Entity_ref", "__type": "EntityRef", "__value": null, "__tile": null, "defUid": 68, "realEditorValues": [null] },
{ "__identifier": "Toggle", "__type": "Tile", "__value": { "tilesetUid": 57, "x": 64, "y": 192, "w": 32, "h": 32 }, "__tile": null, "defUid": 71, "realEditorValues": [] }
],
"__worldX": 0,
"__worldY": 2976
},