commit fb2a7f3c6f6eb23af180265d2e140c974c6a4a55 Author: chimchooree Date: Sat Mar 4 17:49:06 2023 -0600 supports dialogue portrait and scene changes diff --git a/.import/.gdignore b/.import/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.import/.gdignore @@ -0,0 +1 @@ + diff --git a/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 b/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 new file mode 100644 index 0000000..878331d --- /dev/null +++ b/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 @@ -0,0 +1,3 @@ +source_md5="b3ee3b197af6bdf6b469f88bc97a2b5b" +dest_md5="5cc453001da2def085d615be60a0b9c4" + diff --git a/.import/blue.png-734a5749558306f27088b8bee6a4b282.md5 b/.import/blue.png-734a5749558306f27088b8bee6a4b282.md5 new file mode 100644 index 0000000..5328bc7 --- /dev/null +++ b/.import/blue.png-734a5749558306f27088b8bee6a4b282.md5 @@ -0,0 +1,3 @@ +source_md5="47313fa4c47a9963fddd764e1ec6e4a8" +dest_md5="26ea799ea0a3da9e753b3ebe822e0570" + diff --git a/.import/blue.png-734a5749558306f27088b8bee6a4b282.stex b/.import/blue.png-734a5749558306f27088b8bee6a4b282.stex new file mode 100644 index 0000000..71f6913 Binary files /dev/null and b/.import/blue.png-734a5749558306f27088b8bee6a4b282.stex differ diff --git a/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.md5 b/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.md5 new file mode 100644 index 0000000..5328bc7 --- /dev/null +++ b/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.md5 @@ -0,0 +1,3 @@ +source_md5="47313fa4c47a9963fddd764e1ec6e4a8" +dest_md5="26ea799ea0a3da9e753b3ebe822e0570" + diff --git a/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.stex b/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.stex new file mode 100644 index 0000000..71f6913 Binary files /dev/null and b/.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.stex differ diff --git a/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.md5 b/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.md5 new file mode 100644 index 0000000..5ec2091 --- /dev/null +++ b/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.md5 @@ -0,0 +1,3 @@ +source_md5="19b355c80268c5d7c75dff312b074ff8" +dest_md5="87f91c20fc1ab88382f1694bb73ee383" + diff --git a/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.stex b/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.stex new file mode 100644 index 0000000..d088db7 Binary files /dev/null and b/.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.stex differ diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 new file mode 100644 index 0000000..5328bc7 --- /dev/null +++ b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 @@ -0,0 +1,3 @@ +source_md5="47313fa4c47a9963fddd764e1ec6e4a8" +dest_md5="26ea799ea0a3da9e753b3ebe822e0570" + diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 0000000..71f6913 Binary files /dev/null and b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.md5 b/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.md5 new file mode 100644 index 0000000..33a5535 --- /dev/null +++ b/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.md5 @@ -0,0 +1,3 @@ +source_md5="a80a4eca82257e5caf101b46a44a706d" +dest_md5="f4b6d6e295f23a7b879197fb4533668d" + diff --git a/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.stex b/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.stex new file mode 100644 index 0000000..5219c77 Binary files /dev/null and b/.import/pink.png-302a63cdc099d1943080b420b9d78bc1.stex differ diff --git a/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.md5 b/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.md5 new file mode 100644 index 0000000..33a5535 --- /dev/null +++ b/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.md5 @@ -0,0 +1,3 @@ +source_md5="a80a4eca82257e5caf101b46a44a706d" +dest_md5="f4b6d6e295f23a7b879197fb4533668d" + diff --git a/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.stex b/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.stex new file mode 100644 index 0000000..5219c77 Binary files /dev/null and b/.import/pink.png-5bc3862cbacd15d38a7057979a1f34c3.stex differ diff --git a/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.md5 b/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.md5 new file mode 100644 index 0000000..13f7e8f --- /dev/null +++ b/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.md5 @@ -0,0 +1,3 @@ +source_md5="3b678839fd9858a1e3ecfa688323aa96" +dest_md5="99a47f1452107ec15cdd4d018d20c3aa" + diff --git a/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.stex b/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.stex new file mode 100644 index 0000000..3b0e6ea Binary files /dev/null and b/.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.stex differ diff --git a/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.md5 b/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.md5 new file mode 100644 index 0000000..e28c7be --- /dev/null +++ b/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.md5 @@ -0,0 +1,3 @@ +source_md5="1328947e40ee142d94c959e23115cb47" +dest_md5="95d3b77f2203708d501bc63562ec950a" + diff --git a/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.stex b/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.stex new file mode 100644 index 0000000..03e71f9 Binary files /dev/null and b/.import/yellow.png-02c26865a4bfcfe629729004bad7f963.stex differ diff --git a/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.md5 b/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.md5 new file mode 100644 index 0000000..e28c7be --- /dev/null +++ b/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.md5 @@ -0,0 +1,3 @@ +source_md5="1328947e40ee142d94c959e23115cb47" +dest_md5="95d3b77f2203708d501bc63562ec950a" + diff --git a/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.stex b/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.stex new file mode 100644 index 0000000..03e71f9 Binary files /dev/null and b/.import/yellow.png-b256e49d5c6a3745eeebfc23f07e6183.stex differ diff --git a/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.md5 b/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.md5 new file mode 100644 index 0000000..f916b0a --- /dev/null +++ b/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.md5 @@ -0,0 +1,3 @@ +source_md5="0a5095f858f5fae1384f44394fe89436" +dest_md5="2e9d8553b0796ebe91a939db4cc595fb" + diff --git a/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.stex b/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.stex new file mode 100644 index 0000000..08db330 Binary files /dev/null and b/.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.stex differ diff --git a/Lemon.gd b/Lemon.gd new file mode 100644 index 0000000..68f069e --- /dev/null +++ b/Lemon.gd @@ -0,0 +1,47 @@ +extends Node + +# Lemonland View + +onready var ui = $UI +export var websocket_url = "ws://127.0.0.1:8080" +var _client = WebSocketClient.new() + +func _ready(): + + _client.connect("connection_closed", self, "_closed") + _client.connect("connection_error", self, "_error") + _client.connect("connection_established", self, "_connected") + _client.connect("data_received", self, "_on_data_received") + + var err = _client.connect_to_url(websocket_url) + if err != OK: + print_debug("Unable to connect") + set_process(false) + +func _error(was_clean = false): + print_debug("Error, clean: ", was_clean) + set_process(false) + +func _closed(was_clean = false): + print_debug("Closed, clean: ", was_clean) + set_process(false) + +func _connected(protocol = ""): + print_debug("Connected with protocol: ", protocol) + _client.get_peer(1).put_packet(JSON.print({'type': 'test', 'message': "View test packet"}).to_utf8()) + +func _on_data_received(): + var json = JSON.parse(_client.get_peer(1).get_packet().get_string_from_utf8()) + var packet = json.result + if typeof(packet) != 18: + push_error("%s is not a dictionary" % [packet]) + get_tree().quit() + print_debug("Got data from server: ", packet) + if packet['type'] == "view": + ui.change_view(packet) + elif packet['type'] == "portrait": + ui.change_portrait(packet) + + +func _process(_delta): + _client.poll() diff --git a/LemonView.tscn b/LemonView.tscn new file mode 100644 index 0000000..3dacc43 --- /dev/null +++ b/LemonView.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Lemon.gd" type="Script" id=1] +[ext_resource path="res://UI.gd" type="Script" id=2] +[ext_resource path="res://Res/Img/Portrait/yellow.png" type="Texture" id=3] +[ext_resource path="res://Res/Img/Scene/pinkland.png" type="Texture" id=4] + +[node name="Lemon" type="Node"] +script = ExtResource( 1 ) + +[node name="UI" type="Control" parent="."] +margin_right = 14.0 +margin_bottom = 14.0 +script = ExtResource( 2 ) + +[node name="View" type="TextureRect" parent="UI"] +margin_right = 375.0 +margin_bottom = 335.0 +rect_min_size = Vector2( 375, 335 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = ExtResource( 4 ) +expand = true +__meta__ = { +"_edit_lock_": true +} + +[node name="Portrait" type="TextureRect" parent="UI"] +margin_top = 271.0 +margin_right = 71.0 +margin_bottom = 335.0 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture = ExtResource( 3 ) +__meta__ = { +"_edit_lock_": true +} diff --git a/Res/Img/Portrait/blue.png b/Res/Img/Portrait/blue.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/Res/Img/Portrait/blue.png differ diff --git a/Res/Img/Portrait/blue.png.import b/Res/Img/Portrait/blue.png.import new file mode 100644 index 0000000..fa12aac --- /dev/null +++ b/Res/Img/Portrait/blue.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Portrait/blue.png" +dest_files=[ "res://.import/blue.png-e0f5f5b5c4b775bd8c0818e2c803259e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Res/Img/Portrait/pink.png b/Res/Img/Portrait/pink.png new file mode 100644 index 0000000..725b7e2 Binary files /dev/null and b/Res/Img/Portrait/pink.png differ diff --git a/Res/Img/Portrait/pink.png.import b/Res/Img/Portrait/pink.png.import new file mode 100644 index 0000000..dd6a12f --- /dev/null +++ b/Res/Img/Portrait/pink.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/pink.png-302a63cdc099d1943080b420b9d78bc1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Portrait/pink.png" +dest_files=[ "res://.import/pink.png-302a63cdc099d1943080b420b9d78bc1.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Res/Img/Portrait/yellow.png b/Res/Img/Portrait/yellow.png new file mode 100644 index 0000000..8a2fe3e Binary files /dev/null and b/Res/Img/Portrait/yellow.png differ diff --git a/Res/Img/Portrait/yellow.png.import b/Res/Img/Portrait/yellow.png.import new file mode 100644 index 0000000..17ae19a --- /dev/null +++ b/Res/Img/Portrait/yellow.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/yellow.png-02c26865a4bfcfe629729004bad7f963.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Portrait/yellow.png" +dest_files=[ "res://.import/yellow.png-02c26865a4bfcfe629729004bad7f963.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Res/Img/Scene/blueland.png b/Res/Img/Scene/blueland.png new file mode 100644 index 0000000..fc822a0 Binary files /dev/null and b/Res/Img/Scene/blueland.png differ diff --git a/Res/Img/Scene/blueland.png.import b/Res/Img/Scene/blueland.png.import new file mode 100644 index 0000000..e26ec0b --- /dev/null +++ b/Res/Img/Scene/blueland.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Scene/blueland.png" +dest_files=[ "res://.import/blueland.png-f478fe8d87e2af2735e01bc75579867e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Res/Img/Scene/pinkland.png b/Res/Img/Scene/pinkland.png new file mode 100644 index 0000000..13c0001 Binary files /dev/null and b/Res/Img/Scene/pinkland.png differ diff --git a/Res/Img/Scene/pinkland.png.import b/Res/Img/Scene/pinkland.png.import new file mode 100644 index 0000000..1e610a1 --- /dev/null +++ b/Res/Img/Scene/pinkland.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Scene/pinkland.png" +dest_files=[ "res://.import/pinkland.png-89aa9c0ad4bde8be0c3d0c4cbdc3a29b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Res/Img/Scene/yellowland.png b/Res/Img/Scene/yellowland.png new file mode 100644 index 0000000..949dcd1 Binary files /dev/null and b/Res/Img/Scene/yellowland.png differ diff --git a/Res/Img/Scene/yellowland.png.import b/Res/Img/Scene/yellowland.png.import new file mode 100644 index 0000000..625626b --- /dev/null +++ b/Res/Img/Scene/yellowland.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Res/Img/Scene/yellowland.png" +dest_files=[ "res://.import/yellowland.png-0bbad559ac24095d2d168e5b71163eb9.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/UI.gd b/UI.gd new file mode 100644 index 0000000..25d488a --- /dev/null +++ b/UI.gd @@ -0,0 +1,10 @@ +extends Control + +onready var view = $View +onready var portrait = $Portrait + +func change_view(packet): + view.texture = load("res://Res/Img/Scene/" + packet["loc"] + ".png") + +func change_portrait(packet): + portrait.texture = load("res://Res/Img/Portrait/" + packet["npc"] + ".png") diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..3403b1d --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,24 @@ +[preset.0] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../Exports/Lemonland/Lemonland.x86_64" +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=true +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..a4c02e6 --- /dev/null +++ b/icon.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..f37b165 --- /dev/null +++ b/project.godot @@ -0,0 +1,36 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +[application] + +config/name="LemonView" +run/main_scene="res://LemonView.tscn" +config/icon="res://icon.png" + +[display] + +window/size/width=375 +window/size/height=335 + +[gui] + +common/drop_mouse_on_gui_input_disabled=true + +[locale] + +translations=PoolStringArray( ) + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +environment/default_environment="res://default_env.tres"