+ panty tunnel

This commit is contained in:
Dooho Yi 2023-10-24 20:36:25 +09:00
parent c71ee51cc0
commit 009d7ebf6e
21 changed files with 1049 additions and 0 deletions

206
pantyTunnel/Clicks.pd Normal file
View file

@ -0,0 +1,206 @@
#N canvas 199 278 446 513 12;
#X obj 21 22 r fromGodot\$0;
#X obj 21 46 list trim;
#X obj 303 253 hsl 100 20 -1 1 0 0 empty empty empty -2 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 300 349 line~;
#X msg 300 325 \$1 100;
#X obj 300 278 expr ($f1 + 1)/8;
#X floatatom 300 302 5 0 0 0 - - - 0;
#N canvas 68 97 450 300 pan2~ 0;
#X obj 51 98 cos~;
#X obj 111 98 cos~;
#X obj 33 128 *~;
#X obj 93 128 *~;
#X obj 33 158 outlet~;
#X obj 93 158 outlet~;
#X obj 33 24 inlet~;
#X obj 111 24 inlet~;
#X obj 111 74 +~ 0.75;
#X connect 0 0 2 1;
#X connect 1 0 3 1;
#X connect 2 0 4 0;
#X connect 3 0 5 0;
#X connect 6 0 2 0;
#X connect 6 0 3 0;
#X connect 7 0 8 0;
#X connect 7 0 0 0;
#X connect 8 0 1 0;
#X restore 199 437 pd pan2~;
#X obj 199 467 dac~ 1 2;
#X obj 199 407 *~;
#X obj 189 127 unpack f f;
#X floatatom 296 159 5 0 0 0 - - - 0;
#X obj 296 182 sin;
#X floatatom 296 206 5 0 0 0 - - - 0;
#X obj 21 120 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 361 21 loadbang;
#X obj 21 70 route bang panvol param preset;
#X msg 359 58 \; pd dsp 1;
#N canvas 590 23 1243 806 Clicks 0;
#X obj 96 599 outlet~;
#X obj 265 49 r \$0-preset;
#X obj 665 540 s \$0-preset;
#X obj 609 53 inlet;
#X obj 217 47 inlet;
#X floatatom 220 179 5 0 0 0 - - - 0;
#X floatatom 264 181 5 0 0 0 - - - 0;
#X floatatom 172 180 5 0 0 0 - - - 0;
#X floatatom 306 181 5 0 0 0 - - - 0;
#X obj 98 540 cos~;
#X obj 99 566 *~ 0.1;
#X obj 98 504 expr~ if($v1 == 0 \, $v2 \, $v3);
#X obj 98 471 expr~ $v1 < $v2;
#X obj 100 382 wrap~;
#X obj 116 427 expr~ $v3*$v1/$v2;
#X obj 257 425 expr~ (1-$v3)*($v1-$v2)/(1-$v2)+$v3;
#X floatatom 439 246 5 0 0 0 - - - 0;
#X floatatom 274 292 5 0 2 0 - - - 0;
#X obj 100 355 *~;
#X obj 181 307 samphold~;
#X obj 101 318 +~;
#X obj 102 290 phasor~;
#X obj 211 272 *~;
#X obj 213 243 phasor~;
#X floatatom 213 211 5 0 0 0 - - - 0;
#X floatatom 103 240 5 0 0 0 - - - 0;
#X floatatom 310 211 5 0 0 0 - - - 0;
#X obj 317 262 / 100;
#X text 353 326 d (0~+1);
#X text 260 210 Slave;
#X floatatom 350 182 5 0 0 0 - - - 0;
#X obj 229 136 unpack f f f f f;
#X obj 610 79 sel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
#X msg 613 109 1.25 1000 1.01 11.5 1.83;
#X msg 634 137 4.25 177 0.86 12.5 1.96;
#X msg 658 165 19.25 21 0.49 105.5 0.96;
#X msg 682 191 348.2 -2 1.49 1317 1.04;
#X msg 706 215 290.2 0 -0.04 1156 1.24;
#X msg 729 238 285.2 0 -0.03 512.6 1.68;
#X msg 752 267 0.25 13 0.89 2000 1.78;
#X msg 771 293 -0.05 13 0.89 2000 1.78;
#X msg 792 321 -0.01 11.16 0.89 5000 0.69;
#X msg 809 353 0.14 82.16 0.58 4141 1.05;
#X msg 828 381 596.1 7 1.81 1000 1.07;
#X msg 844 412 9.87 440.7 2.01 18.5 25.83;
#X msg 864 437 1.87 225.7 0.13 18.38 22.83;
#X msg 878 463 16.87 55 20.5 -18.9 22.76;
#X msg 896 491 -0.05 21.69 2.35 3.58 22.76;
#X msg 914 516 19.95 21.69 2.35 0.58 27.76;
#X text 350 212 comment, f 2;
#X text 39 240 comment;
#N canvas 0 22 450 278 (subpatch) 0;
#X array scope 100 float 3;
#A 0 0.791709 0.792441 0.793172 0.793933 0.794694 0.795425 0.79618 0.7969 0.79762 0.798368 0.799088 0.799808 0.800557 0.801276 0.801996 0.92 0.92 0.92 0.92 0.91 0.900001 0.890001 0.880001 0.864001 0.848002 0.832002 0.816003 0.800003 0.784003 0.768004 0.752004 0.736005 0.720005 0.700005 0.680006 0.660006 0.640007 0.620007 0.600008 0.580008 0.560009 0.542867 0.525724 0.508582 0.491439 0.474297 0.457154 0.440012 0.42287 0.405727 0.388585 0.371442 0.3543 0.337157 0.320015 0.305729 0.291444 0.277159 0.262873 0.248588 0.234303 0.220017 0.205732 0.191447 0.177161 0.162876 0.148591 0.134305 0.12002 0.0933539 0.0666878 0.0400218 0.0133558 -0.0133102 -0.0399762 -0.0599757 -0.0799752 -0.0999747 -0.119974 -0.139974 -0.159973 -0.179973 -0.199972 -0.219972 -0.239971 -0.27997 -0.319969 -0.359968 -0.399967 -0.439966 -0.639961 -0.659961 -0.67996 2.87994 2.91994 2.95994 3.01994 3.07993 3.13993 3.43993;
#X coords 0 1 100 -1 150 50 1 0 0;
#X restore 211 568 graph;
#X connect 1 0 31 0;
#X connect 3 0 32 0;
#X connect 4 0 31 0;
#X connect 5 0 24 0;
#X connect 6 0 17 0;
#X connect 7 0 25 0;
#X connect 8 0 26 0;
#X connect 9 0 10 0;
#X connect 10 0 0 0;
#X connect 11 0 9 0;
#X connect 12 0 11 0;
#X connect 13 0 12 0;
#X connect 13 0 14 0;
#X connect 13 0 15 0;
#X connect 14 0 11 1;
#X connect 15 0 11 2;
#X connect 16 0 15 2;
#X connect 16 0 14 2;
#X connect 17 0 14 1;
#X connect 17 0 15 1;
#X connect 17 0 12 1;
#X connect 18 0 13 0;
#X connect 19 0 18 1;
#X connect 20 0 18 0;
#X connect 21 0 20 0;
#X connect 21 0 19 1;
#X connect 22 0 19 0;
#X connect 23 0 22 0;
#X connect 24 0 23 0;
#X connect 25 0 21 0;
#X connect 26 0 27 0;
#X connect 27 0 22 1;
#X connect 30 0 16 0;
#X connect 31 0 7 0;
#X connect 31 1 5 0;
#X connect 31 2 6 0;
#X connect 31 3 8 0;
#X connect 31 4 30 0;
#X connect 32 0 33 0;
#X connect 32 1 34 0;
#X connect 32 2 35 0;
#X connect 32 3 36 0;
#X connect 32 4 37 0;
#X connect 32 5 38 0;
#X connect 32 6 39 0;
#X connect 32 7 40 0;
#X connect 32 8 41 0;
#X connect 32 9 42 0;
#X connect 32 10 43 0;
#X connect 32 11 44 0;
#X connect 32 12 45 0;
#X connect 32 13 46 0;
#X connect 32 14 47 0;
#X connect 32 15 48 0;
#X connect 33 0 2 0;
#X connect 34 0 2 0;
#X connect 35 0 2 0;
#X connect 36 0 2 0;
#X connect 37 0 2 0;
#X connect 38 0 2 0;
#X connect 39 0 2 0;
#X connect 40 0 2 0;
#X connect 41 0 2 0;
#X connect 42 0 2 0;
#X connect 43 0 2 0;
#X connect 44 0 2 0;
#X connect 45 0 2 0;
#X connect 46 0 2 0;
#X connect 47 0 2 0;
#X connect 48 0 2 0;
#X restore 30 300 pd Clicks;
#X obj 189 264 line~;
#X msg 189 240 \$1 100;
#X floatatom 189 177 5 0 0 0 - - - 0;
#X obj 132 310 switch~;
#X obj 132 286 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 132 262 change;
#X text 89 155 switch on/off before 0 to stop startup pops, f 12;
#X obj 189 216 max 0;
#X obj 203 336 *~;
#X obj 132 238 > -0.3;
#X connect 0 0 1 0;
#X connect 1 0 16 0;
#X connect 2 0 5 0;
#X connect 3 0 7 1;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X connect 7 0 8 0;
#X connect 7 1 8 1;
#X connect 9 0 8 0;
#X connect 9 0 8 1;
#X connect 10 0 21 0;
#X connect 10 1 11 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 2 0;
#X connect 16 0 14 0;
#X connect 16 1 10 0;
#X connect 16 3 18 1;
#X connect 18 0 9 0;
#X connect 19 0 27 0;
#X connect 19 0 27 1;
#X connect 20 0 19 0;
#X connect 21 0 26 0;
#X connect 21 0 28 0;
#X connect 23 0 22 0;
#X connect 24 0 23 0;
#X connect 26 0 20 0;
#X connect 27 0 9 1;
#X connect 28 0 24 0;

106
pantyTunnel/Player.gd Normal file
View file

@ -0,0 +1,106 @@
extends KinematicBody
#const GRAVITY = -24.8
const GRAVITY = -10
var vel = Vector3()
const MAX_SPEED = 6
#const JUMP_SPEED = 18
const JUMP_SPEED = 6
#const ACCEL = 4.5
const ACCEL = 2
var dir = Vector3()
const DEACCEL= 16
const MAX_SLOPE_ANGLE = 40
var camera
var rotation_helper
var MOUSE_SENSITIVITY = 0.05
func _ready():
camera = $Rotation_Helper/Camera
rotation_helper = $Rotation_Helper
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _physics_process(delta):
process_input(delta)
process_movement(delta)
func process_input(delta):
# ----------------------------------
# Walking
dir = Vector3()
var cam_xform = camera.get_global_transform()
var input_movement_vector = Vector3()
if Input.is_action_pressed("move_forward"):
input_movement_vector.y += 1
if Input.is_action_pressed("move_backward"):
input_movement_vector.y -= 1
if Input.is_action_pressed("move_left"):
input_movement_vector.x -= 1
if Input.is_action_pressed("move_right"):
input_movement_vector.x += 1
input_movement_vector = input_movement_vector.normalized()
# Basis vectors are already normalized.
dir += -cam_xform.basis.z * input_movement_vector.y
dir += cam_xform.basis.x * input_movement_vector.x
# ----------------------------------
# ----------------------------------
# Jumping
if is_on_floor():
if Input.is_action_just_pressed("move_jump"):
vel.y = JUMP_SPEED
# ----------------------------------
# ----------------------------------
# Capturing/Freeing the cursor
if Input.is_action_just_pressed("ui_cancel"):
if Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
else:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
# ----------------------------------
func process_movement(delta):
dir.y = 0
dir = dir.normalized()
vel.y += delta * GRAVITY
var hvel = vel
hvel.y = 0
var target = dir
target *= MAX_SPEED
var accel
if dir.dot(hvel) > 0:
accel = ACCEL
else:
accel = DEACCEL
hvel = hvel.linear_interpolate(target, accel * delta)
vel.x = hvel.x
vel.z = hvel.z
vel = move_and_slide(vel, Vector3(0, 1, 0), 0.05, 4, deg2rad(MAX_SLOPE_ANGLE))
# emit signal - playerinfo_updated
Events.emit_signal("player_transform_updated", $Rotation_Helper/Camera.get_global_translation(), $Rotation_Helper.global_rotation.y)
func _input(event):
if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
rotation_helper.rotate_x(deg2rad(event.relative.y * MOUSE_SENSITIVITY))
self.rotate_y(deg2rad(event.relative.x * MOUSE_SENSITIVITY * -1))
var camera_rot = rotation_helper.rotation_degrees
camera_rot.x = clamp(camera_rot.x, -70, 70)
rotation_helper.rotation_degrees = camera_rot

33
pantyTunnel/Player.tscn Normal file
View file

@ -0,0 +1,33 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[sub_resource type="CapsuleShape" id=1]
radius = 0.6
height = 2.0
[node name="Player" type="KinematicBody"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.52113, 0.98772 )
script = ExtResource( 1 )
[node name="Capsule" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
shape = SubResource( 1 )
[node name="Rotation_Helper" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
[node name="Camera" type="Camera" parent="Rotation_Helper"]
far = 10000.0
[node name="SpotLight" type="SpotLight" parent="Rotation_Helper/Camera"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0473127, 0 )
light_color = Color( 0.992157, 0.905882, 0.913725, 1 )
light_energy = 2.468
shadow_enabled = true
shadow_color = Color( 0.396078, 0.854902, 0.937255, 1 )
shadow_bias = 0.191
spot_range = 18.298
spot_attenuation = 1.86607
spot_angle = 33.44
spot_angle_attenuation = 2.63902

12
pantyTunnel/Scene.gd Normal file
View file

@ -0,0 +1,12 @@
extends Node
var morae = load("res://morae.tscn")
func _ready():
randomize()
for i in range(120):
var mr = morae.instance()
mr.set_preset(i%16 + 1)
mr.audible_range_max = 20
add_child(mr)
mr.look_at_from_position(Vector3(rand_range(-13, -700), rand_range(10, 0), rand_range(-13, 13)), Vector3.ZERO, Vector3.UP)

67
pantyTunnel/Scene.tscn Normal file
View file

@ -0,0 +1,67 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scene.gd" type="Script" id=3]
[sub_resource type="Environment" id=12]
background_mode = 1
background_color = Color( 1, 0.827451, 0.807843, 1 )
background_energy = 0.0
[sub_resource type="CubeMesh" id=2]
size = Vector3( 30, 1, 30 )
[sub_resource type="ConvexPolygonShape" id=5]
points = PoolVector3Array( -15.1145, -0.617995, -15.1181, 15.1152, 0.562877, 15.1181, -15.1145, 0.562877, 15.1181, 15.1152, -0.617995, 15.1181, 15.1152, 0.562877, -15.1181, -15.1145, -0.617995, 15.1181, -15.1145, 0.562877, -15.1181, 15.1152, -0.617995, -15.1181 )
[sub_resource type="ConvexPolygonShape" id=6]
points = PoolVector3Array( -15.1145, -0.617995, -15.1181, 15.1152, 0.562877, 15.1181, -15.1145, 0.562877, 15.1181, 15.1152, -0.617995, 15.1181, 15.1152, 0.562877, -15.1181, -15.1145, -0.617995, 15.1181, -15.1145, 0.562877, -15.1181, 15.1152, -0.617995, -15.1181 )
[sub_resource type="ConvexPolygonShape" id=7]
points = PoolVector3Array( -15.1145, -0.617995, -15.1181, 15.1152, 0.562877, 15.1181, -15.1145, 0.562877, 15.1181, 15.1152, -0.617995, 15.1181, 15.1152, 0.562877, -15.1181, -15.1145, -0.617995, 15.1181, -15.1145, 0.562877, -15.1181, 15.1152, -0.617995, -15.1181 )
[node name="Scene" type="Node"]
script = ExtResource( 3 )
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 12 )
[node name="Player" parent="." instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -209.703, 4.44058, 1.41403 )
collision_layer = 2
[node name="wall1" type="StaticBody" parent="."]
transform = Transform( -4.37114e-08, 1, 0, -0.866025, -3.78552e-08, 0.5, 0.5, 2.18557e-08, 0.866025, -270, 0, -6 )
collision_mask = 0
[node name="MeshInstance" type="MeshInstance" parent="wall1"]
transform = Transform( 1, -3.88235e-23, 3.39406e-29, 0, -4.37114e-08, -20, 3.88235e-23, 1, -8.74228e-07, 9.53674e-07, -213, 15 )
mesh = SubResource( 2 )
[node name="CollisionShape" type="CollisionShape" parent="wall1"]
transform = Transform( 0.915719, 0.40182, -2.77601e-07, -3.68402e-09, -2.61473e-08, -20, -0.40182, 0.915719, -4.49265e-07, -2.86102e-06, -213, 15 )
shape = SubResource( 5 )
[node name="wall2" type="StaticBody" parent="."]
transform = Transform( -4.37114e-08, 1, 0, -0.866025, -3.78552e-08, -0.5, -0.5, -2.18557e-08, 0.866025, -270, 0, 6 )
collision_mask = 0
[node name="MeshInstance" type="MeshInstance" parent="wall2"]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -20, 0, 1, -8.74228e-07, 0, -211, -15 )
mesh = SubResource( 2 )
[node name="CollisionShape" type="CollisionShape" parent="wall2"]
transform = Transform( 0.842124, -0.539285, 6.09479e-07, -6.901e-09, -6.72843e-08, -20, 0.539285, 0.842124, -1.20767e-06, -9.53674e-07, -211, -15 )
shape = SubResource( 6 )
[node name="floor" type="StaticBody" parent="."]
transform = Transform( -0.00315908, 0.999995, 0, -0.999995, -0.00315908, 0, 0, 0, 1, -274.978, 17.1167, 0 )
collision_mask = 0
[node name="MeshInstance" type="MeshInstance" parent="floor"]
transform = Transform( -4.37114e-08, -1, 8.74228e-07, 0, -4.37114e-08, -20, 1, -4.37114e-08, 3.82137e-14, 15, -207, 0 )
mesh = SubResource( 2 )
[node name="CollisionShape" type="CollisionShape" parent="floor"]
transform = Transform( -4.37114e-08, -1, 8.74228e-07, 0, -4.37114e-08, -20, 1, -4.37114e-08, 3.82137e-14, 15, -207, 0 )
shape = SubResource( 7 )

View file

@ -0,0 +1,8 @@
[gd_resource type="NativeScript" load_steps=2 format=2]
[ext_resource path="res://addons/gdpd/bin/libgdpd.gdnlib" type="GDNativeLibrary" id=1]
[resource]
resource_name = "gdpd"
class_name = "Gdpd"
library = ExtResource( 1 )

View file

@ -0,0 +1,18 @@
[general]
singleton=false
load_once=false
symbol_prefix="godot_"
reloadable=true
[entry]
X11.64="res://addons/gdpd/bin/x11/libgdpd.so"
Windows.64="res://addons/gdpd/bin/win/libgdpd.dll"
OSX.64="res://addons/gdpd/bin/osx/libgdpd.dylib"
[dependencies]
X11.64=[ ]
Windows.64=[ ]
OSX.64=[ ]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,5 @@
extends Node
signal player_transform_updated(position, heading)
# position : Vector3
# heading : Vector2 (projected x-z plane, and normalized)

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://autoload/Events.gd" type="Script" id=1]
[node name="Events" type="Node"]
script = ExtResource( 1 )

View file

@ -0,0 +1,93 @@
extends Node
#gdpd (pd interface with godot)
var _gdpd
var _patches = []
export (bool) var _enable_gui = false
export (String) var _gui_path = "/Applications/Pd-0.53-1.app/Contents/Resources"
export (bool) var _verbose = false
export (int) var _sample_rate = 48000
export (int) var _blocksize = 256
func _ready():
_gdpd = load("res://addons/gdpd/bin/gdpd.gdns").new()
if _enable_gui:
# set gui path to activate gui window (otherwise, nogui)
_gdpd.set_gui_path(_gui_path)
_gdpd.set_volume(1) # by default, volume(gain) == 0
_gdpd.set_verbose(_verbose) # by default, suppress 'print'
_gdpd.init(0, 2, _sample_rate, _blocksize)
_gdpd.computeAudio(true) # [; pd dsp 1 (
_gdpd.subscribe("toGodot")
# delayed 'stream start' to prevent start-up 'pop' noise.
yield(get_tree().create_timer(0.3), "timeout")
_gdpd.streamstart()
func _exit_tree():
if _patches.size() != 0:
print()
print("! ======== * purging leftover opened patches ... * ======== !")
print()
for id in _patches:
_gdpd.closePatch(id)
_patches.clear()
_gdpd.stop()
func load_patch(pd_patch) -> int:
#the patch path should be the absolute one
#separate file name from directory
var patch_name = pd_patch.split("/")[-1]
var patch_dir = pd_patch.trim_suffix(patch_name)
var id = _gdpd.openPatch(patch_name, patch_dir)
_patches.append(id)
return id
func close_patch(id):
if id in _patches:
_gdpd.closePatch(id)
_patches.erase(id)
func _process(_delta) :
while _gdpd.has_message():
var msg = _gdpd.get_next()
print(msg)
# if msg[0] == "random":
# print("r")
# ==== archived. ====
# duplicate "res://" into 'user://' ==> we need godot 4 for this approach..
# _copydirectory_recursive("res://", "user://")
## copy directory recursively ==> we need godot 4 for this approach..
#func _copydirectory_recursive(src, dst):
# var dotfolders = RegEx.new()
# dotfolders.compile("^\\.\\w*")
# var pdfiles = RegEx.new()
# pdfiles.compile("\\w+\\.pd$")
# var dir = Directory.new()
# if dir.open(src) == OK:
# dir.list_dir_begin()
# var file_name = dir.get_next()
# while file_name != "":
# if dir.current_is_dir():
# print("Found directory: " + file_name)
# if not dotfolders.search(file_name):
# dir.make_dir(dst + "/" + file_name)
# _copydirectory_recursive(dir.get_current_dir() + "/" + file_name, dst + "/" + file_name)
# else:
# if pdfiles.search(file_name):
# print("Found puredata file: " + file_name)
# dir.copy(src + "/" + file_name, dst + "/" + file_name)
#
# file_name = dir.get_next()
# else:
# print("An error occurred when trying to access the path. : " + src)

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://autoload/Global.gd" type="Script" id=1]
[node name="Global" type="Node"]
script = ExtResource( 1 )

View file

@ -0,0 +1,8 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
sun_energy = 0.0
[resource]
background_mode = 2
background_sky = SubResource( 1 )

View file

@ -0,0 +1,73 @@
[preset.0]
name="Mac OSX"
platform="Mac OSX"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="./Sands and Waves (panty tunnel).dmg"
script_export_mode=1
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
application/name=""
application/info="Made with Godot Engine"
application/icon=""
application/identifier="org.sandreceive.pantytunnel"
application/signature=""
application/app_category="Games"
application/short_version="1.0"
application/version="1.0"
application/copyright=""
display/high_res=false
privacy/microphone_usage_description=""
privacy/camera_usage_description=""
privacy/location_usage_description=""
privacy/address_book_usage_description=""
privacy/calendar_usage_description=""
privacy/photos_library_usage_description=""
privacy/desktop_folder_usage_description=""
privacy/documents_folder_usage_description=""
privacy/downloads_folder_usage_description=""
privacy/network_volumes_usage_description=""
privacy/removable_volumes_usage_description=""
codesign/enable=true
codesign/identity=""
codesign/timestamp=false
codesign/hardened_runtime=false
codesign/replace_existing_signature=true
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=true
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/custom_options=PoolStringArray( )
notarization/enable=false
notarization/apple_id_name=""
notarization/apple_id_password=""
notarization/apple_team_id=""
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false

BIN
pantyTunnel/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

89
pantyTunnel/morae.gd Normal file
View file

@ -0,0 +1,89 @@
extends RigidBody
export (float, 0, 120) var audible_range_max = 20.0
export (float, 1, 16) var preset = 1
export (bool) var use_embeded_patch = false
export (String, MULTILINE) var patch = ""
var _my_patch = "user://Clicks.pd"
var _my_id = 0
func set_param(param):
Global._gdpd.start_message(param.size()+1)
Global._gdpd.add_symbol("param")
for i in range(param.size()):
Global._gdpd.add_float(param[i])
Global._gdpd.finish_list("fromGodot" + String(_my_id))
func set_preset(prs):
preset = prs
Global._gdpd.start_message(2)
Global._gdpd.add_symbol("preset")
Global._gdpd.add_float(prs)
Global._gdpd.finish_list("fromGodot" + String(_my_id))
func set_color(color):
$MeshInstance.material_override = SpatialMaterial.new()
$MeshInstance.material_override.albedo_color = color
func relocate(center, radius_range):
# relocate randomly into a circular zone
var rr = radius_range[1] - radius_range[0]
var displacement = polar2cartesian(randf()*rr+radius_range[0], randf()*2*PI)
var loc = center + displacement
look_at_from_position(Vector3(loc.x, randf()*2 + 1, loc.y), Vector3.FORWARD, Vector3.UP)
func _ready():
# save patch (for export)
if use_embeded_patch:
assert(_my_patch.substr(0, 7) == "user://", "use userpath with embeded_patch enabled !")
assert(patch != "", "patch is empty?")
_save_patch()
# load patch
_my_id = Global.load_patch(ProjectSettings.globalize_path(_my_patch))
# listen 'player_transform_updated' event
Events.connect("player_transform_updated", self, "_on_Events_player_transform_updated")
# send 'preset'
set_preset(preset)
func _on_Events_player_transform_updated(playerpos, playerheading):
var mypos = get_global_translation()
var mypos2d = Vector2(mypos.x, mypos.z)
var playerpos2d = Vector2(playerpos.x, playerpos.z)
# calculate distance
var distance = mypos.distance_to(playerpos)
# calculate angle
var angle = fmod(fmod(playerpos2d.angle_to_point(mypos2d) + playerheading - PI/2, PI*2) + PI*2, PI*2)
if angle > PI:
angle = angle - PI*2
# (check)
# print(str(_my_id) +" : ("+ str(distance) +","+ str(angle) +")")
# calculate gain
var gain = 1 - distance/audible_range_max
# send to the patch
Global._gdpd.start_message(3)
Global._gdpd.add_symbol("panvol")
Global._gdpd.add_float(gain)
Global._gdpd.add_float(angle)
Global._gdpd.finish_list("fromGodot" + String(_my_id))
func _exit_tree():
Global.close_patch(_my_id)
func _save_patch():
# save patch
# prepare directory
var patch_name = _my_patch.split("/")[-1]
var patch_dir = _my_patch.trim_suffix(patch_name)
var dir = Directory.new()
dir.make_dir_recursive(patch_dir)
# save to file
var file = File.new()
file.open(_my_patch, File.WRITE)
file.store_string(patch)
file.close()

244
pantyTunnel/morae.tscn Normal file
View file

@ -0,0 +1,244 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://morae.gd" type="Script" id=1]
[sub_resource type="CapsuleShape" id=1]
[sub_resource type="Gradient" id=4]
colors = PoolColorArray( 0.551183, 0.669772, 0.874865, 1, 0.759774, 0.917833, 0.372567, 1 )
[sub_resource type="GradientTexture" id=5]
gradient = SubResource( 4 )
[sub_resource type="SpatialMaterial" id=6]
render_priority = 1
albedo_texture = SubResource( 5 )
metallic = 0.46
[sub_resource type="CapsuleMesh" id=2]
material = SubResource( 6 )
radius = 0.542
[sub_resource type="SpatialMaterial" id=3]
albedo_color = Color( 0.996078, 0.894118, 0.0666667, 1 )
[node name="morae" type="RigidBody"]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
script = ExtResource( 1 )
use_embeded_patch = true
patch = "#N canvas 199 278 446 513 12;
#X obj 21 22 r fromGodot\\$0;
#X obj 21 46 list trim;
#X obj 303 253 hsl 100 20 -1 1 0 0 empty empty empty -2 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 300 349 line~;
#X msg 300 325 \\$1 100;
#X obj 300 278 expr ($f1 + 1)/8;
#X floatatom 300 302 5 0 0 0 - - - 0;
#N canvas 68 97 450 300 pan2~ 0;
#X obj 51 98 cos~;
#X obj 111 98 cos~;
#X obj 33 128 *~;
#X obj 93 128 *~;
#X obj 33 158 outlet~;
#X obj 93 158 outlet~;
#X obj 33 24 inlet~;
#X obj 111 24 inlet~;
#X obj 111 74 +~ 0.75;
#X connect 0 0 2 1;
#X connect 1 0 3 1;
#X connect 2 0 4 0;
#X connect 3 0 5 0;
#X connect 6 0 2 0;
#X connect 6 0 3 0;
#X connect 7 0 8 0;
#X connect 7 0 0 0;
#X connect 8 0 1 0;
#X restore 199 437 pd pan2~;
#X obj 199 467 dac~ 1 2;
#X obj 199 407 *~;
#X obj 189 127 unpack f f;
#X floatatom 296 159 5 0 0 0 - - - 0;
#X obj 296 182 sin;
#X floatatom 296 206 5 0 0 0 - - - 0;
#X obj 21 120 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 361 21 loadbang;
#X obj 21 70 route bang panvol param preset;
#X msg 359 58 \\; pd dsp 1;
#N canvas 590 23 1243 806 Clicks 0;
#X obj 96 599 outlet~;
#X obj 265 49 r \\$0-preset;
#X obj 665 540 s \\$0-preset;
#X obj 609 53 inlet;
#X obj 217 47 inlet;
#X floatatom 220 179 5 0 0 0 - - - 0;
#X floatatom 264 181 5 0 0 0 - - - 0;
#X floatatom 172 180 5 0 0 0 - - - 0;
#X floatatom 306 181 5 0 0 0 - - - 0;
#X obj 98 540 cos~;
#X obj 99 566 *~ 0.1;
#X obj 98 504 expr~ if($v1 == 0 \\, $v2 \\, $v3);
#X obj 98 471 expr~ $v1 < $v2;
#X obj 100 382 wrap~;
#X obj 116 427 expr~ $v3*$v1/$v2;
#X obj 257 425 expr~ (1-$v3)*($v1-$v2)/(1-$v2)+$v3;
#X floatatom 439 246 5 0 0 0 - - - 0;
#X floatatom 274 292 5 0 2 0 - - - 0;
#X obj 100 355 *~;
#X obj 181 307 samphold~;
#X obj 101 318 +~;
#X obj 102 290 phasor~;
#X obj 211 272 *~;
#X obj 213 243 phasor~;
#X floatatom 213 211 5 0 0 0 - - - 0;
#X floatatom 103 240 5 0 0 0 - - - 0;
#X floatatom 310 211 5 0 0 0 - - - 0;
#X obj 317 262 / 100;
#X text 353 326 d (0~+1);
#X text 260 210 Slave;
#X floatatom 350 182 5 0 0 0 - - - 0;
#X obj 229 136 unpack f f f f f;
#X obj 610 79 sel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
#X msg 613 109 1.25 1000 1.01 11.5 1.83;
#X msg 634 137 4.25 177 0.86 12.5 1.96;
#X msg 658 165 19.25 21 0.49 105.5 0.96;
#X msg 682 191 348.2 -2 1.49 1317 1.04;
#X msg 706 215 290.2 0 -0.04 1156 1.24;
#X msg 729 238 285.2 0 -0.03 512.6 1.68;
#X msg 752 267 0.25 13 0.89 2000 1.78;
#X msg 771 293 -0.05 13 0.89 2000 1.78;
#X msg 792 321 -0.01 11.16 0.89 5000 0.69;
#X msg 809 353 0.14 82.16 0.58 4141 1.05;
#X msg 828 381 596.1 7 1.81 1000 1.07;
#X msg 844 412 9.87 440.7 2.01 18.5 25.83;
#X msg 864 437 1.87 225.7 0.13 18.38 22.83;
#X msg 878 463 16.87 55 20.5 -18.9 22.76;
#X msg 896 491 -0.05 21.69 2.35 3.58 22.76;
#X msg 914 516 19.95 21.69 2.35 0.58 27.76;
#X text 350 212 comment, f 2;
#X text 39 240 comment;
#N canvas 0 22 450 278 (subpatch) 0;
#X array scope 100 float 3;
#A 0 0.791709 0.792441 0.793172 0.793933 0.794694 0.795425 0.79618 0.7969 0.79762 0.798368 0.799088 0.799808 0.800557 0.801276 0.801996 0.92 0.92 0.92 0.92 0.91 0.900001 0.890001 0.880001 0.864001 0.848002 0.832002 0.816003 0.800003 0.784003 0.768004 0.752004 0.736005 0.720005 0.700005 0.680006 0.660006 0.640007 0.620007 0.600008 0.580008 0.560009 0.542867 0.525724 0.508582 0.491439 0.474297 0.457154 0.440012 0.42287 0.405727 0.388585 0.371442 0.3543 0.337157 0.320015 0.305729 0.291444 0.277159 0.262873 0.248588 0.234303 0.220017 0.205732 0.191447 0.177161 0.162876 0.148591 0.134305 0.12002 0.0933539 0.0666878 0.0400218 0.0133558 -0.0133102 -0.0399762 -0.0599757 -0.0799752 -0.0999747 -0.119974 -0.139974 -0.159973 -0.179973 -0.199972 -0.219972 -0.239971 -0.27997 -0.319969 -0.359968 -0.399967 -0.439966 -0.639961 -0.659961 -0.67996 2.87994 2.91994 2.95994 3.01994 3.07993 3.13993 3.43993;
#X coords 0 1 100 -1 150 50 1 0 0;
#X restore 211 568 graph;
#X connect 1 0 31 0;
#X connect 3 0 32 0;
#X connect 4 0 31 0;
#X connect 5 0 24 0;
#X connect 6 0 17 0;
#X connect 7 0 25 0;
#X connect 8 0 26 0;
#X connect 9 0 10 0;
#X connect 10 0 0 0;
#X connect 11 0 9 0;
#X connect 12 0 11 0;
#X connect 13 0 12 0;
#X connect 13 0 14 0;
#X connect 13 0 15 0;
#X connect 14 0 11 1;
#X connect 15 0 11 2;
#X connect 16 0 15 2;
#X connect 16 0 14 2;
#X connect 17 0 14 1;
#X connect 17 0 15 1;
#X connect 17 0 12 1;
#X connect 18 0 13 0;
#X connect 19 0 18 1;
#X connect 20 0 18 0;
#X connect 21 0 20 0;
#X connect 21 0 19 1;
#X connect 22 0 19 0;
#X connect 23 0 22 0;
#X connect 24 0 23 0;
#X connect 25 0 21 0;
#X connect 26 0 27 0;
#X connect 27 0 22 1;
#X connect 30 0 16 0;
#X connect 31 0 7 0;
#X connect 31 1 5 0;
#X connect 31 2 6 0;
#X connect 31 3 8 0;
#X connect 31 4 30 0;
#X connect 32 0 33 0;
#X connect 32 1 34 0;
#X connect 32 2 35 0;
#X connect 32 3 36 0;
#X connect 32 4 37 0;
#X connect 32 5 38 0;
#X connect 32 6 39 0;
#X connect 32 7 40 0;
#X connect 32 8 41 0;
#X connect 32 9 42 0;
#X connect 32 10 43 0;
#X connect 32 11 44 0;
#X connect 32 12 45 0;
#X connect 32 13 46 0;
#X connect 32 14 47 0;
#X connect 32 15 48 0;
#X connect 33 0 2 0;
#X connect 34 0 2 0;
#X connect 35 0 2 0;
#X connect 36 0 2 0;
#X connect 37 0 2 0;
#X connect 38 0 2 0;
#X connect 39 0 2 0;
#X connect 40 0 2 0;
#X connect 41 0 2 0;
#X connect 42 0 2 0;
#X connect 43 0 2 0;
#X connect 44 0 2 0;
#X connect 45 0 2 0;
#X connect 46 0 2 0;
#X connect 47 0 2 0;
#X connect 48 0 2 0;
#X restore 30 300 pd Clicks;
#X obj 189 264 line~;
#X msg 189 240 \\$1 100;
#X floatatom 189 177 5 0 0 0 - - - 0;
#X obj 132 310 switch~;
#X obj 132 286 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 132 262 change;
#X text 89 155 switch on/off before 0 to stop startup pops, f 12;
#X obj 189 216 max 0;
#X obj 203 336 *~;
#X obj 132 238 > -0.3;
#X connect 0 0 1 0;
#X connect 1 0 16 0;
#X connect 2 0 5 0;
#X connect 3 0 7 1;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X connect 7 0 8 0;
#X connect 7 1 8 1;
#X connect 9 0 8 0;
#X connect 9 0 8 1;
#X connect 10 0 21 0;
#X connect 10 1 11 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 2 0;
#X connect 16 0 14 0;
#X connect 16 1 10 0;
#X connect 16 3 18 1;
#X connect 18 0 9 0;
#X connect 19 0 27 0;
#X connect 19 0 27 1;
#X connect 20 0 19 0;
#X connect 21 0 26 0;
#X connect 21 0 28 0;
#X connect 23 0 22 0;
#X connect 24 0 23 0;
#X connect 26 0 20 0;
#X connect 27 0 9 1;
#X connect 28 0 24 0;
"
[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
shape = SubResource( 1 )
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
mesh = SubResource( 2 )
material/0 = SubResource( 3 )

75
pantyTunnel/project.godot Normal file
View file

@ -0,0 +1,75 @@
; 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="Sands and Waves (panty tunnel)"
run/main_scene="res://Scene.tscn"
config/icon="res://icon.png"
[autoload]
Global="*res://autoload/Global.tscn"
Events="*res://autoload/Events.tscn"
[display]
window/size/fullscreen=true
[gui]
common/drop_mouse_on_gui_input_disabled=true
[input]
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_forward={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_backward={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
toggle_mouse={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_jump={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
[layer_names]
3d_physics/layer_1="world"
3d_physics/layer_2="player"
3d_physics/layer_3="sounder"
[physics]
common/enable_pause_aware_picking=true
[rendering]
environment/default_environment="res://default_env.tres"