Skip to content

Commit

Permalink
Started port to godot 4.1 (#38)
Browse files Browse the repository at this point in the history
* Started port to godot 4.0.3

* fix atmosphere shader

* update gitignore

* remove .godot files
  • Loading branch information
Reisyukaku authored Jul 26, 2023
1 parent 41e5d3a commit 5555a13
Show file tree
Hide file tree
Showing 75 changed files with 1,251 additions and 2,321 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Godot 4+ specific ignores
.godot/

# Godot-specific ignores
.import/
export.cfg
export_presets.cfg

# Imported translations (automatically generated from CSV files)
*.translation

# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json

50 changes: 25 additions & 25 deletions addons/hoimar.planetgen/planet_presets/alien_planet_settings.tres
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
[gd_resource type="Resource" load_steps=9 format=2]
[gd_resource type="Resource" script_class="PlanetSettings" load_steps=9 format=3 uid="uid://bfhq5kbvtn36a"]

[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" type="Script" id=1]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" type="Script" id=2]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" type="Script" id=3]
[ext_resource path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" type="Script" id=4]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" id="1"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" id="2"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" id="3"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" id="4"]

[sub_resource type="Resource" id=1]
[sub_resource type="Resource" id="1"]
resource_name = "Large Ridges"
script = ExtResource( 2 )
script = ExtResource("2")
enabled = true
use_first_as_mask = false
seed_value = 3
strength = 0.003
octaves = 4
fractal_octaves = 4
period = 0.2
persistence = 0.3
center = Vector3( 1, 1, 0 )
frequency = 0.6
center = Vector3(1, 1, 0)

[sub_resource type="Resource" id=2]
[sub_resource type="Resource" id="2"]
resource_name = "Details & Peaks"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = true
seed_value = 13
strength = 2.0
octaves = 4
fractal_octaves = 4
period = 0.1
persistence = 0.5
center = Vector3( 0.133, 0, 0 )
frequency = 0.6
center = Vector3(0.133, 0, 0)

[sub_resource type="Resource" id=3]
[sub_resource type="Resource" id="3"]
resource_name = "Fine Detail"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = true
seed_value = 0
strength = 0.05
octaves = 4
fractal_octaves = 4
period = 0.001
persistence = 0.9
center = Vector3( 1, 2, 3 )
frequency = 0.6
center = Vector3(1, 2, 3)

[sub_resource type="Resource" id=4]
script = ExtResource( 1 )
noise_generators = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ]
[sub_resource type="Resource" id="4"]
script = ExtResource("1")
noise_generators = [SubResource("1"), SubResource("2"), SubResource("3")]

[resource]
script = ExtResource( 4 )
script = ExtResource("4")
resolution = 77
radius = 150.0
has_water = false
has_atmosphere = true
has_collisions = true
atmosphere_thickness = 8.0
atmosphere_density = 0.02
shape_generator = SubResource( 4 )
shape_generator = SubResource("4")
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
[gd_resource type="Resource" load_steps=10 format=2]
[gd_resource type="Resource" script_class="PlanetSettings" load_steps=10 format=3 uid="uid://dd88lsn35g60e"]

[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" type="Script" id=1]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" type="Script" id=2]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" type="Script" id=3]
[ext_resource path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" type="Script" id=4]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" id="1"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" id="2"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" id="3"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" id="4"]

[sub_resource type="Resource" id=1]
[sub_resource type="Resource" id="1"]
resource_name = "Continents"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = false
seed_value = 9
strength = 0.005
octaves = 4
fractal_octaves = 4
period = 0.4
persistence = 0.6
center = Vector3( -1, 0, 1 )
frequency = 0.6
center = Vector3(-1, 0, 1)

[sub_resource type="Resource" id=2]
[sub_resource type="Resource" id="2"]
resource_name = "Large Ridges"
script = ExtResource( 2 )
script = ExtResource("2")
enabled = true
use_first_as_mask = true
seed_value = 4
strength = 4.0
octaves = 4
fractal_octaves = 4
period = 0.5
persistence = 0.7
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=3]
[sub_resource type="Resource" id="3"]
resource_name = "Coarse Detail"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = true
seed_value = 1
strength = 5.0
octaves = 4
fractal_octaves = 4
period = 0.03
persistence = 0.6
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=4]
[sub_resource type="Resource" id="4"]
resource_name = "Fine Detail"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = true
seed_value = 123
strength = 0.1
octaves = 4
fractal_octaves = 4
period = 0.0005
persistence = 0.7
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=5]
script = ExtResource( 1 )
noise_generators = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ]
[sub_resource type="Resource" id="5"]
script = ExtResource("1")
noise_generators = [SubResource("1"), SubResource("2"), SubResource("3"), SubResource("4")]

[resource]
script = ExtResource( 4 )
script = ExtResource("4")
resolution = 60
radius = 200.0
has_water = true
has_atmosphere = true
has_collisions = true
atmosphere_thickness = 10.0
atmosphere_density = 0.02
shape_generator = SubResource( 5 )
shape_generator = SubResource("5")
40 changes: 20 additions & 20 deletions addons/hoimar.planetgen/planet_presets/moon_settings.tres
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[gd_resource type="Resource" load_steps=8 format=2]
[gd_resource type="Resource" script_class="PlanetSettings" load_steps=8 format=3 uid="uid://c15gyg7nxeyuj"]

[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" type="Script" id=1]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" type="Script" id=2]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" type="Script" id=3]
[ext_resource path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" type="Script" id=4]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" id="1"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/ridged_noise_generator.gd" id="2"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" id="3"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" id="4"]

[sub_resource type="Resource" id=1]
[sub_resource type="Resource" id="1"]
resource_name = "Continents"
script = ExtResource( 3 )
script = ExtResource("3")
enabled = true
use_first_as_mask = false
seed_value = 0
strength = 0.02
octaves = 4
fractal_octaves = 4
period = 0.5
persistence = 0.5
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=2]
[sub_resource type="Resource" id="2"]
resource_name = "Large Ridges"
script = ExtResource( 2 )
script = ExtResource("2")
enabled = true
use_first_as_mask = false
seed_value = 0
strength = 0.01
octaves = 4
fractal_octaves = 4
period = 0.2
persistence = 0.5
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=3]
script = ExtResource( 1 )
noise_generators = [ SubResource( 1 ), SubResource( 2 ) ]
[sub_resource type="Resource" id="3"]
script = ExtResource("1")
noise_generators = [SubResource("1"), SubResource("2")]

[resource]
script = ExtResource( 4 )
script = ExtResource("4")
resolution = 40
radius = 30.0
has_water = false
has_atmosphere = false
has_collisions = true
atmosphere_thickness = 1.1
atmosphere_density = 0.1
shape_generator = SubResource( 3 )
shape_generator = SubResource("3")
26 changes: 13 additions & 13 deletions addons/hoimar.planetgen/planet_presets/sun_settings.tres
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[gd_resource type="Resource" load_steps=6 format=2]
[gd_resource type="Resource" load_steps=6 format=3 uid="uid://rqk4xpb2vqwo"]

[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" type="Script" id=1]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" type="Script" id=2]
[ext_resource path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" type="Script" id=3]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" id="1"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" id="2"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" id="3"]

[sub_resource type="Resource" id=1]
[sub_resource type="Resource" id="1"]
resource_name = "Sun Surface"
script = ExtResource( 1 )
script = ExtResource("1")
enabled = true
use_first_as_mask = false
seed_value = 0
strength = 0.01
octaves = 4
fractal_octaves = 4
period = 0.1
persistence = 0.4
center = Vector3( 0, 0, 0 )
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=2]
script = ExtResource( 2 )
noise_generators = [ SubResource( 1 ) ]
[sub_resource type="Resource" id="2"]
script = ExtResource("2")
noise_generators = [SubResource("1")]

[resource]
script = ExtResource( 3 )
script = ExtResource("3")
resolution = 21
radius = 200.0
has_water = false
has_atmosphere = false
has_collisions = true
atmosphere_thickness = 1.1
atmosphere_density = 0.1
shape_generator = SubResource( 2 )
shape_generator = SubResource("2")
29 changes: 15 additions & 14 deletions addons/hoimar.planetgen/planet_presets/test_planet_settings.tres
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
[gd_resource type="Resource" load_steps=6 format=2]
[gd_resource type="Resource" script_class="PlanetSettings" load_steps=6 format=3 uid="uid://kono1hjgsisy"]

[ext_resource path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" type="Script" id=1]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" type="Script" id=2]
[ext_resource path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" type="Script" id=3]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/celestial_bodies/planet_settings.gd" id="1"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/noise_generator.gd" id="2"]
[ext_resource type="Script" path="res://addons/hoimar.planetgen/scripts/terrain/shape_generator.gd" id="3"]

[sub_resource type="Resource" id=1]
script = ExtResource( 2 )
[sub_resource type="Resource" id="1"]
script = ExtResource("2")
enabled = true
use_first_as_mask = false
seed_value = 2
strength = 0.03
octaves = 4
fractal_octaves = 4
period = 0.25
persistence = 0.5
center = Vector3( 0, 0, 0 )
frequency = 0.6
center = Vector3(0, 0, 0)

[sub_resource type="Resource" id=2]
script = ExtResource( 3 )
noise_generators = [ SubResource( 1 ) ]
[sub_resource type="Resource" id="2"]
script = ExtResource("3")
noise_generators = [SubResource("1")]

[resource]
script = ExtResource( 1 )
script = ExtResource("1")
resolution = 100
radius = 100.0
has_water = false
has_atmosphere = false
has_collisions = false
atmosphere_thickness = 1.15
shape_generator = SubResource( 2 )
atmosphere_density = 0.1
shape_generator = SubResource("2")
6 changes: 3 additions & 3 deletions addons/hoimar.planetgen/plugin.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tool
@tool
extends EditorPlugin
# Plugin class for Planet Generator.

Expand All @@ -12,7 +12,7 @@ func _enter_tree():
add_autoload_singleton("PGGlobals", PG_GLOBALS_PATH)
add_custom_type(
CUSTOM_TYPE_NAME,
"Spatial",
"Node3D",
SOLAR_SYSTEM_SCRIPT,
PLUGIN_ICON
)
Expand All @@ -23,5 +23,5 @@ func _exit_tree():
remove_autoload_singleton("PGGlobals")


func get_plugin_icon() -> Texture:
func _get_plugin_icon() -> Texture2D:
return PLUGIN_ICON
Loading

0 comments on commit 5555a13

Please sign in to comment.