Skip to content

Commit

Permalink
Merge pull request #1 from Diamond-Dan/Sprite_Gen_Branch
Browse files Browse the repository at this point in the history
Merge for main program core functionality
  • Loading branch information
Diamond-Dan authored May 7, 2024
2 parents 8849c9a + b0a73e6 commit a102896
Show file tree
Hide file tree
Showing 407 changed files with 3,905 additions and 16 deletions.
2 changes: 2 additions & 0 deletions Godot/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Godot 4+ specific ignores
.godot/
python/*.png
python/*.png.import
23 changes: 23 additions & 0 deletions Godot/Difficulty.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[gd_scene load_steps=3 format=3 uid="uid://bghqa1ia3wk5n"]

[ext_resource type="Theme" uid="uid://c0l6lyvo8lxkx" path="res://text.tres" id="1_jshss"]
[ext_resource type="Script" path="res://Moutains_Button.gd" id="2_g5juy"]

[node name="Node2D" type="Node2D"]

[node name="RichTextLabel" type="RichTextLabel" parent="."]
offset_left = 449.0
offset_top = 73.0
offset_right = 749.0
offset_bottom = 131.32
theme = ExtResource("1_jshss")
theme_override_font_sizes/normal_font_size = 41
text = "Options"

[node name="Moutains_Button" type="Button" parent="."]
offset_left = 450.0
offset_top = 176.0
offset_right = 594.0
offset_bottom = 207.0
text = "Normal Moutains"
script = ExtResource("2_g5juy")
36 changes: 36 additions & 0 deletions Godot/From_left_tie.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
extends RigidBody2D
var mob_types

# Called when the node enters the scene tree for the first time.
func _ready():
mob_types = $AnimatedSprite2D.sprite_frames.get_animation_names()
var skin=randi_range(0,1)

$AnimatedSprite2D.play(mob_types[skin])

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

func _on_visible_on_screen_notifier_2d_screen_exited():
queue_free()


func _on_body_shape_entered(body_rid, body, body_shape_index, local_shape_index):
#if(get_colliding_bodies()!=[]):
#print(get_colliding_bodies())
$AnimatedSprite2D.play(mob_types[2])

$despawn_timer.start()
$collision_timer.start()




func _on_timer_timeout():
queue_free() # Replace with function body.


func _on_collision_timer_timeout():
$CollisionShape2D.disabled=true
set_collision_layer_value(1,false)
56 changes: 56 additions & 0 deletions Godot/Int25F2.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[gd_scene load_steps=5 format=3 uid="uid://m4mldp66rc6m"]

[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"]
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"]
[ext_resource type="Script" path="res://Options_button.gd" id="3_4760c"]
[ext_resource type="Script" path="res://RichTextLabel.gd" id="4_ah3rv"]

[node name="Node2D" type="Node2D"]

[node name="Start_Button" type="Button" parent="."]
offset_left = 510.0
offset_top = 266.0
offset_right = 518.0
offset_bottom = 274.0
scale = Vector2(1.76923, 2.63158)
text = "Start Game"
script = ExtResource("1_ucgwb")

[node name="Tutorial_Button" type="Button" parent="."]
custom_minimum_size = Vector2(120, 80)
offset_left = 533.0
offset_top = 372.0
offset_right = 653.0
offset_bottom = 452.0
text = "Tutorial"
script = ExtResource("2_hrosy")

[node name="Options_button" type="Button" parent="."]
offset_left = 1037.0
offset_top = 29.0
offset_right = 1111.0
offset_bottom = 60.0
text = "Options "
script = ExtResource("3_4760c")

[node name="Name" type="RichTextLabel" parent="."]
custom_minimum_size = Vector2(404, 152)
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = 403.0
offset_top = 120.0
offset_right = 807.0
offset_bottom = 272.0
grow_horizontal = 2
theme_override_font_sizes/normal_font_size = 53
theme_override_font_sizes/bold_font_size = 1
text = "Micro Defender"

[node name="RichTextLabel" type="RichTextLabel" parent="."]
offset_left = 494.0
offset_top = 460.0
offset_right = 694.0
offset_bottom = 510.0
text = "Last High Score:"
script = ExtResource("4_ah3rv")
45 changes: 45 additions & 0 deletions Godot/Int7FE7.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_scene load_steps=3 format=3 uid="uid://m4mldp66rc6m"]

[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"]
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"]

[node name="Node2D" type="Node2D"]

[node name="Start_Button" type="Button" parent="."]
offset_left = 510.0
offset_top = 266.0
offset_right = 518.0
offset_bottom = 274.0
scale = Vector2(1.76923, 2.63158)
text = "Start Game"
script = ExtResource("1_ucgwb")

[node name="Tutorial_Button" type="Button" parent="."]
custom_minimum_size = Vector2(120, 80)
offset_left = 533.0
offset_top = 372.0
offset_right = 653.0
offset_bottom = 452.0
text = "Tutorial"
script = ExtResource("2_hrosy")

[node name="Options_button" type="Button" parent="."]
offset_left = 1037.0
offset_top = 29.0
offset_right = 1111.0
offset_bottom = 60.0
text = "Options "

[node name="Name" type="RichTextLabel" parent="."]
custom_minimum_size = Vector2(404, 152)
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = 403.0
offset_top = 120.0
offset_right = 807.0
offset_bottom = 272.0
grow_horizontal = 2
theme_override_font_sizes/normal_font_size = 53
theme_override_font_sizes/bold_font_size = 1
text = "Micro Defender"
45 changes: 45 additions & 0 deletions Godot/IntD387.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_scene load_steps=3 format=3 uid="uid://m4mldp66rc6m"]

[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"]
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"]

[node name="Node2D" type="Node2D"]

[node name="Start_Button" type="Button" parent="."]
offset_left = 510.0
offset_top = 266.0
offset_right = 518.0
offset_bottom = 274.0
scale = Vector2(1.76923, 2.63158)
text = "Start Game"
script = ExtResource("1_ucgwb")

[node name="Tutorial_Button" type="Button" parent="."]
custom_minimum_size = Vector2(120, 80)
offset_left = 533.0
offset_top = 372.0
offset_right = 653.0
offset_bottom = 452.0
text = "Tutorial"
script = ExtResource("2_hrosy")

[node name="Options_button" type="Button" parent="."]
offset_left = 1037.0
offset_top = 29.0
offset_right = 1111.0
offset_bottom = 60.0
text = "Options "

[node name="Name" type="RichTextLabel" parent="."]
custom_minimum_size = Vector2(404, 152)
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = 403.0
offset_top = 120.0
offset_right = 807.0
offset_bottom = 272.0
grow_horizontal = 2
theme_override_font_sizes/normal_font_size = 53
theme_override_font_sizes/bold_font_size = 1
text = "Micro Defender"
15 changes: 14 additions & 1 deletion Godot/Intro.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://m4mldp66rc6m"]
[gd_scene load_steps=5 format=3 uid="uid://m4mldp66rc6m"]

[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"]
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"]
[ext_resource type="Script" path="res://Options_button.gd" id="3_4760c"]
[ext_resource type="Script" path="res://RichTextLabel.gd" id="4_ah3rv"]

[node name="Node2D" type="Node2D"]

Expand All @@ -20,13 +23,15 @@ offset_top = 372.0
offset_right = 653.0
offset_bottom = 452.0
text = "Tutorial"
script = ExtResource("2_hrosy")

[node name="Options_button" type="Button" parent="."]
offset_left = 1037.0
offset_top = 29.0
offset_right = 1111.0
offset_bottom = 60.0
text = "Options "
script = ExtResource("3_4760c")

[node name="Name" type="RichTextLabel" parent="."]
custom_minimum_size = Vector2(404, 152)
Expand All @@ -41,3 +46,11 @@ grow_horizontal = 2
theme_override_font_sizes/normal_font_size = 53
theme_override_font_sizes/bold_font_size = 1
text = "Micro Defender"

[node name="RichTextLabel" type="RichTextLabel" parent="."]
offset_left = 493.0
offset_top = 460.0
offset_right = 693.0
offset_bottom = 510.0
text = "Last High Score:"
script = ExtResource("4_ah3rv")
27 changes: 27 additions & 0 deletions Godot/MenuBar.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
extends MenuBar


var pause=false
# Called when the node enters the scene tree for the first time.
func _ready():
process_mode = Node.PROCESS_MODE_ALWAYS


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

func _input(event):
if event.is_action_pressed("Pause") and pause!=true:
get_tree().paused=true
pause=true
$quit_but.show()
elif event.is_action_pressed("Pause") and pause==true:
get_tree().paused=false
pause=false
$quit_but.hide()


func _on_quit_but_pressed():
get_tree().paused=false
get_tree().change_scene_to_file("res://intro.tscn")
20 changes: 20 additions & 0 deletions Godot/MenuButton.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
extends MenuButton

var pause=false
# Called when the node enters the scene tree for the first time.
func _ready():
process_mode = Node.PROCESS_MODE_PAUSABLE


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

func _input(event):
if event.is_action_pressed("Pause") and pause!=true:
get_tree().paused=true
pause=true
show()
else:
get_tree().paused=false

36 changes: 36 additions & 0 deletions Godot/Moutains_Button.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
extends Button


# Called when the node enters the scene tree for the first time.
func _ready():
if Difficulty.num_of_mountains==50:

self.text="Normal Mountains"
elif Difficulty.num_of_mountains==80:

self.text="More Mountains"
elif Difficulty.num_of_mountains==100:

self.text="Even MORE Mountains"
elif Difficulty.num_of_mountains==300:

self.text="MOSTLY MOUNTAINS EXTREME CAUTION IS ADVISED"


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

func _pressed():
if Difficulty.num_of_mountains==50:
Difficulty.num_of_mountains=80
self.text="More Mountains"
elif Difficulty.num_of_mountains==80:
Difficulty.num_of_mountains=100
self.text="Even MORE Mountains"
elif Difficulty.num_of_mountains==100:
Difficulty.num_of_mountains=300
self.text="MOSTLY MOUNTAINS EXTREME CAUTION IS ADVISED"
elif Difficulty.num_of_mountains==300:
Difficulty.num_of_mountains=50
self.text="Normal Mountains"
42 changes: 42 additions & 0 deletions Godot/Options.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[gd_scene load_steps=4 format=3 uid="uid://wpi0vp3c1vkn"]

[ext_resource type="Theme" uid="uid://c0l6lyvo8lxkx" path="res://text.tres" id="1_oyygy"]
[ext_resource type="Script" path="res://Moutains_Button.gd" id="2_jutn7"]
[ext_resource type="Script" path="res://return_button.gd" id="3_q4pt3"]

[node name="Node2D" type="Node2D"]

[node name="Title" type="RichTextLabel" parent="."]
offset_left = 436.0
offset_top = 23.0
offset_right = 736.0
offset_bottom = 81.32
theme = ExtResource("1_oyygy")
theme_override_font_sizes/normal_font_size = 41
text = "Options"

[node name="Option 1 title" type="RichTextLabel" parent="."]
offset_left = 163.0
offset_top = 81.0
offset_right = 963.0
offset_bottom = 181.0
theme = ExtResource("1_oyygy")
theme_override_font_sizes/normal_font_size = 31
text = "Press the button below to adjust the number of mountains you encounter. This will increase the difficulty"

[node name="Moutains_Button" type="Button" parent="."]
custom_minimum_size = Vector2(300, 100)
offset_left = 385.0
offset_top = 178.0
offset_right = 685.0
offset_bottom = 278.0
text = "Normal Moutains"
script = ExtResource("2_jutn7")

[node name="return_button" type="Button" parent="."]
offset_left = 457.0
offset_top = 299.0
offset_right = 615.0
offset_bottom = 330.0
text = "Back to main menu"
script = ExtResource("3_q4pt3")
14 changes: 14 additions & 0 deletions Godot/Options_button.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends Button


# 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 _pressed():
get_tree().change_scene_to_file("res://Options.tscn")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Godot/Python/movie.gif
1 change: 1 addition & 0 deletions Godot/Python/patterns/explode.oxs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Godot/Python/patterns/tie_fighter.oxs

Large diffs are not rendered by default.

Loading

0 comments on commit a102896

Please sign in to comment.