Compare commits

..

No commits in common. "6d78598711e0d0c4226a2056958330cd8cf0215f" and "3059cddacce2af7d428da4b44ffaf0dab3f00637" have entirely different histories.

11 changed files with 44 additions and 246 deletions

12
src/NPCs/Goblin.tscn Normal file
View File

@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://NPCs/goblin.png" type="Texture" id=1]
[node name="Goblin" type="KinematicBody2D"]
[node name="goblin" type="Sprite" parent="."]
position = Vector2( 0.380203, -0.127379 )
texture = ExtResource( 1 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( -2.66919, -3.30936, -2.58081, 2.92202, 2.41314, 2.92202, 2.36894, -3.35355 )

12
src/NPCs/Ooze.tscn Normal file
View File

@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://NPCs/ooze.png" type="Texture" id=1]
[node name="Ooze" type="KinematicBody2D"]
[node name="ooze" type="Sprite" parent="."]
position = Vector2( -0.061738, 0.18198 )
texture = ExtResource( 1 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 4.09251, -4.06066, 4.04832, 4.15946, -4.1276, 4.02687, -4.1718, -4.06066 )

View File

@ -1,34 +0,0 @@
extends KinematicBody2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
const MOVEMENT_VECTORS = [
Vector2.UP,
Vector2.RIGHT,
Vector2.DOWN,
Vector2.LEFT
]
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
var movement = MOVEMENT_VECTORS[randi() % 4]
move_and_collide(movement * 2)
pass
func _on_Hitbox_area_entered(area):
pass # Replace with function body.
func _on_Hurtbox_area_entered(area):
queue_free()
pass # Replace with function body.

View File

@ -1,39 +0,0 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://NPCs/goblin.png" type="Texture" id=1]
[ext_resource path="res://NPCs/goblin.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 3.90875, 3.7602 )
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4.13172, 3.98318 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 4.0574, 3.7602 )
[node name="goblin" type="KinematicBody2D"]
script = ExtResource( 2 )
[node name="goblin" type="Sprite" parent="."]
position = Vector2( 0.380203, -0.127379 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 32
collision_mask = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource( 1 )
[node name="Hurtbox" type="Area2D" parent="."]
collision_layer = 64
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
shape = SubResource( 3 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]

View File

@ -1,26 +0,0 @@
extends Area2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_Hitbox_area_entered(area):
pass # Replace with function body.
func _on_Hurtbox_area_entered(area):
queue_free()
pass # Replace with function body.

View File

@ -1,41 +1,12 @@
[gd_scene load_steps=6 format=2] [gd_scene load_steps=2 format=2]
[ext_resource path="res://NPCs/moss.png" type="Texture" id=1] [ext_resource path="res://NPCs/moss.png" type="Texture" id=1]
[ext_resource path="res://NPCs/moss.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=2] [node name="Moss" type="StaticBody2D"]
extents = Vector2( 3.73001, 3.41657 )
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 3.96625, 3.8103 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 3.96625, 3.96779 )
[node name="moss" type="Area2D"]
script = ExtResource( 2 )
[node name="moss" type="Sprite" parent="."] [node name="moss" type="Sprite" parent="."]
position = Vector2( 0.118118, -0.0393729 ) position = Vector2( 0.110608, -0.127491 )
scale = Vector2( 1.02953, 0.990157 )
texture = ExtResource( 1 ) texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
shape = SubResource( 2 ) polygon = PoolVector2Array( -3.90663, -4.01647, -3.77405, 3.8501, 4.04832, 3.8059, 4.09251, -4.01647 )
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 2147483650
collision_mask = 64
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource( 1 )
[node name="Hurtbox" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
shape = SubResource( 3 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_shape_entered" from="Hitbox" to="." method="_on_Hitbox_area_shape_entered"]
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]

View File

@ -1,33 +0,0 @@
extends KinematicBody2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
const MOVEMENT_VECTORS = [
Vector2.UP,
Vector2.RIGHT,
Vector2.DOWN,
Vector2.LEFT
]
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
var movement = MOVEMENT_VECTORS[randi() % 4]
move_and_collide(movement * 2)
pass
func _on_Hitbox_area_entered(area):
pass # Replace with function body.
func _on_Hurtbox_area_entered(area):
queue_free()
pass # Replace with function body.

View File

@ -1,39 +0,0 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://NPCs/ooze.png" type="Texture" id=1]
[ext_resource path="res://NPCs/ooze.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4.57893, 3.98952 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 4.69029, 4.54633 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 4.69029, 4.43497 )
[node name="ooze" type="KinematicBody2D"]
script = ExtResource( 2 )
[node name="ooze" type="Sprite" parent="."]
position = Vector2( -0.061738, 0.18198 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 8
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource( 2 )
[node name="Hurtbox" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 32
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
shape = SubResource( 3 )
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]

View File

@ -3,8 +3,8 @@
[ext_resource path="res://Tilesets/stone.png" type="Texture" id=1] [ext_resource path="res://Tilesets/stone.png" type="Texture" id=1]
[ext_resource path="res://Tilesets/dirt.png" type="Texture" id=2] [ext_resource path="res://Tilesets/dirt.png" type="Texture" id=2]
[ext_resource path="res://Tilesets/water.png" type="Texture" id=3] [ext_resource path="res://Tilesets/water.png" type="Texture" id=3]
[ext_resource path="res://NPCs/goblin.tscn" type="PackedScene" id=4] [ext_resource path="res://NPCs/Goblin.tscn" type="PackedScene" id=4]
[ext_resource path="res://NPCs/ooze.tscn" type="PackedScene" id=5] [ext_resource path="res://NPCs/Ooze.tscn" type="PackedScene" id=5]
[ext_resource path="res://NPCs/moss.tscn" type="PackedScene" id=6] [ext_resource path="res://NPCs/moss.tscn" type="PackedScene" id=6]
[sub_resource type="ConvexPolygonShape2D" id=1] [sub_resource type="ConvexPolygonShape2D" id=1]
@ -136,6 +136,7 @@ points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 )
[node name="World" type="Node2D"] [node name="World" type="Node2D"]
[node name="TileMap" type="TileMap" parent="."] [node name="TileMap" type="TileMap" parent="."]
position = Vector2( 2, 0 )
tile_set = SubResource( 7 ) tile_set = SubResource( 7 )
cell_size = Vector2( 8, 8 ) cell_size = Vector2( 8, 8 )
cell_quadrant_size = 8 cell_quadrant_size = 8
@ -143,23 +144,20 @@ cell_custom_transform = Transform2D( 8, 0, 0, 8, 0, 0 )
format = 1 format = 1
tile_data = PoolIntArray( 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 65536, 1, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 2, 65537, 65541, 2, 65537, 65542, 2, 65537, 65543, 1, 0, 65544, 1, 0, 65545, 1, 0, 131072, 1, 0, 131073, 0, 0, 131074, 1, 0, 131075, 0, 0, 131076, 0, 0, 131077, 1, 0, 131078, 2, 65537, 131079, 1, 0, 131080, 1, 0, 131081, 1, 0, 196608, 1, 0, 196609, 0, 0, 196610, 1, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 2, 65537, 196615, 2, 65537, 196616, 2, 2, 196617, 1, 0, 262144, 1, 0, 262145, 0, 0, 262146, 1, 0, 262147, 0, 0, 262148, 0, 0, 262149, 1, 0, 262150, 2, 65536, 262151, 2, 65537, 262152, 2, 65538, 262153, 1, 0, 327680, 1, 0, 327681, 0, 0, 327682, 1, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 2, 65536, 327687, 2, 65537, 327688, 2, 65538, 327689, 1, 0, 393216, 1, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 2, 131072, 393223, 2, 131073, 393224, 2, 131074, 393225, 1, 0, 458752, 1, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0 ) tile_data = PoolIntArray( 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 65536, 1, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 2, 65537, 65541, 2, 65537, 65542, 2, 65537, 65543, 1, 0, 65544, 1, 0, 65545, 1, 0, 131072, 1, 0, 131073, 0, 0, 131074, 1, 0, 131075, 0, 0, 131076, 0, 0, 131077, 1, 0, 131078, 2, 65537, 131079, 1, 0, 131080, 1, 0, 131081, 1, 0, 196608, 1, 0, 196609, 0, 0, 196610, 1, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 2, 65537, 196615, 2, 65537, 196616, 2, 2, 196617, 1, 0, 262144, 1, 0, 262145, 0, 0, 262146, 1, 0, 262147, 0, 0, 262148, 0, 0, 262149, 1, 0, 262150, 2, 65536, 262151, 2, 65537, 262152, 2, 65538, 262153, 1, 0, 327680, 1, 0, 327681, 0, 0, 327682, 1, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 2, 65536, 327687, 2, 65537, 327688, 2, 65538, 327689, 1, 0, 393216, 1, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 2, 131072, 393223, 2, 131073, 393224, 2, 131074, 393225, 1, 0, 458752, 1, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0 )
[node name="moss" parent="." instance=ExtResource( 6 )] [node name="Moss" parent="TileMap" instance=ExtResource( 6 )]
position = Vector2( 36, 36 ) position = Vector2( 35.5938, 20.699 )
[node name="Moss2" parent="." instance=ExtResource( 6 )] [node name="Moss2" parent="TileMap" instance=ExtResource( 6 )]
position = Vector2( 44, 44 ) position = Vector2( 44.5283, 44.7697 )
[node name="Moss" parent="." instance=ExtResource( 6 )] [node name="Ooze" parent="TileMap" instance=ExtResource( 5 )]
position = Vector2( 36, 20 ) position = Vector2( 27.8155, 44.3492 )
[node name="Moss3" parent="." instance=ExtResource( 6 )] [node name="Goblin" parent="TileMap" instance=ExtResource( 4 )]
position = Vector2( 44, 52 ) position = Vector2( 13.9407, 21.5399 )
[node name="Goblin" parent="." instance=ExtResource( 4 )] [node name="Goblin2" parent="TileMap" instance=ExtResource( 4 )]
position = Vector2( 12, 20 ) position = Vector2( 35.4887, 33.6278 )
[node name="Goblin2" parent="." instance=ExtResource( 4 )] [node name="Ooze2" parent="TileMap" instance=ExtResource( 5 )]
position = Vector2( 28, 28 ) position = Vector2( 35.3835, 52.6531 )
[node name="Ooze2" parent="." instance=ExtResource( 5 )]
position = Vector2( 36, 52 )

View File

@ -1,16 +0,0 @@
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -19,10 +19,6 @@ config/name="Fishtank"
run/main_scene="res://World.tscn" run/main_scene="res://World.tscn"
config/icon="res://icon.png" config/icon="res://icon.png"
[autoload]
Global="*res://global.gd"
[display] [display]
window/size/width=80 window/size/width=80
@ -33,10 +29,6 @@ window/size/test_width=1280
window/size/test_height=720 window/size/test_height=720
window/stretch/mode="2d" window/stretch/mode="2d"
[physics]
common/physics_fps=5
[rendering] [rendering]
quality/driver/driver_name="GLES2" quality/driver/driver_name="GLES2"