From b38a39e127c35347c400e8606d5c97c20d0d84ca Mon Sep 17 00:00:00 2001 From: zoe Date: Sun, 1 May 2022 01:28:31 +0200 Subject: [PATCH] tilemaps! --- ...t.png-13971fa1f37d4ea367b7aa5973d2bb0a.md5 | 3 ++ ....png-13971fa1f37d4ea367b7aa5973d2bb0a.stex | Bin 0 -> 2222 bytes ...t.png-3bbe939339db863d2d767f4cc6888a76.md5 | 4 +- ....png-3bbe939339db863d2d767f4cc6888a76.stex | Bin 136 -> 108 bytes godot/project.godot | 35 ++++++++++++++++++ godot/saves.gd | 16 ++++++++ godot/sprite/tiles/default.png | Bin 195 -> 0 bytes godot/sprite/tiles/terrain/default.png | Bin 0 -> 4817 bytes .../tiles/{ => terrain}/default.png.import | 6 +-- godot/world/terrain.gd | 13 +++++++ godot/world/terrain/terrain.tres | 26 +++++++++++++ godot/world/world.tscn | 28 +++++++++++++- godot/world/worldcam.gd | 21 +++++++++++ libresprite/mulfok62-1x.png | Bin 0 -> 347 bytes libresprite/tiles/default.ase | Bin 622 -> 4069 bytes 15 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.md5 create mode 100644 godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.stex create mode 100644 godot/saves.gd delete mode 100644 godot/sprite/tiles/default.png create mode 100644 godot/sprite/tiles/terrain/default.png rename godot/sprite/tiles/{ => terrain}/default.png.import (71%) create mode 100644 godot/world/terrain.gd create mode 100644 godot/world/terrain/terrain.tres create mode 100644 godot/world/worldcam.gd create mode 100644 libresprite/mulfok62-1x.png diff --git a/godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.md5 b/godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.md5 new file mode 100644 index 0000000..1a50451 --- /dev/null +++ b/godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.md5 @@ -0,0 +1,3 @@ +source_md5="51a24b88d8d04d41bb08fb37210d0c1a" +dest_md5="9292fede89cc4d9fde79c618d8241bf7" + diff --git a/godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.stex b/godot/.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.stex new file mode 100644 index 0000000000000000000000000000000000000000..7bad8f5fda0a0e67807a6e7f077588bc75a33311 GIT binary patch literal 2222 zcmV;f2vPS(L{n6N0001>000000000003Zed0001z2mk%3)cnXLfN&gNa5al)jR6+puznQnKH}v}e$+-_6Kz}>H@GVJ_ zB}tNPd8LL#X;@aeN7ny;tt#Kd+^niEFA@ExAW4!WDYBXtV%PyRVvha81Re*UC13= z4VpEEzbv~)t>#<~DP#5W&U*b=xC&jP;BNA>K$BGNX4MdGF(G2UUbSG#!s_u+b2WE! zDwmj6%e(Gkz7F&acJ+GA^_1N8L*Ae!y7o1ymWR~)Qu|)3SFLLBzEWMw3$8);6fRf^ zn%FGkM&;Od<-6=H#P{jiXg4RgiVic#H3qi5+XbR^wt@k7TWfG7-h_K0VG+D5uy*|A zRU1NFx*J)yivXj#O9%ET{twfHC1oSGID&R130IQXl--C}6(-%^uQ*}}m(97t&x>@)YJ1dc!D!&S z$m#VBt|aG5KQG3`i6w+v4M?$*8wv|u?(>qkWzx-qNU9PS7P}UR%H15foQx8xx45v= z+=&b#)%9JeYz3-2xgHNE^QwP4mscfUlh<_hR4BW?D_5zXX$@EJ`+A#Z$Bm)et9dE4 zS)^{cn58b)-z!pCncK>+B3I(>@8wm=W(`*vR|dE43ipyzyczvHUDpgB?RvMnvj22K zXSr(2QWc`)&~(|WI9F@0%4DEXALrjHb9LS3CdSROKpp%|<)*}alFKh70cM($0SYL$ z%H3t%(+ygQO)1xEk-SBsni@s0Ewco7ExnXFz zs*Jmgn+S3b9}i8}b~hXtI;!iOojvC1j_?>XPpiEeDRvd*yi#^$@KfAHo-n(gZJ z&fM#?slwyVsZk*l=32!*b1IGs$YU*GJiwkxXPE_jh!$W5%uT{Cg1 zQg;1xQ$Mw~A&68Y>t=5CGS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 diff --git a/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.md5 b/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.md5 index 5bc58ef..065d655 100644 --- a/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.md5 +++ b/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.md5 @@ -1,3 +1,3 @@ -source_md5="7d76499be9b404817efc9b6091ecd3f7" -dest_md5="a8c8f2f79e2fef0ca5ca5b3b72c995ad" +source_md5="59c9436dc5ea53f2bc3dac38af894dec" +dest_md5="a62e530f259d2076dd7d2e62bc1d97b6" diff --git a/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.stex b/godot/.import/default.png-3bbe939339db863d2d767f4cc6888a76.stex index b726df6e409ac8ea1ea8f7fc5cc9aa960046ad87..94f5e19755895ebeed46ea4f2c8128e3b582170b 100644 GIT binary patch delta 90 zcmeBR%$Xn&62QQ~5bo*}5aj9R<^pAh1z7l40NMKT2iOJp1q46KH#y#Rn`FebR&IO$ pwd={{RxE;l=QI3^Ra|(@p@l2h5bo*}5aj9RmH=gk1z7k51KIlW2iOI~4W@s#@cJy@!0xg!_wj!r z`+l2G8V|RAxtpFYf3co5@3uzsW9=H{x^okILR)SdGpdU|SYph$PW`~$l@AR}Wz^*V T+}O7>@AJcbXP%!fXJ7yTbMP9Q7kcif|)1tW=6hvH(zuh|7 zF4}Yc+a+&r`a62g{NDGi!BW8^t5_huLBNSavCc21d$t2h@*FFM0~gM}`ya_J(-dr@ zv{ZKU!JZSb?74q8rRP_PrNQTx;>dE@gfDUZrr@et9( tbBta~o_S^nWmbx(xX!pep|y@*=Z&!g_pOWU3xKX-@O1TaS?83{1OTeXNT2`! diff --git a/godot/sprite/tiles/terrain/default.png b/godot/sprite/tiles/terrain/default.png new file mode 100644 index 0000000000000000000000000000000000000000..c094918fd3215191e2237ecb6ce729a0d5f8b6a1 GIT binary patch literal 4817 zcmV;?5-#nDP) z&ud)Q701t0#-l`PBxKn|2%N;!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=$IbGT<+a9G6X+>$TrCxSlq+dxK5~O9DZ)+R)0ECLz~L_yX%I)7T)npZcOmlQ@*E z+?P+>{hDF2OaSTlBFRFR6I!KulF)FBLT%<&41M?3jd=*detICz5XoTVeygzqNbnT+zM!ZVxZ9`X0$RN$=}^`W5V+I#&Py z*nCQo$&6-vbn#O?dig5e#mAK$n~YRK8-DBI-5$*BB>{l!+bd(ZxC@fW`i`up__f4Kah1X!554fno(u42H#)a~rQ56~#R)I-3x-}HI_ z05AM}U*(!x*B+Z|l6QfP@<}`igsVCxm6wwv%2QWzf&n!xsBp9@cRI%6QQa2(H8q#!LfAU*=KVFJD9BL;(Q}N@e r;NJ(hd4IVwg+DyEmi>HuqxAYe9r7Z^AUe-a00000NkvXXu0mjf6cUf6 literal 0 HcmV?d00001 diff --git a/godot/sprite/tiles/default.png.import b/godot/sprite/tiles/terrain/default.png.import similarity index 71% rename from godot/sprite/tiles/default.png.import rename to godot/sprite/tiles/terrain/default.png.import index 6303f1f..aadb6f4 100644 --- a/godot/sprite/tiles/default.png.import +++ b/godot/sprite/tiles/terrain/default.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/default.png-3bbe939339db863d2d767f4cc6888a76.stex" +path="res://.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.stex" metadata={ "vram_texture": false } [deps] -source_file="res://sprite/tiles/default.png" -dest_files=[ "res://.import/default.png-3bbe939339db863d2d767f4cc6888a76.stex" ] +source_file="res://sprite/tiles/terrain/default.png" +dest_files=[ "res://.import/default.png-13971fa1f37d4ea367b7aa5973d2bb0a.stex" ] [params] diff --git a/godot/world/terrain.gd b/godot/world/terrain.gd new file mode 100644 index 0000000..4a4af82 --- /dev/null +++ b/godot/world/terrain.gd @@ -0,0 +1,13 @@ +extends TileMap + +var width = 256 +var height = 256 + +# Called when the node enters the scene tree for the first time. +func _ready(): + fill() + +func fill(): + for x in width: + for y in height: + set_cell(x,y,0,false,false,false,Vector2(1,0)) diff --git a/godot/world/terrain/terrain.tres b/godot/world/terrain/terrain.tres new file mode 100644 index 0000000..d752c85 --- /dev/null +++ b/godot/world/terrain/terrain.tres @@ -0,0 +1,26 @@ +[gd_resource type="TileSet" load_steps=2 format=2] + +[ext_resource path="res://sprite/tiles/terrain/default.png" type="Texture" id=1] + +[resource] +0/name = "default.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 128, 128 ) +0/tile_mode = 2 +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 32, 32 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 diff --git a/godot/world/world.tscn b/godot/world/world.tscn index 1d5d587..e830d08 100644 --- a/godot/world/world.tscn +++ b/godot/world/world.tscn @@ -1,3 +1,29 @@ -[gd_scene format=2] +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://world/terrain/terrain.tres" type="TileSet" id=1] +[ext_resource path="res://world/terrain.gd" type="Script" id=2] +[ext_resource path="res://world/worldcam.gd" type="Script" id=3] [node name="World" type="Node2D"] + +[node name="terrain" type="TileMap" parent="."] +position = Vector2( -2, 0 ) +mode = 1 +tile_set = ExtResource( 1 ) +cell_size = Vector2( 32, 16 ) +format = 1 +tile_data = PoolIntArray( -393219, 0, 196609, -393218, 0, 196609, -393217, 0, 196609, -458752, 0, 196609, -458751, 0, 196609, -327683, 0, 196609, -327682, 0, 196609, -327681, 0, 196609, -393216, 0, 196609, -393215, 0, 196609, -393214, 0, 196609, -262147, 0, 196609, -262146, 0, 196609, -262145, 0, 196609, -327680, 0, 196609, -327679, 0, 196609, -327678, 0, 196609, -327677, 0, 196609, -196611, 0, 196609, -196610, 0, 196609, -196609, 0, 131072, -262144, 0, 196609, -262143, 0, 196609, -262142, 0, 196609, -262141, 0, 196609, -262140, 0, 196609, -131075, 0, 196609, -131074, 0, 196609, -131073, 0, 196609, -196608, 0, 196609, -196607, 0, 196609, -196606, 0, 196609, -196605, 0, 196609, -196604, 0, 196609, -196603, 0, 196609, -65539, 0, 196609, -65538, 0, 196609, -65537, 0, 196609, -131072, 0, 196609, -131071, 0, 196609, -131070, 0, 196609, -131069, 0, 196609, -131068, 0, 196609, -131067, 0, 196609, -131066, 0, 196609, -2, 0, 196609, -1, 0, 196609, -65536, 0, 196609, -65535, 0, 196609, -65534, 0, 196609, -65533, 0, 196609, -65532, 0, 196609, -65531, 0, 196609, -65530, 0, 196609, 65534, 0, 196609, 65535, 0, 196609, 0, 0, 196609, 1, 0, 196609, 2, 0, 196609, 3, 0, 196609, 4, 0, 196609, 131070, 0, 196609, 131071, 0, 196609, 65536, 0, 196609, 65537, 0, 196609, 65538, 0, 196609, 65539, 0, 196609, 65540, 0, 196609, 196607, 0, 196609, 131072, 0, 196609, 131073, 0, 196609, 131074, 0, 196609, 131075, 0, 196609, 131076, 0, 196609, 131077, 0, 196609, 196608, 0, 196609, 196609, 0, 196609, 196610, 0, 196609, 196611, 0, 196609, 196612, 0, 196609, 196613, 0, 196609, 262144, 0, 196609, 262145, 0, 196609, 262146, 0, 196609, 262147, 0, 196609, 262148, 0, 196609, 262149, 0, 196609, 327683, 0, 196609, 327684, 0, 196609 ) +script = ExtResource( 2 ) + +[node name="TileMap" type="TileMap" parent="."] +position = Vector2( -2, 0 ) +mode = 1 +tile_set = ExtResource( 1 ) +cell_size = Vector2( 32, 16 ) +format = 1 +tile_data = PoolIntArray( -196609, 0, 65539, -262144, 0, 65539, -262143, 0, 65539, -196608, 0, 65539, -196607, 0, 65536, -196606, 0, 65536, -196605, 0, 65539, -65537, 0, 65536, -131072, 0, 65536, -131071, 0, 65536, -131070, 0, 65536, -131069, 0, 65536, -131068, 0, 65536, -65536, 0, 65539, -65535, 0, 65539, -65534, 0, 196609, 1, 0, 65539, 2, 0, 2, 65537, 0, 2, 65538, 0, 196609 ) + +[node name="worldcam" type="Camera2D" parent="."] +current = true +zoom = Vector2( 0.4, 0.4 ) +script = ExtResource( 3 ) diff --git a/godot/world/worldcam.gd b/godot/world/worldcam.gd new file mode 100644 index 0000000..bad76d6 --- /dev/null +++ b/godot/world/worldcam.gd @@ -0,0 +1,21 @@ +extends Camera2D +export var min_zoom = 0.4 +export var speed = 200 +var zoomlevel = 0.4 + +func _process(delta): + move_around(delta) + handle_zoom() + +func move_around(delta): + var xdirection = Input.get_action_strength("camera_right") - Input.get_action_strength("camera_left") + var ydirection = Input.get_action_strength("camera_down") - Input.get_action_strength("camera_up") + var direction = Vector2(xdirection, ydirection).normalized() * delta * speed * zoom + position = lerp(position, position + direction, 2) + +func handle_zoom(): + if Input.is_action_just_pressed("zoom_in"): + zoomlevel = clamp(zoomlevel - 0.1, 0.1, 2) + if Input.is_action_just_pressed("zoom_out"): + zoomlevel = clamp(zoomlevel + 0.1, 0.1, 2) + zoom = Vector2(zoomlevel, zoomlevel) diff --git a/libresprite/mulfok62-1x.png b/libresprite/mulfok62-1x.png new file mode 100644 index 0000000000000000000000000000000000000000..f7740af13d893d90a8964dab9a8b30a69b0f6430 GIT binary patch literal 347 zcmV-h0i^zkP)%iQwO`2TN+fkprT010qNS#tmY4#WTe4#WYKD-Ig~ z002ixL_t&tnPXsJWMXDvWn<^yMC+6cQE@6%&_`l#-T_m6KOcR8m$^Ra4i{ t)Y8_`)zddHG%_|ZH8Z!cw6eCb1pu2~2V_qQp>+TN002ovPDHLkV1h%;nnM5p literal 0 HcmV?d00001 diff --git a/libresprite/tiles/default.ase b/libresprite/tiles/default.ase index 8b7581658bca52052f1313337ea5db962aed5564..2ce53bff6bf5cc78516efb35c3b82c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