first commit

This commit is contained in:
zman27 2022-01-26 22:36:30 -05:00
commit b5082f86b1
25 changed files with 566 additions and 0 deletions

BIN
Art/Clearie 01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

35
Art/Clearie 01.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Clearie 01.png-77f4217047e464eb907c9a1ef1148811.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Clearie 01.png"
dest_files=[ "res://.import/Clearie 01.png-77f4217047e464eb907c9a1ef1148811.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

BIN
Art/Corkscrew 04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Corkscrew 04.png-6ee92a02fd4ab60092465f6c8fde4d17.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Corkscrew 04.png"
dest_files=[ "res://.import/Corkscrew 04.png-6ee92a02fd4ab60092465f6c8fde4d17.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

BIN
Art/DemoTowers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

35
Art/DemoTowers.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/DemoTowers.png-81193a16bf178c79f8915646f68d90f1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/DemoTowers.png"
dest_files=[ "res://.import/DemoTowers.png-81193a16bf178c79f8915646f68d90f1.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

BIN
Art/Extra02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

35
Art/Extra02.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Extra02.png-bda0e2d6f41521ca65335466a5a597d7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Extra02.png"
dest_files=[ "res://.import/Extra02.png-bda0e2d6f41521ca65335466a5a597d7.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

BIN
Art/Extras-07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

35
Art/Extras-07.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Extras-07.png-0f3762f841ed573a33bcc045f6e3b711.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Extras-07.png"
dest_files=[ "res://.import/Extras-07.png-0f3762f841ed573a33bcc045f6e3b711.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

BIN
Art/LevelBackground.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/LevelBackground.png-925a1cb64c7367da07a35afa52738afc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/LevelBackground.png"
dest_files=[ "res://.import/LevelBackground.png-925a1cb64c7367da07a35afa52738afc.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

BIN
Art/Steelie 01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

35
Art/Steelie 01.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Steelie 01.png-d5f4b3609c0cfe00116b346d82c9c0ee.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Steelie 01.png"
dest_files=[ "res://.import/Steelie 01.png-d5f4b3609c0cfe00116b346d82c9c0ee.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

19
Balls/Ball.gd Normal file
View File

@ -0,0 +1,19 @@
extends RigidBody2D
var held = false
func _physics_process(delta):
if held:
global_transform.origin = get_global_mouse_position()
func drop(impulse=Vector2.ZERO):
if held:
mode = RigidBody2D.MODE_RIGID
apply_central_impulse(impulse)
held = false

27
Balls/Ball.tscn Normal file
View File

@ -0,0 +1,27 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Art/Extra02.png" type="Texture" id=1]
[ext_resource path="res://Balls/Ball.gd" type="Script" id=2]
[sub_resource type="PhysicsMaterial" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 9.5
[node name="Ball" type="RigidBody2D" groups=[
"Balls",
]]
collision_layer = 15
collision_mask = 4
physics_material_override = SubResource( 2 )
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 0.560606, 0.560606 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2( 2, 2 )
shape = SubResource( 1 )
[connection signal="input_event" from="." to="." method="_on_Ball_input_event"]

7
Cups/Cup.gd Normal file
View File

@ -0,0 +1,7 @@
extends Area2D
func _on_Cup_body_entered(body: Node) -> void:
if body.is_in_group("Balls"):
print("Yatta!")
body.queue_free()

18
Cups/Cup.tscn Normal file
View File

@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Art/Extras-07.png" type="Texture" id=1]
[ext_resource path="res://Cups/Cup.gd" type="Script" id=2]
[node name="Cup" type="Area2D" groups=[
"Buckets",
]]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
flip_v = true
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 28, 4, -28, 4, 0, 23 )
[connection signal="body_entered" from="." to="." method="_on_Cup_body_entered"]

31
ServeArea.gd Normal file
View File

@ -0,0 +1,31 @@
extends Area2D
var ball
var held_object = null
func _on_TextureButton_button_down() -> void:
ball = load("res://Balls/Ball.tscn").instance()
ball.position = get_global_mouse_position()
ball.mode = RigidBody2D.MODE_STATIC
ball.held = true
held_object = ball
add_child(ball)
func _on_TextureButton_button_up() -> void:
held_object.drop(Input.get_last_mouse_speed())
ball.held = false
held_object = null
func _on_ServeArea_mouse_exited() -> void:
print("Gone")
if held_object != null:
_on_TextureButton_button_up()

43
World.tscn Normal file
View File

@ -0,0 +1,43 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://ServeArea.gd" type="Script" id=1]
[ext_resource path="res://Cups/Cup.tscn" type="PackedScene" id=2]
[ext_resource path="res://Art/LevelBackground.png" type="Texture" id=3]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 267.75, 124 )
[node name="World" type="Node2D"]
[node name="TextureRect" type="TextureRect" parent="."]
margin_left = 2.0
margin_right = 536.0
margin_bottom = 957.0
texture = ExtResource( 3 )
expand = true
flip_v = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ServeArea" type="Area2D" parent="."]
script = ExtResource( 1 )
[node name="TextureButton" type="TextureButton" parent="ServeArea"]
margin_right = 539.0
margin_bottom = 249.0
mouse_filter = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="ServeArea"]
position = Vector2( 268.25, 124 )
shape = SubResource( 1 )
[node name="Cup" parent="." instance=ExtResource( 2 )]
position = Vector2( 266, 908 )
[connection signal="mouse_exited" from="ServeArea" to="ServeArea" method="_on_ServeArea_mouse_exited"]
[connection signal="button_down" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_down"]
[connection signal="button_up" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_up"]

7
default_env.tres Normal file
View File

@ -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 )

86
gml.gd Normal file
View File

@ -0,0 +1,86 @@
# Skip's attempts to recreate common GML commands in Godot
class_name GML
# [ SIGNAL CHEATSHEET ]
#
# Declare and emit (with args) signal from source.
# <Projectile.gd>
# signal hit
# func _on_Hero_body_entered:
# emit_signal("hit", "fck that hurt", 1)
#
# Connect and handle (with args) signal from destination.
# <Hero.gd>
# func _ready:
# var proj = get_tree().get_root().find_node("Projectile",true,false)
# proj.connect("hit", self, "handle_hit")
# func handle_hit(message, damage):
# print(message)
# health -= damage
static func choose(choices):
# Picks a random item from a given array, "choices", of any size.
# Ex: cardinal = choose(["north", "south", "east", "west"])
return choices[randi() % choices.size()]
static func instance_create(x, y, scene_path, parent) -> Node:
# Creates an instance of a given node at the given coordinates
# as a child of a given parent.
# Ex: instance_create(30, 100, "res://Actors/EnemyShip.tscn", self)
var scene = load(scene_path)
var id = scene.instance()
id.position = Vector2(x, y)
parent.add_child(id)
return id
static func image_angle(me, degrees):
me.rotation_degrees = degrees
static func point_direction(x1, y1, x2, y2) -> float:
# Returns the angle (in degrees) specified by two given points.
# Ex: rotation_degrees = point_direction($Hero.position.x, $Hero.position.y, $Enemy.position.x, $Enemy.position.y)
return rad2deg(Vector2(x2, y2).angle_to_point(Vector2(x1, y1)))
static func move_xy(distance, angle_in_degrees) -> Vector2:
# Returns new (relative) coordinates depicting a point having moved a given distance (in pixels) in a given direction (angle in degrees).
# Ex: Enemy.position += move_xy(speed, Hero.position.angle_to_point(Enemy.position))
return Vector2(cos(deg2rad(angle_in_degrees)),sin(deg2rad(angle_in_degrees))) * distance
static func distance_to_object(node1, node2) -> float:
# Returns the distance between node1 and node2 (in pixels)
# Ex: if distance_to_object(self, $Alarm) < 50:
return node1.position.distance_to(node2.position)
static func game_end(me):
# Quit the game.
# Ex: game_end(self)
me.get_tree().quit()
static func room_restart(me):
# Restart the scene.
# Ex: room_restart(self)
me.get_tree().reload_current_scene()

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

35
icon.png.import Normal file
View File

@ -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

48
project.godot Normal file
View File

@ -0,0 +1,48 @@
; 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
_global_script_classes=[ {
"base": "Reference",
"class": "GML",
"language": "GDScript",
"path": "res://gml.gd"
} ]
_global_script_class_icons={
"GML": ""
}
[application]
config/name="Pachinko"
run/main_scene="res://World.tscn"
config/icon="res://icon.png"
[display]
window/size/width=540
window/size/height=960
window/stretch/mode="2d"
window/stretch/aspect="keep_width"
[layer_names]
2d_physics/layer_1="Walls"
2d_physics/layer_2="Pins"
2d_physics/layer_3="Balls"
2d_physics/layer_4="Cups"
2d_physics/layer_5="Items"
[physics]
common/enable_pause_aware_picking=true
[rendering]
environment/default_environment="res://default_env.tres"