Green Background Removal + TSX Generation + Bug Fixes

Removed green backgrounds from 30 tileset PNGs (16.4M pixels!)
 Created mass TSX generation script for 3877 individual objects
 Fixed TiledTestScene cursor crash bug
 Added micro_farm_8x8 JSON loading support
 Documentation: GREEN_BACKGROUND_FIX.md, MASS_TSX_GENERATION.md

Scripts:
- scripts/remove_green_background.py (batch transparency fix)
- scripts/generate_mass_tsx.py (3877 .tsx files generator)

Backups: assets/tilesets/backup_green_bg/
This commit is contained in:
2025-12-22 11:23:25 +01:00
parent 78fe6d2629
commit 0985af29e5
3144 changed files with 13072 additions and 1 deletions

View File

@@ -0,0 +1,142 @@
{ "compressionlevel":-1,
"height":8,
"infinite":false,
"layers":[
{
"data":[38, 38, 39, 40, 45, 46, 47, 47,
59, 160, 161, 161, 129, 130, 161, 47,
80, 134, 135, 129, 130, 151, 182, 47,
101, 134, 134, 135, 151, 66, 67, 68,
176, 134, 155, 156, 101, 129, 130, 89,
70, 155, 155, 156, 129, 150, 151, 157,
70, 71, 72, 150, 150, 150, 151, 178,
91, 92, 93, 93, 93, 93, 198, 199],
"height":8,
"id":1,
"name":"Ground",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 281, 281, 281, 281, 0, 0,
442, 0, 281, 281, 281, 281, 0, 0,
0, 0, 386, 387, 388, 281, 0, 0,
0, 0, 407, 408, 409, 281, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0],
"height":8,
"id":2,
"name":"TilledSoil",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0],
"height":8,
"id":3,
"name":"Fences",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
},
{
"data":[0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0],
"height":8,
"id":4,
"name":"Decorations",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":8,
"x":0,
"y":0
},
{
"draworder":"topdown",
"id":6,
"name":"FarmBoundary",
"objects":[
{
"height":384,
"id":1,
"name":"FarmArea",
"properties":[
{
"name":"size",
"type":"string",
"value":"8x8"
},
{
"name":"type",
"type":"string",
"value":"micro_farm"
}],
"rotation":0,
"type":"",
"visible":true,
"width":384,
"x":0,
"y":0
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":7,
"nextobjectid":2,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.2",
"tileheight":48,
"tilesets":[
{
"columns":21,
"firstgid":1,
"image":"..\/tilesets\/grass_soil_autotile.png",
"imageheight":1024,
"imagewidth":1024,
"margin":0,
"name":"grass_soil",
"spacing":0,
"tilecount":441,
"tileheight":48,
"tilewidth":48
},
{
"firstgid":442,
"source":"..\/tilesets\/individual_objects\/ana_character_2x2_grid_1766098371171_obj02.tsx"
}],
"tilewidth":48,
"type":"map",
"version":"1.10",
"width":8
}

View File

@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="8" height="8" tilewidth="48" tileheight="48" infinite="0" nextlayerid="7" nextobjectid="2">
<editorsettings>
<export target="micro_farm_8x8.json" format="json"/>
</editorsettings>
<tileset firstgid="1" name="grass_soil" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../tilesets/grass_soil_autotile.png" width="1024" height="1024"/>
</tileset>
<tileset firstgid="442" source="../tilesets/individual_objects/ana_character_2x2_grid_1766098371171_obj02.tsx"/>
<layer id="1" name="Ground" width="8" height="8">
<data encoding="csv">
38,38,39,40,45,46,47,47,
@@ -21,7 +25,7 @@
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,281,281,281,281,0,0,
0,0,281,281,281,281,0,0,
442,0,281,281,281,281,0,0,
0,0,386,387,388,281,0,0,
0,0,407,408,409,281,0,0,
0,0,0,0,0,0,0,0