From 80e2158f7251d6a880c1afc50ff043c12096ef25 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 16 May 2021 11:57:48 +0200 Subject: Initial commit --- .gitignore | 13 ++++ Bomb.gd | 73 +++++++++++++++++++++ Bomb.tscn | 46 +++++++++++++ Explosion.gd | 20 ++++++ Explosion.tscn | 43 ++++++++++++ Player.gd | 65 ++++++++++++++++++ Player.tscn | 67 +++++++++++++++++++ Readme.md | 7 ++ Resources/16_bit_animated_bomb/16_bit_bomb2.png | Bin 0 -> 222 bytes .../16_bit_animated_bomb/16_bit_bomb2.png.import | 34 ++++++++++ Resources/16_bit_animated_bomb/16_bit_bomb3.png | Bin 0 -> 215 bytes .../16_bit_animated_bomb/16_bit_bomb3.png.import | 34 ++++++++++ Resources/16_bit_animated_bomb/16bit_bomb1.png | Bin 0 -> 250 bytes .../16_bit_animated_bomb/16bit_bomb1.png.import | 34 ++++++++++ Resources/bomb_party_v4.png | Bin 0 -> 7337 bytes Resources/bomb_party_v4.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-05-214118_001.png | Bin 0 -> 363 bytes .../tux/signal-2021-05-05-214118_001.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-05-214118_002.png | Bin 0 -> 333 bytes .../tux/signal-2021-05-05-214118_002.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-05-214118_003.png | Bin 0 -> 462 bytes .../tux/signal-2021-05-05-214118_003.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-05-214118_004.png | Bin 0 -> 369 bytes .../tux/signal-2021-05-05-214118_004.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-06-203546_001.png | Bin 0 -> 327 bytes .../tux/signal-2021-05-06-203546_001.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-06-203546_002.png | Bin 0 -> 321 bytes .../tux/signal-2021-05-06-203546_002.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-06-203546_003.png | Bin 0 -> 432 bytes .../tux/signal-2021-05-06-203546_003.png.import | 34 ++++++++++ Resources/tux/signal-2021-05-06-203546_004.png | Bin 0 -> 423 bytes .../tux/signal-2021-05-06-203546_004.png.import | 34 ++++++++++ Utilities.gd | 12 ++++ Utilities.tscn | 6 ++ World.tscn | 17 +++++ default_env.tres | 7 ++ icon.png | Bin 0 -> 3305 bytes icon.png.import | 34 ++++++++++ project.godot | 35 ++++++++++ 39 files changed, 853 insertions(+) create mode 100644 .gitignore create mode 100644 Bomb.gd create mode 100644 Bomb.tscn create mode 100644 Explosion.gd create mode 100644 Explosion.tscn create mode 100644 Player.gd create mode 100644 Player.tscn create mode 100644 Readme.md create mode 100755 Resources/16_bit_animated_bomb/16_bit_bomb2.png create mode 100644 Resources/16_bit_animated_bomb/16_bit_bomb2.png.import create mode 100755 Resources/16_bit_animated_bomb/16_bit_bomb3.png create mode 100644 Resources/16_bit_animated_bomb/16_bit_bomb3.png.import create mode 100755 Resources/16_bit_animated_bomb/16bit_bomb1.png create mode 100644 Resources/16_bit_animated_bomb/16bit_bomb1.png.import create mode 100644 Resources/bomb_party_v4.png create mode 100644 Resources/bomb_party_v4.png.import create mode 100644 Resources/tux/signal-2021-05-05-214118_001.png create mode 100644 Resources/tux/signal-2021-05-05-214118_001.png.import create mode 100644 Resources/tux/signal-2021-05-05-214118_002.png create mode 100644 Resources/tux/signal-2021-05-05-214118_002.png.import create mode 100644 Resources/tux/signal-2021-05-05-214118_003.png create mode 100644 Resources/tux/signal-2021-05-05-214118_003.png.import create mode 100644 Resources/tux/signal-2021-05-05-214118_004.png create mode 100644 Resources/tux/signal-2021-05-05-214118_004.png.import create mode 100644 Resources/tux/signal-2021-05-06-203546_001.png create mode 100644 Resources/tux/signal-2021-05-06-203546_001.png.import create mode 100644 Resources/tux/signal-2021-05-06-203546_002.png create mode 100644 Resources/tux/signal-2021-05-06-203546_002.png.import create mode 100644 Resources/tux/signal-2021-05-06-203546_003.png create mode 100644 Resources/tux/signal-2021-05-06-203546_003.png.import create mode 100644 Resources/tux/signal-2021-05-06-203546_004.png create mode 100644 Resources/tux/signal-2021-05-06-203546_004.png.import create mode 100644 Utilities.gd create mode 100644 Utilities.tscn create mode 100644 World.tscn create mode 100644 default_env.tres create mode 100644 icon.png create mode 100644 icon.png.import create mode 100644 project.godot diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..440003f --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Godot-specific ignores +.import/ +export.cfg +#export_presets.cfg +/exports/ + +# Imported translations (automatically generated from CSV files) +*.translation + +# Mono-specific ignores +.mono/ +data_*/ + diff --git a/Bomb.gd b/Bomb.gd new file mode 100644 index 0000000..2eeb14e --- /dev/null +++ b/Bomb.gd @@ -0,0 +1,73 @@ +extends KinematicBody2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var Explosion = preload("res://Explosion.tscn") + + +# Called when the node enters the scene tree for the first time. +func _ready(): + $AnimatedSprite.play() + pass + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_Timer_timeout(): + print("BYE BOMB") + $CollisionShape2D.disabled = true + + var space_state = get_world_2d().direct_space_state + var base_position = self.position + var power = 5 + + var directions = [ + Vector2.UP, + Vector2.RIGHT, + Vector2.DOWN, + Vector2.LEFT, + ] + + for j in range(directions.size()): + for i in range(power): + var direction = directions[j] + if direction.length() == 0: + continue + + var from = base_position + (direction * i * 16) + var to = base_position + (direction * (i + 1) * 16) + + var result = space_state.intersect_ray(from, to) + if result and result.collider: + if "Bomb" in result.collider.name: + result.collider._on_Timer_timeout() + break + + # don't add explosion when Damageable? + #continue + + # break when hitting wall + #break + + pass + + var explosion = Explosion.instance() + explosion.position = to + get_tree().get_current_scene().add_child(explosion) + + var explosion = Explosion.instance() + explosion.position = base_position + get_tree().get_current_scene().add_child(explosion) + + queue_free() + + +func _on_Area2D_body_exited(body): + if body.name == "Player": + self.set_collision_layer_bit(0, true) + diff --git a/Bomb.tscn b/Bomb.tscn new file mode 100644 index 0000000..1df4dbc --- /dev/null +++ b/Bomb.tscn @@ -0,0 +1,46 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Resources/16_bit_animated_bomb/16_bit_bomb3.png" type="Texture" id=1] +[ext_resource path="res://Bomb.gd" type="Script" id=2] +[ext_resource path="res://Resources/16_bit_animated_bomb/16bit_bomb1.png" type="Texture" id=3] +[ext_resource path="res://Resources/16_bit_animated_bomb/16_bit_bomb2.png" type="Texture" id=4] + +[sub_resource type="CircleShape2D" id=1] +radius = 9.17698 + +[sub_resource type="SpriteFrames" id=2] +animations = [ { +"frames": [ ExtResource( 1 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 1 ) ], +"loop": false, +"name": "default", +"speed": 1.0 +} ] + +[sub_resource type="CircleShape2D" id=3] +radius = 9.73652 + +[node name="Bomb" type="KinematicBody2D"] +collision_layer = 2 +collision_mask = 2 +script = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="AnimatedSprite" type="AnimatedSprite" parent="."] +position = Vector2( -1.19209e-07, -1.19209e-07 ) +scale = Vector2( 1.23978, 1.23978 ) +frames = SubResource( 2 ) + +[node name="Timer" type="Timer" parent="."] +wait_time = 4.0 +one_shot = true +autostart = true + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2DArea2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource( 3 ) + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] +[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"] diff --git a/Explosion.gd b/Explosion.gd new file mode 100644 index 0000000..65d7047 --- /dev/null +++ b/Explosion.gd @@ -0,0 +1,20 @@ +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(): + $AnimatedSprite.play() + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_AnimatedSprite_animation_finished(): + queue_free() diff --git a/Explosion.tscn b/Explosion.tscn new file mode 100644 index 0000000..e1643b4 --- /dev/null +++ b/Explosion.tscn @@ -0,0 +1,43 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Resources/bomb_party_v4.png" type="Texture" id=1] +[ext_resource path="res://Explosion.gd" type="Script" id=2] + +[sub_resource type="AtlasTexture" id=3] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 224, 288, 16, 16 ) + +[sub_resource type="AtlasTexture" id=4] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 224, 272, 16, 16 ) + +[sub_resource type="AtlasTexture" id=5] +flags = 4 +atlas = ExtResource( 1 ) +region = Rect2( 224, 256, 16, 16 ) + +[sub_resource type="SpriteFrames" id=1] +animations = [ { +"frames": [ SubResource( 3 ), SubResource( 3 ), SubResource( 4 ), SubResource( 4 ), SubResource( 4 ), SubResource( 5 ), SubResource( 5 ) ], +"loop": false, +"name": "default", +"speed": 60.0 +} ] + +[sub_resource type="CircleShape2D" id=2] +radius = 11.019 + +[node name="Explosion" type="Area2D"] +script = ExtResource( 2 ) + +[node name="AnimatedSprite" type="AnimatedSprite" parent="."] +position = Vector2( 0.0845222, 0.0845222 ) +scale = Vector2( 0.962258, 0.962258 ) +frames = SubResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 2 ) + +[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"] diff --git a/Player.gd b/Player.gd new file mode 100644 index 0000000..6ba634a --- /dev/null +++ b/Player.gd @@ -0,0 +1,65 @@ +extends KinematicBody2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var SPEED = 60 +var velocity = Vector2(0, 0) +var Bomb = preload("res://Bomb.tscn") + + +# 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): + if Input.is_key_pressed(KEY_LEFT): + velocity.x -= SPEED + #$AnimatedSprite.rotation = 90.0 + #$AnimatedSprite.flip_v = true + $AnimatedSprite.play("left") + if Input.is_key_pressed(KEY_RIGHT): + velocity.x += SPEED + #$AnimatedSprite.rotation = 90.0 + #$AnimatedSprite.flip_v = false + $AnimatedSprite.play("right") + if Input.is_key_pressed(KEY_UP): + velocity.y -= SPEED + #$AnimatedSprite.rotation = 0.0 + #$AnimatedSprite.flip_v = false + $AnimatedSprite.play("up") + if Input.is_key_pressed(KEY_DOWN): + velocity.y += SPEED + #$AnimatedSprite.rotation = 0.0 + #$AnimatedSprite.flip_v = true + $AnimatedSprite.play("down") + + if velocity.x < 0 && velocity.y < 0: + $AnimatedSprite.play("tl") + elif velocity.x > 0 && velocity.y < 0: + $AnimatedSprite.play("tr") + elif velocity.x < 0 && velocity.y > 0: + $AnimatedSprite.play("bl") + elif velocity.x > 0 && velocity.y > 0: + $AnimatedSprite.play("br") + + if Input.is_action_just_pressed("ui_accept"): + self.plant_bomb() + + #if velocity.length() > 0: + #$AnimatedSprite.play() + + velocity = move_and_slide(velocity, Vector2.UP) + velocity.x = lerp(velocity.x, 0, 1) + velocity.y = lerp(velocity.y, 0, 1) + + +func plant_bomb(): + print("HI BOMB") + var bomb = Bomb.instance() + bomb.position = Utilities.get_level_position_grid(self) + #bomb.position = self.position + get_tree().get_current_scene().add_child(bomb) diff --git a/Player.tscn b/Player.tscn new file mode 100644 index 0000000..e6edd44 --- /dev/null +++ b/Player.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=10 format=2] + +[ext_resource path="res://Resources/tux/signal-2021-05-05-214118_001.png" type="Texture" id=1] +[ext_resource path="res://Resources/tux/signal-2021-05-05-214118_002.png" type="Texture" id=2] +[ext_resource path="res://Resources/tux/signal-2021-05-05-214118_003.png" type="Texture" id=3] +[ext_resource path="res://Resources/tux/signal-2021-05-05-214118_004.png" type="Texture" id=4] +[ext_resource path="res://Resources/tux/signal-2021-05-06-203546_001.png" type="Texture" id=5] +[ext_resource path="res://Resources/tux/signal-2021-05-06-203546_004.png" type="Texture" id=6] +[ext_resource path="res://Resources/tux/signal-2021-05-06-203546_003.png" type="Texture" id=7] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 12.1441, 11.0531 ) + +[sub_resource type="SpriteFrames" id=2] +animations = [ { +"frames": [ ExtResource( 4 ) ], +"loop": true, +"name": "left", +"speed": 5.0 +}, { +"frames": [ ExtResource( 1 ) ], +"loop": true, +"name": "right", +"speed": 5.0 +}, { +"frames": [ ExtResource( 2 ) ], +"loop": true, +"name": "up", +"speed": 5.0 +}, { +"frames": [ ExtResource( 5 ) ], +"loop": true, +"name": "tr", +"speed": 5.0 +}, { +"frames": [ ExtResource( 7 ) ], +"loop": true, +"name": "bl", +"speed": 5.0 +}, { +"frames": [ ExtResource( 6 ) ], +"loop": true, +"name": "br", +"speed": 5.0 +}, { +"frames": [ ExtResource( 3 ) ], +"loop": true, +"name": "down", +"speed": 5.0 +}, { +"frames": [ ExtResource( 4 ) ], +"loop": true, +"name": "tl", +"speed": 5.0 +} ] + +[node name="Player" type="KinematicBody2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="AnimatedSprite" type="AnimatedSprite" parent="."] +position = Vector2( -7.45058e-09, -2.38419e-07 ) +scale = Vector2( 0.609235, 0.609235 ) +frames = SubResource( 2 ) +animation = "down" +playing = true diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..0ad6036 --- /dev/null +++ b/Readme.md @@ -0,0 +1,7 @@ +BomberTux +====== + +Resources used + +- https://github.com/T4g1/gd-bomberman + diff --git a/Resources/16_bit_animated_bomb/16_bit_bomb2.png b/Resources/16_bit_animated_bomb/16_bit_bomb2.png new file mode 100755 index 0000000..98da448 Binary files /dev/null and b/Resources/16_bit_animated_bomb/16_bit_bomb2.png differ diff --git a/Resources/16_bit_animated_bomb/16_bit_bomb2.png.import b/Resources/16_bit_animated_bomb/16_bit_bomb2.png.import new file mode 100644 index 0000000..f3dd781 --- /dev/null +++ b/Resources/16_bit_animated_bomb/16_bit_bomb2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/16_bit_bomb2.png-3064dcfa65a9c185c8556eee00a8e2dd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/16_bit_animated_bomb/16_bit_bomb2.png" +dest_files=[ "res://.import/16_bit_bomb2.png-3064dcfa65a9c185c8556eee00a8e2dd.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/16_bit_animated_bomb/16_bit_bomb3.png b/Resources/16_bit_animated_bomb/16_bit_bomb3.png new file mode 100755 index 0000000..e3d9d0e Binary files /dev/null and b/Resources/16_bit_animated_bomb/16_bit_bomb3.png differ diff --git a/Resources/16_bit_animated_bomb/16_bit_bomb3.png.import b/Resources/16_bit_animated_bomb/16_bit_bomb3.png.import new file mode 100644 index 0000000..3675a2c --- /dev/null +++ b/Resources/16_bit_animated_bomb/16_bit_bomb3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/16_bit_bomb3.png-2af028cd8041c7a77c886b3ba5fcbdaa.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/16_bit_animated_bomb/16_bit_bomb3.png" +dest_files=[ "res://.import/16_bit_bomb3.png-2af028cd8041c7a77c886b3ba5fcbdaa.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/16_bit_animated_bomb/16bit_bomb1.png b/Resources/16_bit_animated_bomb/16bit_bomb1.png new file mode 100755 index 0000000..9110c34 Binary files /dev/null and b/Resources/16_bit_animated_bomb/16bit_bomb1.png differ diff --git a/Resources/16_bit_animated_bomb/16bit_bomb1.png.import b/Resources/16_bit_animated_bomb/16bit_bomb1.png.import new file mode 100644 index 0000000..a513f5c --- /dev/null +++ b/Resources/16_bit_animated_bomb/16bit_bomb1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/16bit_bomb1.png-5ff8e41d997db35c6a0fb444f631960f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/16_bit_animated_bomb/16bit_bomb1.png" +dest_files=[ "res://.import/16bit_bomb1.png-5ff8e41d997db35c6a0fb444f631960f.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/bomb_party_v4.png b/Resources/bomb_party_v4.png new file mode 100644 index 0000000..3068d6a Binary files /dev/null and b/Resources/bomb_party_v4.png differ diff --git a/Resources/bomb_party_v4.png.import b/Resources/bomb_party_v4.png.import new file mode 100644 index 0000000..b32fe5e --- /dev/null +++ b/Resources/bomb_party_v4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bomb_party_v4.png-5fe0759ad2b410382b3603683974f406.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/bomb_party_v4.png" +dest_files=[ "res://.import/bomb_party_v4.png-5fe0759ad2b410382b3603683974f406.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-05-214118_001.png b/Resources/tux/signal-2021-05-05-214118_001.png new file mode 100644 index 0000000..81db16a Binary files /dev/null and b/Resources/tux/signal-2021-05-05-214118_001.png differ diff --git a/Resources/tux/signal-2021-05-05-214118_001.png.import b/Resources/tux/signal-2021-05-05-214118_001.png.import new file mode 100644 index 0000000..4630421 --- /dev/null +++ b/Resources/tux/signal-2021-05-05-214118_001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-05-214118_001.png-f5495ec4e269dd973e4f0c66be2c0204.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-05-214118_001.png" +dest_files=[ "res://.import/signal-2021-05-05-214118_001.png-f5495ec4e269dd973e4f0c66be2c0204.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-05-214118_002.png b/Resources/tux/signal-2021-05-05-214118_002.png new file mode 100644 index 0000000..6ae6066 Binary files /dev/null and b/Resources/tux/signal-2021-05-05-214118_002.png differ diff --git a/Resources/tux/signal-2021-05-05-214118_002.png.import b/Resources/tux/signal-2021-05-05-214118_002.png.import new file mode 100644 index 0000000..02db686 --- /dev/null +++ b/Resources/tux/signal-2021-05-05-214118_002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-05-214118_002.png-f8d8094688906571f2544458b752ef15.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-05-214118_002.png" +dest_files=[ "res://.import/signal-2021-05-05-214118_002.png-f8d8094688906571f2544458b752ef15.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-05-214118_003.png b/Resources/tux/signal-2021-05-05-214118_003.png new file mode 100644 index 0000000..26d0acd Binary files /dev/null and b/Resources/tux/signal-2021-05-05-214118_003.png differ diff --git a/Resources/tux/signal-2021-05-05-214118_003.png.import b/Resources/tux/signal-2021-05-05-214118_003.png.import new file mode 100644 index 0000000..0bdf818 --- /dev/null +++ b/Resources/tux/signal-2021-05-05-214118_003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-05-214118_003.png-ab9fe78e8f89a38a2ffac52f74632873.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-05-214118_003.png" +dest_files=[ "res://.import/signal-2021-05-05-214118_003.png-ab9fe78e8f89a38a2ffac52f74632873.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-05-214118_004.png b/Resources/tux/signal-2021-05-05-214118_004.png new file mode 100644 index 0000000..9c7dcce Binary files /dev/null and b/Resources/tux/signal-2021-05-05-214118_004.png differ diff --git a/Resources/tux/signal-2021-05-05-214118_004.png.import b/Resources/tux/signal-2021-05-05-214118_004.png.import new file mode 100644 index 0000000..3170a76 --- /dev/null +++ b/Resources/tux/signal-2021-05-05-214118_004.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-05-214118_004.png-eb55c1b45450f53591865df99185c39d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-05-214118_004.png" +dest_files=[ "res://.import/signal-2021-05-05-214118_004.png-eb55c1b45450f53591865df99185c39d.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-06-203546_001.png b/Resources/tux/signal-2021-05-06-203546_001.png new file mode 100644 index 0000000..08e3a3b Binary files /dev/null and b/Resources/tux/signal-2021-05-06-203546_001.png differ diff --git a/Resources/tux/signal-2021-05-06-203546_001.png.import b/Resources/tux/signal-2021-05-06-203546_001.png.import new file mode 100644 index 0000000..0893421 --- /dev/null +++ b/Resources/tux/signal-2021-05-06-203546_001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-06-203546_001.png-92fa24aefcffe8ca33fbf6cb3d0e7d1a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-06-203546_001.png" +dest_files=[ "res://.import/signal-2021-05-06-203546_001.png-92fa24aefcffe8ca33fbf6cb3d0e7d1a.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-06-203546_002.png b/Resources/tux/signal-2021-05-06-203546_002.png new file mode 100644 index 0000000..aff28c3 Binary files /dev/null and b/Resources/tux/signal-2021-05-06-203546_002.png differ diff --git a/Resources/tux/signal-2021-05-06-203546_002.png.import b/Resources/tux/signal-2021-05-06-203546_002.png.import new file mode 100644 index 0000000..ec32196 --- /dev/null +++ b/Resources/tux/signal-2021-05-06-203546_002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-06-203546_002.png-3e16a117e2e16c54df387010b16c79f7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-06-203546_002.png" +dest_files=[ "res://.import/signal-2021-05-06-203546_002.png-3e16a117e2e16c54df387010b16c79f7.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-06-203546_003.png b/Resources/tux/signal-2021-05-06-203546_003.png new file mode 100644 index 0000000..132acda Binary files /dev/null and b/Resources/tux/signal-2021-05-06-203546_003.png differ diff --git a/Resources/tux/signal-2021-05-06-203546_003.png.import b/Resources/tux/signal-2021-05-06-203546_003.png.import new file mode 100644 index 0000000..421c638 --- /dev/null +++ b/Resources/tux/signal-2021-05-06-203546_003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-06-203546_003.png-55c1fde4380cfc4d9ac1773bdec70cad.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-06-203546_003.png" +dest_files=[ "res://.import/signal-2021-05-06-203546_003.png-55c1fde4380cfc4d9ac1773bdec70cad.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/tux/signal-2021-05-06-203546_004.png b/Resources/tux/signal-2021-05-06-203546_004.png new file mode 100644 index 0000000..56a77da Binary files /dev/null and b/Resources/tux/signal-2021-05-06-203546_004.png differ diff --git a/Resources/tux/signal-2021-05-06-203546_004.png.import b/Resources/tux/signal-2021-05-06-203546_004.png.import new file mode 100644 index 0000000..03ada85 --- /dev/null +++ b/Resources/tux/signal-2021-05-06-203546_004.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/signal-2021-05-06-203546_004.png-13d4cd0571bf7cc70e1c3df93b133c6c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/tux/signal-2021-05-06-203546_004.png" +dest_files=[ "res://.import/signal-2021-05-06-203546_004.png-13d4cd0571bf7cc70e1c3df93b133c6c.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Utilities.gd b/Utilities.gd new file mode 100644 index 0000000..954dcd3 --- /dev/null +++ b/Utilities.gd @@ -0,0 +1,12 @@ +extends Node + + +func get_level_position(scene): + var x = floor((scene.position.x + 8) / 16) + var y = floor((scene.position.y + 8) / 16) + + return Vector2(x, y) + + +func get_level_position_grid(scene): + return self.get_level_position(scene) * 16 diff --git a/Utilities.tscn b/Utilities.tscn new file mode 100644 index 0000000..27e58b9 --- /dev/null +++ b/Utilities.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Utilities.gd" type="Script" id=1] + +[node name="Utilities" type="Node"] +script = ExtResource( 1 ) diff --git a/World.tscn b/World.tscn new file mode 100644 index 0000000..5bc0239 --- /dev/null +++ b/World.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://Player.gd" type="Script" id=2] + +[node name="World" type="Node2D"] + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 61.2248, 49.2321 ) +script = ExtResource( 2 ) + +[node name="Camera2D" type="Camera2D" parent="Player"] +current = true +limit_left = 0 +limit_top = 0 +limit_right = 600 +limit_bottom = 0 diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..96cbf46 --- /dev/null +++ b/icon.png.import @@ -0,0 +1,34 @@ +[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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..34600d0 --- /dev/null +++ b/project.godot @@ -0,0 +1,35 @@ +; 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="BomberTux" +run/main_scene="res://World.tscn" +config/icon="res://icon.png" + +[autoload] + +Utilities="*res://Utilities.gd" + +[display] + +window/size/width=512 +window/size/height=300 + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +quality/driver/driver_name="GLES2" +vram_compression/import_etc=true +vram_compression/import_etc2=false +environment/default_environment="res://default_env.tres" -- cgit v1.2.3