Updated to 4.4
This commit is contained in:
parent
eaa26d1361
commit
1aff15069a
151 changed files with 593 additions and 100 deletions
4
.editorconfig
Normal file
4
.editorconfig
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
1
ActionBehaviour/ActionBehaviourResource.gd.uid
Normal file
1
ActionBehaviour/ActionBehaviourResource.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://hu56oq6sbwvv
|
||||
1
ActionBehaviour/Prefabs/ActionBehaviourMosquito.gd.uid
Normal file
1
ActionBehaviour/Prefabs/ActionBehaviourMosquito.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://coi3nbnsw8bwb
|
||||
1
ActionBehaviour/Prefabs/ActionBehaviourPillbug.gd.uid
Normal file
1
ActionBehaviour/Prefabs/ActionBehaviourPillbug.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://byn6frgu2evpo
|
||||
1
CameraPivot.gd.uid
Normal file
1
CameraPivot.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dkiy6njslvsud
|
||||
1
DisconnectInfo.gd.uid
Normal file
1
DisconnectInfo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ckbcjqlo333jm
|
||||
1
DrawInfo.gd.uid
Normal file
1
DrawInfo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cmx00rywwt47c
|
||||
1
Game.gd.uid
Normal file
1
Game.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cu2lheqsdppkp
|
||||
52
Game.tscn
52
Game.tscn
|
|
@ -1,24 +1,25 @@
|
|||
[gd_scene load_steps=30 format=3 uid="uid://bx0bbrwdr0h40"]
|
||||
[gd_scene load_steps=32 format=3 uid="uid://bx0bbrwdr0h40"]
|
||||
|
||||
[ext_resource type="Script" path="res://Game.gd" id="1_dgt1j"]
|
||||
[ext_resource type="Script" path="res://CameraPivot.gd" id="2_71xp1"]
|
||||
[ext_resource type="Script" path="res://HexGrid3D/HexGrid3D.gd" id="2_suxca"]
|
||||
[ext_resource type="Script" path="res://GameEndChecker.gd" id="2_ufkw3"]
|
||||
[ext_resource type="Script" uid="uid://cu2lheqsdppkp" path="res://Game.gd" id="1_dgt1j"]
|
||||
[ext_resource type="Script" uid="uid://dkiy6njslvsud" path="res://CameraPivot.gd" id="2_71xp1"]
|
||||
[ext_resource type="Script" uid="uid://3bcjk4gegklv" path="res://HexGrid3D/HexGrid3D.gd" id="2_suxca"]
|
||||
[ext_resource type="Script" uid="uid://dpnbbkfuama6p" path="res://GameEndChecker.gd" id="2_ufkw3"]
|
||||
[ext_resource type="Material" uid="uid://dv2oo7hlc5nyy" path="res://Testbed/Table.tres" id="5_u4p4p"]
|
||||
[ext_resource type="Script" path="res://WebLightChecker.gd" id="6_41m5i"]
|
||||
[ext_resource type="Script" path="res://UI/BuildMenu.gd" id="7_1oc55"]
|
||||
[ext_resource type="Script" path="res://WorldEnvSettings.gd" id="7_w8wx1"]
|
||||
[ext_resource type="Script" path="res://Table.gd" id="8_ys5y3"]
|
||||
[ext_resource type="Script" uid="uid://dc6l065gaaifu" path="res://WebLightChecker.gd" id="6_41m5i"]
|
||||
[ext_resource type="Script" uid="uid://dyikyqxr4bflg" path="res://UI/BuildMenu.gd" id="7_1oc55"]
|
||||
[ext_resource type="Script" uid="uid://ehiq0b0tlcgu" path="res://WorldEnvSettings.gd" id="7_w8wx1"]
|
||||
[ext_resource type="Script" uid="uid://cm0d6ct61nn30" path="res://Table.gd" id="8_ys5y3"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2i5vboeyq8qx" path="res://UI/hex_white.svg" id="11_cl0he"]
|
||||
[ext_resource type="Script" path="res://GameOverMenu.gd" id="11_ffmss"]
|
||||
[ext_resource type="Script" path="res://MenuButtons.gd" id="11_urihv"]
|
||||
[ext_resource type="Script" path="res://TurnTexture.gd" id="12_kjwp8"]
|
||||
[ext_resource type="Script" path="res://UI/InputInfo.gd" id="13_6sp26"]
|
||||
[ext_resource type="Script" path="res://addons/awesome_input_icons/classes/InputIconTextureRect.gd" id="13_mbmni"]
|
||||
[ext_resource type="Script" uid="uid://yev2hctcnbt4" path="res://GameOverMenu.gd" id="11_ffmss"]
|
||||
[ext_resource type="Script" uid="uid://b14cpuqs6g86t" path="res://MenuButtons.gd" id="11_urihv"]
|
||||
[ext_resource type="Script" uid="uid://cwmuu385b53nw" path="res://TurnTexture.gd" id="12_kjwp8"]
|
||||
[ext_resource type="Script" uid="uid://damrrrph3vfwm" path="res://UI/InputInfo.gd" id="13_6sp26"]
|
||||
[ext_resource type="Script" uid="uid://go64dt8gl8gy" path="res://addons/awesome_input_icons/classes/InputIconTextureRect.gd" id="13_mbmni"]
|
||||
[ext_resource type="Texture2D" uid="uid://20wqrthwoqr0" path="res://addons/awesome_input_icons/assets/keyboard and mouse vector/mouse_move.svg" id="14_t8b21"]
|
||||
[ext_resource type="Script" path="res://UI/ActionMoveMenu.gd" id="15_gc6p8"]
|
||||
[ext_resource type="Script" path="res://DrawInfo.gd" id="16_enu5g"]
|
||||
[ext_resource type="Script" path="res://UI/GameSettings.gd" id="16_uww8u"]
|
||||
[ext_resource type="Script" uid="uid://1qbrnymtbat1" path="res://UI/ActionMoveMenu.gd" id="15_gc6p8"]
|
||||
[ext_resource type="Script" uid="uid://cmx00rywwt47c" path="res://DrawInfo.gd" id="16_enu5g"]
|
||||
[ext_resource type="Script" uid="uid://dv3e8l0ecyyke" path="res://UI/GameSettings.gd" id="16_uww8u"]
|
||||
[ext_resource type="Shader" uid="uid://dlplsrexke1rc" path="res://Testbed/FilmGrain.gdshader" id="20_7ywci"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_cu5ir"]
|
||||
material = ExtResource("5_u4p4p")
|
||||
|
|
@ -43,6 +44,12 @@ fog_density = 0.3
|
|||
dof_blur_far_distance = 15.0
|
||||
dof_blur_far_transition = 10.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_haxul"]
|
||||
shader = ExtResource("20_7ywci")
|
||||
shader_parameter/grain_amount = 0.11
|
||||
shader_parameter/grain_size = 1.0
|
||||
shader_parameter/animate = true
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_pctcs"]
|
||||
interpolation_mode = 2
|
||||
offsets = PackedFloat32Array(0, 0.839465)
|
||||
|
|
@ -106,6 +113,15 @@ transform = Transform3D(0.843961, -0.46784, 0.262404, -0.0775016, 0.377705, 0.92
|
|||
shadow_enabled = true
|
||||
script = ExtResource("6_41m5i")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
material = SubResource("ShaderMaterial_haxul")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="BuildMenu" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 12
|
||||
|
|
@ -668,9 +684,9 @@ text = "Host color"
|
|||
|
||||
[node name="HostColorOption" type="OptionButton" parent="GameSettings/GameSettings/PanelContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
item_count = 3
|
||||
selected = 0
|
||||
allow_reselect = true
|
||||
item_count = 3
|
||||
popup/item_0/text = "White"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Black"
|
||||
|
|
|
|||
1
GameEndChecker.gd.uid
Normal file
1
GameEndChecker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dpnbbkfuama6p
|
||||
1
GameOverMenu.gd.uid
Normal file
1
GameOverMenu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://yev2hctcnbt4
|
||||
1
Globals/GameData.gd.uid
Normal file
1
Globals/GameData.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://co5w1mw0xy4of
|
||||
1
Globals/GameEvents.gd.uid
Normal file
1
Globals/GameEvents.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://1an3sh1yafh3
|
||||
1
Globals/GameSettings.gd.uid
Normal file
1
Globals/GameSettings.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cvu5uapg7v70p
|
||||
1
HexGrid3D/HexGrid3D.gd.uid
Normal file
1
HexGrid3D/HexGrid3D.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://3bcjk4gegklv
|
||||
1
HexOutline.gd.uid
Normal file
1
HexOutline.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://rbug8ibnb87v
|
||||
1
InGameMenu.gd.uid
Normal file
1
InGameMenu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bf3gjwp46h4qu
|
||||
1
InsectButton.gd.uid
Normal file
1
InsectButton.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dwyqwo4tl2gcm
|
||||
1
InsectTiles/BuildGhost.gd.uid
Normal file
1
InsectTiles/BuildGhost.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bnjgde0w63vjr
|
||||
|
|
@ -5,7 +5,7 @@ shader_type spatial;
|
|||
render_mode unshaded;//depth_test_disable;
|
||||
uniform vec4 albedo : source_color;
|
||||
uniform vec4 emission_color : source_color;
|
||||
uniform float emission_amount: hint_range(0.0, 16.0) = 5.0f;
|
||||
uniform float emission_amount: hint_range(0.0, 16.0) = 5.0f;
|
||||
uniform float rim_steepness : hint_range(0.0f, 16.0f) = 3.0f; //higher values mean a smaller rim.
|
||||
|
||||
|
||||
|
|
|
|||
1
InsectTiles/HoverShader.gdshader.uid
Normal file
1
InsectTiles/HoverShader.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://g035kui0yqjh
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://v74ro6pmr4hw"]
|
||||
|
||||
[ext_resource type="Shader" path="res://InsectTiles/HoverShader.gdshader" id="1_pk3ok"]
|
||||
[ext_resource type="Shader" uid="uid://g035kui0yqjh" path="res://InsectTiles/HoverShader.gdshader" id="1_pk3ok"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dxwngv0xmk3vy"]
|
||||
|
||||
[ext_resource type="Script" path="res://Tile/Tile.gd" id="1_b68ym"]
|
||||
[ext_resource type="Script" uid="uid://cxyrai6as7y1l" path="res://Tile/Tile.gd" id="1_b68ym"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dsbshu53k588h" path="res://hexagon_small.res" id="2_vm00h"]
|
||||
[ext_resource type="Resource" uid="uid://b70uxn2ofij8y" path="res://Tile/Prefabs/Bee.tres" id="2_xu8wf"]
|
||||
[ext_resource type="Texture2D" uid="uid://bp5lbofkicsqq" path="res://InsectTiles/Assets/Textures/ant_black.png" id="3_r51ol"]
|
||||
|
|
|
|||
1
LANConnectMenu.gd.uid
Normal file
1
LANConnectMenu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dfdf0iosyvyc7
|
||||
1
MenuButtons.gd.uid
Normal file
1
MenuButtons.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b14cpuqs6g86t
|
||||
1
MeshBreather.gd.uid
Normal file
1
MeshBreather.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://btn30al6m0cfa
|
||||
1
Misc/RTSCamera3D.gd.uid
Normal file
1
Misc/RTSCamera3D.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://rmnkki3bv1pw
|
||||
1
MovementBehaviour/MovementBehaviourResource.gd.uid
Normal file
1
MovementBehaviour/MovementBehaviourResource.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://divh522cgw5wo
|
||||
1
MovementBehaviour/Prefabs/MovementBehaviourAnt.gd.uid
Normal file
1
MovementBehaviour/Prefabs/MovementBehaviourAnt.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://2ya4abv3mp0
|
||||
1
MovementBehaviour/Prefabs/MovementBehaviourBee.gd.uid
Normal file
1
MovementBehaviour/Prefabs/MovementBehaviourBee.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://digwn1f4kkcw
|
||||
1
MovementBehaviour/Prefabs/MovementBehaviourBeetle.gd.uid
Normal file
1
MovementBehaviour/Prefabs/MovementBehaviourBeetle.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cdikwbqk1igh6
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://ehkjfv3db0ri
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://d3645pthvj5g3
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dsfx5mx8dyktg
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://jwtlsoh3v1j0
|
||||
1
MovementBehaviour/Prefabs/MovementBehaviourSpider.gd.uid
Normal file
1
MovementBehaviour/Prefabs/MovementBehaviourSpider.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dd003v8tihs6
|
||||
1
Multiplayer/LobbyInfo.gd.uid
Normal file
1
Multiplayer/LobbyInfo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://nfjyotyuuf8f
|
||||
1
Multiplayer/Multiplayer.gd.uid
Normal file
1
Multiplayer/Multiplayer.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dqxcwiyx83dkk
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://bh31hq1uwqdts"]
|
||||
|
||||
[ext_resource type="Script" path="res://Multiplayer/Multiplayer.gd" id="1_0n82x"]
|
||||
[ext_resource type="Script" path="res://Multiplayer/LobbyInfo.gd" id="2_wf1xe"]
|
||||
[ext_resource type="Script" uid="uid://dqxcwiyx83dkk" path="res://Multiplayer/Multiplayer.gd" id="1_0n82x"]
|
||||
[ext_resource type="Script" uid="uid://nfjyotyuuf8f" path="res://Multiplayer/LobbyInfo.gd" id="2_wf1xe"]
|
||||
|
||||
[node name="Multiplayer" type="Node"]
|
||||
script = ExtResource("1_0n82x")
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ func create_enet_server(port: int) -> void:
|
|||
peer.create_server(port, 1)
|
||||
multiplayer.multiplayer_peer = peer
|
||||
|
||||
|
||||
func close_enet_server() -> void:
|
||||
if multiplayer.multiplayer_peer is ENetMultiplayerPeer:
|
||||
multiplayer.multiplayer_peer.close()
|
||||
|
||||
|
||||
func disconnect_all() -> void:
|
||||
#close_enet_server()
|
||||
close_enet_client()
|
||||
|
|
|
|||
1
Networking/Networking.gd.uid
Normal file
1
Networking/Networking.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bpsu0nnl8sel3
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cigm5ol2f8b4b"]
|
||||
|
||||
[ext_resource type="Script" path="res://Networking/Networking.gd" id="1_y8syy"]
|
||||
[ext_resource type="Script" uid="uid://bpsu0nnl8sel3" path="res://Networking/Networking.gd" id="1_y8syy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfxg65sfuvegd" path="res://Networking/ws_client.tscn" id="2_0nqq0"]
|
||||
|
||||
[node name="Networking" type="Node"]
|
||||
|
|
|
|||
1
Networking/WSClient/multiplayer_client.gd.uid
Normal file
1
Networking/WSClient/multiplayer_client.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dh778mxhwy2k2
|
||||
|
|
@ -50,13 +50,14 @@ func _process(delta):
|
|||
|
||||
func _parse_msg():
|
||||
var parsed = JSON.parse_string(ws.get_packet().get_string_from_utf8())
|
||||
print(parsed)
|
||||
if typeof(parsed) != TYPE_DICTIONARY or not parsed.has("type") or not parsed.has("id") or \
|
||||
typeof(parsed.get("data")) != TYPE_STRING:
|
||||
return false
|
||||
|
||||
var msg := parsed as Dictionary
|
||||
if not str(msg.type).is_valid_int() or not str(msg.id).is_valid_int():
|
||||
return false
|
||||
#if not str(msg.type).is_valid_int() or not str(msg.id).is_valid_int():
|
||||
#return false
|
||||
|
||||
var type := str(msg.type).to_int()
|
||||
var src_id := str(msg.id).to_int()
|
||||
|
|
|
|||
1
Networking/WSClient/ws_webrtc_client.gd.uid
Normal file
1
Networking/WSClient/ws_webrtc_client.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://d1w1mgnqtbt7c
|
||||
1
PlayerInventory.gd.uid
Normal file
1
PlayerInventory.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bi7xee67gsgcs
|
||||
1
Table.gd.uid
Normal file
1
Table.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cm0d6ct61nn30
|
||||
1
TestRot.gd.uid
Normal file
1
TestRot.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://drmsctx1dselj
|
||||
1
TestUI.gd.uid
Normal file
1
TestUI.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://0dap6vv0a2bt
|
||||
1
Testbed/DistanceFaceWorld.gdshader.uid
Normal file
1
Testbed/DistanceFaceWorld.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://boiay83j4p11x
|
||||
108
Testbed/FilmGrain.gdshader
Normal file
108
Testbed/FilmGrain.gdshader
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D screen_texture : hint_screen_texture;
|
||||
uniform float grain_amount : hint_range(0.0, 1.0) = 0.05; // Adjust the amount of grain
|
||||
uniform float grain_size : hint_range(0.1, 10.0) = 1.0; // Adjust the size of the grain
|
||||
uniform bool animate = false;
|
||||
|
||||
//void fragment() {
|
||||
//// Sample the original screen texture
|
||||
//vec4 original_color = texture(screen_texture, SCREEN_UV);
|
||||
//
|
||||
//float noise = 0.0;
|
||||
//
|
||||
//if (animate) {
|
||||
//// Generate random noise
|
||||
//noise = (fract(sin(dot(UV * TIME, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0;
|
||||
//} else {
|
||||
//noise = (fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0;
|
||||
//}
|
||||
//// Add noise to the original color
|
||||
//original_color.rgb += noise * grain_amount * grain_size;
|
||||
//
|
||||
//// Clamp the final color to make sure it stays in the valid range
|
||||
//COLOR = clamp(original_color, 0.0, 1.0);
|
||||
//}
|
||||
|
||||
|
||||
// Feel free to steal this :^)
|
||||
// Consider it MIT licensed, you can link to this page if you want to.
|
||||
|
||||
#define SHOW_NOISE 0
|
||||
#define SRGB 0
|
||||
// 0: Addition, 1: Screen, 2: Overlay, 3: Soft Light, 4: Lighten-Only
|
||||
#define BLEND_MODE 4
|
||||
#define SPEED 1.0
|
||||
#define INTENSITY 0.05
|
||||
// What gray level noise should tend to.
|
||||
#define MEAN 0.0
|
||||
// Controls the contrast/variance of noise.
|
||||
#define VARIANCE 0.5
|
||||
|
||||
vec3 channel_mix(vec3 a, vec3 b, vec3 w) {
|
||||
return vec3(mix(a.r, b.r, w.r), mix(a.g, b.g, w.g), mix(a.b, b.b, w.b));
|
||||
}
|
||||
|
||||
float gaussian(float z, float u, float o) {
|
||||
return (1.0 / (o * sqrt(2.0 * 3.1415))) * exp(-(((z - u) * (z - u)) / (2.0 * (o * o))));
|
||||
}
|
||||
|
||||
vec3 madd(vec3 a, vec3 b, float w) {
|
||||
return a + a * b * w;
|
||||
}
|
||||
|
||||
vec3 screen(vec3 a, vec3 b, float w) {
|
||||
return mix(a, vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b), w);
|
||||
}
|
||||
|
||||
vec3 overlay(vec3 a, vec3 b, float w) {
|
||||
return mix(a, channel_mix(
|
||||
2.0 * a * b,
|
||||
vec3(1.0) - 2.0 * (vec3(1.0) - a) * (vec3(1.0) - b),
|
||||
step(vec3(0.5), a)
|
||||
), w);
|
||||
}
|
||||
|
||||
vec3 soft_light(vec3 a, vec3 b, float w) {
|
||||
return mix(a, pow(a, pow(vec3(2.0), 2.0 * (vec3(0.5) - b))), w);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 ps = vec2(1.0) / (1.0 / SCREEN_PIXEL_SIZE).xy;
|
||||
vec2 uv = SCREEN_UV; //coord * ps;
|
||||
COLOR = texture(screen_texture, uv);
|
||||
#if SRGB
|
||||
color = pow(color, vec4(2.2));
|
||||
#endif
|
||||
|
||||
float t = TIME * float(SPEED);
|
||||
float seed = dot(uv, vec2(12.9898, 78.233));
|
||||
float noise = fract(sin(seed) * 43758.5453 + t);
|
||||
noise = gaussian(noise, float(MEAN), float(VARIANCE) * float(VARIANCE));
|
||||
|
||||
#if SHOW_NOISE
|
||||
COLOR = vec4(noise);
|
||||
#else
|
||||
// Ignore these mouse stuff if you're porting this
|
||||
// and just use an arbitrary intensity value.
|
||||
float w = float(INTENSITY);
|
||||
|
||||
vec3 grain = vec3(noise) * (1.0 - COLOR.rgb);
|
||||
|
||||
#if BLEND_MODE == 0
|
||||
COLOR.rgb += grain * w;
|
||||
#elif BLEND_MODE == 1
|
||||
COLOR.rgb = screen(COLOR.rgb, grain, w);
|
||||
#elif BLEND_MODE == 2
|
||||
COLOR.rgb = overlay(COLOR.rgb, grain, w);
|
||||
#elif BLEND_MODE == 3
|
||||
COLOR.rgb = soft_light(COLOR.rgb, grain, w);
|
||||
#elif BLEND_MODE == 4
|
||||
COLOR.rgb = max(COLOR.rgb, grain * w);
|
||||
#endif
|
||||
|
||||
#if SRGB
|
||||
COLOR = pow(COLOR, vec4(1.0 / 2.2));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
1
Testbed/FilmGrain.gdshader.uid
Normal file
1
Testbed/FilmGrain.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dlplsrexke1rc
|
||||
|
|
@ -15,22 +15,22 @@ float pristineGrid( vec2 uv, vec2 lineWidth)
|
|||
{
|
||||
vec2 ddx = dFdx(uv);
|
||||
vec2 ddy = dFdy(uv);
|
||||
|
||||
|
||||
vec2 uvDeriv = vec2(length(vec2(ddx.x, ddy.x)), length(vec2(ddx.y, ddy.y)));
|
||||
bvec2 invertLine = bvec2(lineWidth.x > 0.5, lineWidth.y > 0.5);
|
||||
|
||||
|
||||
vec2 targetWidth = vec2(
|
||||
invertLine.x ? 1.0 - lineWidth.x : lineWidth.x,
|
||||
invertLine.y ? 1.0 - lineWidth.y : lineWidth.y
|
||||
);
|
||||
|
||||
|
||||
vec2 drawWidth = clamp(targetWidth, uvDeriv, vec2(0.5));
|
||||
vec2 lineAA = uvDeriv * 1.5;
|
||||
vec2 gridUV = abs(fract(uv) * 2.0 - 1.0);
|
||||
|
||||
|
||||
gridUV.x = invertLine.x ? gridUV.x : 1.0 - gridUV.x;
|
||||
gridUV.y = invertLine.y ? gridUV.y : 1.0 - gridUV.y;
|
||||
|
||||
|
||||
vec2 grid2 = smoothstep(drawWidth + lineAA, drawWidth - lineAA, gridUV);
|
||||
|
||||
grid2 *= clamp(targetWidth / drawWidth, 0.0, 1.0);
|
||||
|
|
@ -40,18 +40,18 @@ float pristineGrid( vec2 uv, vec2 lineWidth)
|
|||
return mix(grid2.x, 1.0, grid2.y);
|
||||
}
|
||||
|
||||
void vertex()
|
||||
void vertex()
|
||||
{
|
||||
//UV = VERTEX.xz;
|
||||
}
|
||||
|
||||
void fragment()
|
||||
void fragment()
|
||||
{
|
||||
vec3 grid_0 = vec3(pristineGrid(UV * float(scale_0), vec2(line_scale_0)));
|
||||
vec3 grid_1 = vec3(pristineGrid(UV * float(scale_1), vec2(line_scale_1)));
|
||||
|
||||
|
||||
vec3 grid_3 = mix(grid_1 * color_1.rgb, grid_0 * color_0.rgb, grid_0);
|
||||
|
||||
|
||||
ALBEDO = grid_3;
|
||||
ALPHA = 1.5;
|
||||
}
|
||||
1
Testbed/GridTest.gdshader.uid
Normal file
1
Testbed/GridTest.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dw683olkkdkd4
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="ShaderMaterial" load_steps=5 format=3 uid="uid://dv2oo7hlc5nyy"]
|
||||
|
||||
[ext_resource type="Shader" path="res://Testbed/DistanceFaceWorld.gdshader" id="1_edhah"]
|
||||
[ext_resource type="Shader" uid="uid://boiay83j4p11x" path="res://Testbed/DistanceFaceWorld.gdshader" id="1_edhah"]
|
||||
[ext_resource type="Texture2D" uid="uid://cilgpyanfb3a8" path="res://Testbed/textures/wood_table_001_diff_4k.jpg" id="2_hb1x7"]
|
||||
[ext_resource type="Texture2D" uid="uid://diamo44e2x4if" path="res://Testbed/textures/wood_table_001_disp_4k.png" id="3_eyslc"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6ejmikbfrprs" path="res://Testbed/textures/wood_table_001_rough_4k.jpg" id="4_r705j"]
|
||||
|
|
@ -9,14 +9,14 @@
|
|||
render_priority = 0
|
||||
shader = ExtResource("1_edhah")
|
||||
shader_parameter/albedo = Color(1, 1, 1, 1)
|
||||
shader_parameter/texture_albedo = ExtResource("2_hb1x7")
|
||||
shader_parameter/distance_fade_min = 0.0
|
||||
shader_parameter/distance_fade_max = 0.0
|
||||
shader_parameter/roughness = 0.8
|
||||
shader_parameter/metallic_texture_channel = null
|
||||
shader_parameter/texture_metallic = ExtResource("3_eyslc")
|
||||
shader_parameter/metallic_texture_channel = Vector4(0, 0, 0, 0)
|
||||
shader_parameter/texture_roughness = ExtResource("4_r705j")
|
||||
shader_parameter/specular = 0.6
|
||||
shader_parameter/metallic = 0.5
|
||||
shader_parameter/uv1_scale = Vector3(1, 1, 1)
|
||||
shader_parameter/uv1_offset = Vector3(0, 0, 0)
|
||||
shader_parameter/texture_albedo = ExtResource("2_hb1x7")
|
||||
shader_parameter/texture_metallic = ExtResource("3_eyslc")
|
||||
shader_parameter/texture_roughness = ExtResource("4_r705j")
|
||||
|
|
|
|||
1
Testbed/UIBlur.gdshader.uid
Normal file
1
Testbed/UIBlur.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://nkowetasi3ka
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://cxosyb7s454wj" path="res://InsectTiles/Materials/Ant_Black.tres" id="1_yunq4"]
|
||||
[ext_resource type="Material" uid="uid://cq13vo8hnk7k1" path="res://InsectTiles/Materials/Ant_White.tres" id="2_8sds4"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_n4n55"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourAnt.gd" id="3_thq0t"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_n4n55"]
|
||||
[ext_resource type="Script" uid="uid://2ya4abv3mp0" path="res://MovementBehaviour/Prefabs/MovementBehaviourAnt.gd" id="3_thq0t"]
|
||||
[ext_resource type="Texture2D" uid="uid://0sqfwl6wjdtl" path="res://InsectTiles/Assets/UI/ant.png" id="4_canjv"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_m8bed"]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="TileResource" load_steps=7 format=3 uid="uid://b70uxn2ofij8y"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://b5rer8wc62ck3" path="res://InsectTiles/Materials/Bee_Black.tres" id="1_0fgqy"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="1_o55be"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="1_o55be"]
|
||||
[ext_resource type="Material" uid="uid://d4hyq81yydmpr" path="res://InsectTiles/Materials/Bee_White.tres" id="2_qr48e"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourBee.gd" id="3_eudvd"]
|
||||
[ext_resource type="Script" uid="uid://digwn1f4kkcw" path="res://MovementBehaviour/Prefabs/MovementBehaviourBee.gd" id="3_eudvd"]
|
||||
[ext_resource type="Texture2D" uid="uid://dkfybq7qex2og" path="res://InsectTiles/Assets/UI/bee.png" id="4_1he20"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_puwjs"]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://bbx3b1qialq3l" path="res://InsectTiles/Materials/Beetle_Black.tres" id="1_cbjw0"]
|
||||
[ext_resource type="Material" uid="uid://cas4k78kf1c0x" path="res://InsectTiles/Materials/Beetle_White.tres" id="2_txjyp"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_g4s7x"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourBeetle.gd" id="3_ik3ft"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_g4s7x"]
|
||||
[ext_resource type="Script" uid="uid://cdikwbqk1igh6" path="res://MovementBehaviour/Prefabs/MovementBehaviourBeetle.gd" id="3_ik3ft"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwewgsgd0gasi" path="res://InsectTiles/Assets/UI/beetle.png" id="4_iki3w"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_lc7ln"]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://tbfvmxogabnr" path="res://InsectTiles/Materials/Grasshopper_Black.tres" id="1_vut3o"]
|
||||
[ext_resource type="Material" uid="uid://csuox1kvmm78p" path="res://InsectTiles/Materials/Grasshopper_White.tres" id="2_gc341"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_t3kan"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourGrasshopper.gd" id="3_tid3l"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_t3kan"]
|
||||
[ext_resource type="Script" uid="uid://ehkjfv3db0ri" path="res://MovementBehaviour/Prefabs/MovementBehaviourGrasshopper.gd" id="3_tid3l"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhnrq0gxmv7cr" path="res://InsectTiles/Assets/UI/grasshopper.png" id="4_tpusd"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ynqk8"]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://ymfmmwtlmikl" path="res://InsectTiles/Materials/Ladybug_Black.tres" id="1_1577p"]
|
||||
[ext_resource type="Material" uid="uid://c5oxmuvm8ngp6" path="res://InsectTiles/Materials/Ladybug_White.tres" id="2_6ewhc"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourLadybug.gd" id="3_hgd41"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_kco06"]
|
||||
[ext_resource type="Script" uid="uid://d3645pthvj5g3" path="res://MovementBehaviour/Prefabs/MovementBehaviourLadybug.gd" id="3_hgd41"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_kco06"]
|
||||
[ext_resource type="Texture2D" uid="uid://c8tm1giuiexap" path="res://InsectTiles/Assets/UI/ladybug.png" id="4_ad3wk"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qjpfb"]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_resource type="Resource" script_class="TileResource" load_steps=9 format=3 uid="uid://5gxoun8c6a2i"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://c3cgwluy7660h" path="res://InsectTiles/Materials/Mosquito_Black.tres" id="1_lthri"]
|
||||
[ext_resource type="Script" path="res://ActionBehaviour/Prefabs/ActionBehaviourMosquito.gd" id="1_v5wo0"]
|
||||
[ext_resource type="Script" uid="uid://coi3nbnsw8bwb" path="res://ActionBehaviour/Prefabs/ActionBehaviourMosquito.gd" id="1_v5wo0"]
|
||||
[ext_resource type="Material" uid="uid://4d8v7sxf1udv" path="res://InsectTiles/Materials/Mosquito_White.tres" id="2_qdl6y"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_5xhnv"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourMosquito.gd" id="3_gkh5p"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_5xhnv"]
|
||||
[ext_resource type="Script" uid="uid://dsfx5mx8dyktg" path="res://MovementBehaviour/Prefabs/MovementBehaviourMosquito.gd" id="3_gkh5p"]
|
||||
[ext_resource type="Texture2D" uid="uid://sw4ar13a5qxx" path="res://InsectTiles/Assets/UI/mosquito.png" id="4_rp6ff"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sngyg"]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_resource type="Resource" script_class="TileResource" load_steps=9 format=3 uid="uid://dk0ndwv8i2rsb"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://4vol6qmah4dx" path="res://InsectTiles/Materials/Pillbug_Black.tres" id="1_45nom"]
|
||||
[ext_resource type="Script" path="res://ActionBehaviour/Prefabs/ActionBehaviourPillbug.gd" id="1_mp5qe"]
|
||||
[ext_resource type="Script" uid="uid://byn6frgu2evpo" path="res://ActionBehaviour/Prefabs/ActionBehaviourPillbug.gd" id="1_mp5qe"]
|
||||
[ext_resource type="Material" uid="uid://drmm6ppt50j7s" path="res://InsectTiles/Materials/Pillbug_White.tres" id="2_b3rd8"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourPillbug.gd" id="3_2v3p1"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_j2ho1"]
|
||||
[ext_resource type="Script" uid="uid://jwtlsoh3v1j0" path="res://MovementBehaviour/Prefabs/MovementBehaviourPillbug.gd" id="3_2v3p1"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_j2ho1"]
|
||||
[ext_resource type="Texture2D" uid="uid://evg5tvmw8ehl" path="res://InsectTiles/Assets/UI/pillbug.png" id="4_dg5at"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4oq6e"]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
[ext_resource type="Material" uid="uid://csjte7l8m4gwp" path="res://InsectTiles/Materials/Spider_Black.tres" id="1_htbqr"]
|
||||
[ext_resource type="Material" uid="uid://dh2ehs3h106sb" path="res://InsectTiles/Materials/Spider_White.tres" id="2_ji24g"]
|
||||
[ext_resource type="Script" path="res://MovementBehaviour/Prefabs/MovementBehaviourSpider.gd" id="3_8daio"]
|
||||
[ext_resource type="Script" path="res://Tile/TileResource.gd" id="3_semk6"]
|
||||
[ext_resource type="Script" uid="uid://dd003v8tihs6" path="res://MovementBehaviour/Prefabs/MovementBehaviourSpider.gd" id="3_8daio"]
|
||||
[ext_resource type="Script" uid="uid://q777kkb1yoyp" path="res://Tile/TileResource.gd" id="3_semk6"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgyve5fappdn5" path="res://InsectTiles/Assets/UI/spider.png" id="4_e73ch"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pm2yd"]
|
||||
|
|
|
|||
1
Tile/Tile.gd.uid
Normal file
1
Tile/Tile.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cxyrai6as7y1l
|
||||
1
Tile/TileResource.gd.uid
Normal file
1
Tile/TileResource.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://q777kkb1yoyp
|
||||
|
|
@ -17,6 +17,8 @@ nodes/root_type=""
|
|||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
|
|
@ -28,6 +30,7 @@ animation/import=true
|
|||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
|
|
|
|||
|
|
@ -17,16 +17,20 @@ nodes/root_type="Node3D"
|
|||
nodes/root_name="Scene Root"
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
|
|
@ -42,4 +46,5 @@ _subresources={
|
|||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=0
|
||||
gltf/embedded_image_handling=1
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ nodes/root_type=""
|
|||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
|
|
@ -28,6 +30,7 @@ animation/import=true
|
|||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ nodes/root_type=""
|
|||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
|
|
@ -28,6 +30,7 @@ animation/import=true
|
|||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ nodes/root_type=""
|
|||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
|
|
@ -28,6 +30,7 @@ animation/import=true
|
|||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
|
|
|
|||
1
TurnEndBehaviour/Prefabs/TurnEndBehaviourBee.gd.uid
Normal file
1
TurnEndBehaviour/Prefabs/TurnEndBehaviourBee.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dn2wcr1223yfc
|
||||
1
TurnEndBehaviour/TurnEndBehaviour.gd.uid
Normal file
1
TurnEndBehaviour/TurnEndBehaviour.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bxg61lt1yhhus
|
||||
1
TurnTexture.gd.uid
Normal file
1
TurnTexture.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cwmuu385b53nw
|
||||
1
UI/ActionMoveMenu.gd.uid
Normal file
1
UI/ActionMoveMenu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://1qbrnymtbat1
|
||||
1
UI/BuildMenu.gd.uid
Normal file
1
UI/BuildMenu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dyikyqxr4bflg
|
||||
1
UI/CreditsPanel.gd.uid
Normal file
1
UI/CreditsPanel.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bqpi63kgxiohj
|
||||
1
UI/GameSettings.gd.uid
Normal file
1
UI/GameSettings.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dv3e8l0ecyyke
|
||||
1
UI/InputInfo.gd.uid
Normal file
1
UI/InputInfo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://damrrrph3vfwm
|
||||
1
UI/Lobby/LANHost.gd.uid
Normal file
1
UI/Lobby/LANHost.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://coqok7bd13s7
|
||||
1
UI/Lobby/LANJoin.gd.uid
Normal file
1
UI/Lobby/LANJoin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ly63r8i4elic
|
||||
1
UI/Lobby/LANLobby.gd.uid
Normal file
1
UI/Lobby/LANLobby.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://yof1j4gldmty
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://chu7mm2kn613g"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/Lobby/LANLobby.gd" id="1_cuhs7"]
|
||||
[ext_resource type="Script" path="res://UI/Lobby/LANJoin.gd" id="2_dcv2l"]
|
||||
[ext_resource type="Script" path="res://UI/Lobby/LANHost.gd" id="2_ioo6d"]
|
||||
[ext_resource type="Script" uid="uid://yof1j4gldmty" path="res://UI/Lobby/LANLobby.gd" id="1_cuhs7"]
|
||||
[ext_resource type="Script" uid="uid://ly63r8i4elic" path="res://UI/Lobby/LANJoin.gd" id="2_dcv2l"]
|
||||
[ext_resource type="Script" uid="uid://coqok7bd13s7" path="res://UI/Lobby/LANHost.gd" id="2_ioo6d"]
|
||||
|
||||
[node name="LANLobby" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
@ -28,6 +28,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
|
||||
[node name="SelectionMenu" type="MarginContainer" parent="PanelContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
|
@ -53,7 +54,6 @@ layout_mode = 2
|
|||
text = "Back"
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_top = 50
|
||||
|
|
@ -137,7 +137,6 @@ disabled = true
|
|||
text = "Start Game"
|
||||
|
||||
[node name="LANJoin" type="VBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer2"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_dcv2l")
|
||||
|
||||
|
|
|
|||
1
UI/Lobby/LobbyEntry.gd.uid
Normal file
1
UI/Lobby/LobbyEntry.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://vw51tar7gfb7
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://b6omw0ynhc15i"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/Lobby/LobbyEntry.gd" id="1_bjjj1"]
|
||||
[ext_resource type="Script" uid="uid://vw51tar7gfb7" path="res://UI/Lobby/LobbyEntry.gd" id="1_bjjj1"]
|
||||
|
||||
[node name="LobbyEntry" type="HBoxContainer"]
|
||||
size_flags_vertical = 3
|
||||
|
|
|
|||
1
UI/Lobby/WebRTCHost.gd.uid
Normal file
1
UI/Lobby/WebRTCHost.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cw8hkl6v6sji5
|
||||
1
UI/Lobby/WebRTCJoin.gd.uid
Normal file
1
UI/Lobby/WebRTCJoin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://6q5xnqxeo3f7
|
||||
1
UI/Lobby/WebRTCLobby.gd.uid
Normal file
1
UI/Lobby/WebRTCLobby.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://t5ue881kic2o
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://d1yxx75f8ad2e"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/Lobby/WebRTCLobby.gd" id="1_d0ifh"]
|
||||
[ext_resource type="Script" path="res://UI/Lobby/WebRTCHost.gd" id="2_h54u8"]
|
||||
[ext_resource type="Script" path="res://UI/Lobby/WebRTCJoin.gd" id="3_yero6"]
|
||||
[ext_resource type="Script" uid="uid://t5ue881kic2o" path="res://UI/Lobby/WebRTCLobby.gd" id="1_d0ifh"]
|
||||
[ext_resource type="Script" uid="uid://cw8hkl6v6sji5" path="res://UI/Lobby/WebRTCHost.gd" id="2_h54u8"]
|
||||
[ext_resource type="Script" uid="uid://6q5xnqxeo3f7" path="res://UI/Lobby/WebRTCJoin.gd" id="3_yero6"]
|
||||
|
||||
[node name="WebRtcLobby" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
|||
1
UI/Rules/Rules.gd.uid
Normal file
1
UI/Rules/Rules.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://55vnrxjmpong
|
||||
1
UI/Settings/Settings.gd.uid
Normal file
1
UI/Settings/Settings.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bdybn12x7qwk8
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cua6l3r0yh82y"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/Settings/Settings.gd" id="1_bxt58"]
|
||||
[ext_resource type="Shader" path="res://Testbed/UIBlur.gdshader" id="1_gnf7a"]
|
||||
[ext_resource type="Script" uid="uid://bdybn12x7qwk8" path="res://UI/Settings/Settings.gd" id="1_bxt58"]
|
||||
[ext_resource type="Shader" uid="uid://nkowetasi3ka" path="res://Testbed/UIBlur.gdshader" id="1_gnf7a"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2dtbe"]
|
||||
shader = ExtResource("1_gnf7a")
|
||||
|
|
@ -62,9 +62,11 @@ layout_mode = 2
|
|||
[node name="TabContainer" type="TabContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
|
||||
[node name="General" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General"]
|
||||
layout_mode = 2
|
||||
|
|
@ -104,6 +106,7 @@ fit_content = true
|
|||
[node name="Graphics" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Graphics"]
|
||||
layout_mode = 2
|
||||
|
|
@ -132,6 +135,7 @@ button_pressed = true
|
|||
[node name="Controls" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls"]
|
||||
layout_mode = 2
|
||||
|
|
|
|||
1
UI/Table/Table.gd.uid
Normal file
1
UI/Table/Table.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c0euixwrxqct6
|
||||
7
UI/TestBG/InsectSprite.tscn
Normal file
7
UI/TestBG/InsectSprite.tscn
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://b5w6sbmjalthh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d7wntyuu1fcl" path="res://UI/TestBG/insect_sprite.gd" id="1_k4jda"]
|
||||
|
||||
[node name="InsectSprite" type="Sprite2D"]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
script = ExtResource("1_k4jda")
|
||||
13
UI/TestBG/insect_sprite.gd
Normal file
13
UI/TestBG/insect_sprite.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
extends Node2D
|
||||
|
||||
var rotation_speed: float = 0.0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
rotation_speed = randf_range(-PI/4.0, PI/4.0)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
rotation += rotation_speed * 0.01
|
||||
1
UI/TestBG/insect_sprite.gd.uid
Normal file
1
UI/TestBG/insect_sprite.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://d7wntyuu1fcl
|
||||
1
UI/join_menu.gd.uid
Normal file
1
UI/join_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dvcw45nqsgskd
|
||||
|
|
@ -6,8 +6,21 @@ extends Control
|
|||
const SETTINGS = preload("res://UI/Settings/Settings.tscn")
|
||||
const RULES = preload("res://UI/Rules/Rules.tscn")
|
||||
|
||||
@onready var credits_panel = $CreditsPanel
|
||||
const ANT = preload("res://InsectTiles/Assets/UI/ant.png")
|
||||
const BEE = preload("res://InsectTiles/Assets/UI/bee.png")
|
||||
const BEETLE = preload("res://InsectTiles/Assets/UI/beetle.png")
|
||||
const GRASSHOPPER = preload("res://InsectTiles/Assets/UI/grasshopper.png")
|
||||
const HEX_WHITE = preload("res://InsectTiles/Assets/UI/hex_white.svg")
|
||||
const LADYBUG = preload("res://InsectTiles/Assets/UI/ladybug.png")
|
||||
const MOSQUITO = preload("res://InsectTiles/Assets/UI/mosquito.png")
|
||||
const PILLBUG = preload("res://InsectTiles/Assets/UI/pillbug.png")
|
||||
const SPIDER = preload("res://InsectTiles/Assets/UI/spider.png")
|
||||
|
||||
const INSECTS_UI = [ANT, BEE, BEETLE, GRASSHOPPER, LADYBUG, MOSQUITO, PILLBUG, SPIDER]
|
||||
@onready var insects: Node2D = $Insects
|
||||
|
||||
@onready var credits_panel = $CreditsPanel
|
||||
const INSECT_SPRITE = preload("res://UI/TestBG/InsectSprite.tscn")
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
if OS.has_feature("web"):
|
||||
|
|
@ -17,6 +30,31 @@ func _ready() -> void:
|
|||
#WSClient.lobby_joined.connect(_on_lobby_joined)
|
||||
Networking.offline_mode()
|
||||
GameData.reset()
|
||||
|
||||
get_viewport().size_changed.connect(resize)
|
||||
resize()
|
||||
|
||||
func resize() -> void:
|
||||
var _size = get_viewport().size
|
||||
print(_size)
|
||||
|
||||
var center = _size / 2
|
||||
_create_insects(center)
|
||||
|
||||
func _create_insects(center: Vector2i) -> void:
|
||||
# For circle
|
||||
var circle_position = Vector2i(center.x, center.y)
|
||||
var circle_radius = max(center.x, center.y)
|
||||
var points = PoissonDiscSampling.generate_points_for_circle(circle_position, circle_radius, 150, 30)
|
||||
|
||||
for insect in insects.get_children():
|
||||
insect.queue_free()
|
||||
|
||||
for point in points:
|
||||
var sprite = INSECT_SPRITE.instantiate()
|
||||
insects.add_child(sprite)
|
||||
sprite.texture = INSECTS_UI.pick_random()
|
||||
sprite.position = point
|
||||
|
||||
func _on_lobby_joined(lobby: String) -> void:
|
||||
GameData.lobby_code = lobby
|
||||
|
|
|
|||
1
UI/main_menu.gd.uid
Normal file
1
UI/main_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dwo703usndog7
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dogu37xma5vsp"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dogu37xma5vsp"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/main_menu.gd" id="1_q3q3u"]
|
||||
[ext_resource type="Script" path="res://DisconnectInfo.gd" id="2_2fkdc"]
|
||||
[ext_resource type="Script" path="res://UI/CreditsPanel.gd" id="3_16j20"]
|
||||
[ext_resource type="Script" uid="uid://dwo703usndog7" path="res://UI/main_menu.gd" id="1_q3q3u"]
|
||||
[ext_resource type="Script" uid="uid://ckbcjqlo333jm" path="res://DisconnectInfo.gd" id="2_2fkdc"]
|
||||
[ext_resource type="Script" uid="uid://bqpi63kgxiohj" path="res://UI/CreditsPanel.gd" id="3_16j20"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_47fa1"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
|
@ -10,6 +10,9 @@ bg_color = Color(0, 0, 0, 1)
|
|||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6jy8e"]
|
||||
bg_color = Color(0.25098, 0.25098, 0.25098, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ah4bq"]
|
||||
bg_color = Color(0.423529, 0.2, 0.184314, 1)
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
|
@ -36,7 +39,7 @@ grow_vertical = 2
|
|||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "<Swarm>"
|
||||
text = "Swarm"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
|
||||
|
|
@ -280,6 +283,21 @@ fit_content = true
|
|||
layout_mode = 2
|
||||
text = "Close"
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = -1
|
||||
|
||||
[node name="Panel" type="Panel" parent="CanvasLayer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ah4bq")
|
||||
|
||||
[node name="Insects" type="Node2D" parent="."]
|
||||
z_index = -1
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HostButton" to="." method="_on_host_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/JoinButton" to="." method="_on_join_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/SingleplayerButton" to="." method="_on_rules_button_pressed"]
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue