diff --git a/Makefile b/Makefile index 49bae2c..403aa8c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,32 @@ -GODOT=godot2-server +GODOT=godot3-server +EXPORT_TEMPLATE_SOURCE=https://downloads.tuxfamily.org/godotengine/3.0.2/Godot_v3.0.2-stable_export_templates.tpz +BUILD_DIR?=build +GODOT_PROJECT_PATH?=game +PROJECT_NAME?=game + +TARGET_HTML5?=HTML5 +TARGET_WINDOWS?=Windows Desktop +TARGET_MACOSX?=Mac OSX +TARGET_LINUX?=Linux/X11 + +build-dir: + mkdir -p "$(BUILD_DIR)" clean: - rm -rf build/ + rm -rf "$(BUILD_DIR)"/ + +export-all: export-html5 export-windows export-osx export-linux + +export-html5: build-dir + mkdir -p "$(BUILD_DIR)/html" + $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_HTML5)" "../$(BUILD_DIR)/html/$(PROJECT_NAME).html" + zip "$(BUILD_DIR)/$(PROJECT_NAME)-html5.zip" "$(BUILD_DIR)/html" + +export-windows: build-dir + $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_WINDOWS)" "../$(BUILD_DIR)/$(PROJECT_NAME).exe" + +export-osx: build-dir + $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_MACOSX)" "../$(BUILD_DIR)/$(PROJECT_NAME)-osx" + +export-linux: build-dir + $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_LINUX)" "../$(BUILD_DIR)/$(PROJECT_NAME)-x11" diff --git a/game/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/game/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 0000000..1f08a3c Binary files /dev/null and b/game/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/game/default_env.tres b/game/default_env.tres new file mode 100644 index 0000000..ad86b72 --- /dev/null +++ b/game/default_env.tres @@ -0,0 +1,101 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +radiance_size = 4 +sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 ) +sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 ) +sky_curve = 0.25 +sky_energy = 1.0 +ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 ) +ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 ) +ground_curve = 0.01 +ground_energy = 1.0 +sun_color = Color( 1, 1, 1, 1 ) +sun_latitude = 35.0 +sun_longitude = 0.0 +sun_angle_min = 1.0 +sun_angle_max = 100.0 +sun_curve = 0.05 +sun_energy = 16.0 +texture_size = 2 + +[resource] + +background_mode = 2 +background_sky = SubResource( 1 ) +background_sky_custom_fov = 0.0 +background_color = Color( 0, 0, 0, 1 ) +background_energy = 1.0 +background_canvas_max_layer = 0 +ambient_light_color = Color( 0, 0, 0, 1 ) +ambient_light_energy = 1.0 +ambient_light_sky_contribution = 1.0 +fog_enabled = false +fog_color = Color( 0.5, 0.6, 0.7, 1 ) +fog_sun_color = Color( 1, 0.9, 0.7, 1 ) +fog_sun_amount = 0.0 +fog_depth_enabled = true +fog_depth_begin = 10.0 +fog_depth_curve = 1.0 +fog_transmit_enabled = false +fog_transmit_curve = 1.0 +fog_height_enabled = false +fog_height_min = 0.0 +fog_height_max = 100.0 +fog_height_curve = 1.0 +tonemap_mode = 0 +tonemap_exposure = 1.0 +tonemap_white = 1.0 +auto_exposure_enabled = false +auto_exposure_scale = 0.4 +auto_exposure_min_luma = 0.05 +auto_exposure_max_luma = 8.0 +auto_exposure_speed = 0.5 +ss_reflections_enabled = false +ss_reflections_max_steps = 64 +ss_reflections_fade_in = 0.15 +ss_reflections_fade_out = 2.0 +ss_reflections_depth_tolerance = 0.2 +ss_reflections_roughness = true +ssao_enabled = false +ssao_radius = 1.0 +ssao_intensity = 1.0 +ssao_radius2 = 0.0 +ssao_intensity2 = 1.0 +ssao_bias = 0.01 +ssao_light_affect = 0.0 +ssao_color = Color( 0, 0, 0, 1 ) +ssao_quality = 0 +ssao_blur = 3 +ssao_edge_sharpness = 4.0 +dof_blur_far_enabled = false +dof_blur_far_distance = 10.0 +dof_blur_far_transition = 5.0 +dof_blur_far_amount = 0.1 +dof_blur_far_quality = 1 +dof_blur_near_enabled = false +dof_blur_near_distance = 2.0 +dof_blur_near_transition = 1.0 +dof_blur_near_amount = 0.1 +dof_blur_near_quality = 1 +glow_enabled = false +glow_levels/1 = false +glow_levels/2 = false +glow_levels/3 = true +glow_levels/4 = false +glow_levels/5 = true +glow_levels/6 = false +glow_levels/7 = false +glow_intensity = 0.8 +glow_strength = 1.0 +glow_bloom = 0.0 +glow_blend_mode = 2 +glow_hdr_threshold = 1.0 +glow_hdr_scale = 2.0 +glow_bicubic_upscale = false +adjustment_enabled = false +adjustment_brightness = 1.0 +adjustment_contrast = 1.0 +adjustment_saturation = 1.0 + diff --git a/game/export_presets.cfg b/game/export_presets.cfg new file mode 100644 index 0000000..e39c271 --- /dev/null +++ b/game/export_presets.cfg @@ -0,0 +1,98 @@ +[preset.0] + +name="HTML5" +platform="HTML5" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +patch_list=PoolStringArray( ) + +[preset.0.options] + +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=true +html/custom_html_shell="" +html/head_include="" +custom_template/release="" +custom_template/debug="" + +[preset.1] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +patch_list=PoolStringArray( ) + +[preset.1.options] + +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/64_bits=true +custom_template/release="" +custom_template/debug="" +application/icon="" +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" + +[preset.2] + +name="Mac OSX" +platform="Mac OSX" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +patch_list=PoolStringArray( ) + +[preset.2.options] + +custom_package/debug="" +custom_package/release="" +application/name="" +application/info="Made with Godot Engine" +application/icon="" +application/identifier="org.godotengine.macgame" +application/signature="godotmacgame" +application/short_version="1.0" +application/version="1.0" +application/copyright="" +application/bits_mode=0 +display/high_res=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false + +[preset.3] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +patch_list=PoolStringArray( ) + +[preset.3.options] + +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/64_bits=true +custom_template/release="" +custom_template/debug="" + diff --git a/game/icon.png b/game/icon.png new file mode 100644 index 0000000..a0b64ee Binary files /dev/null and b/game/icon.png differ diff --git a/game/icon.png.import b/game/icon.png.import new file mode 100644 index 0000000..7e34d87 --- /dev/null +++ b/game/icon.png.import @@ -0,0 +1,32 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[deps] + +source_file="res://icon.png" +source_md5="ae7e641067601e2184afcade49abd283" + +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] +dest_md5="84511021bbc8c9d37c7f0f4d181de883" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/game/project.godot b/game/project.godot new file mode 100644 index 0000000..570b9ab --- /dev/null +++ b/game/project.godot @@ -0,0 +1,24 @@ +; 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=3 + +[application] + +config/name="Godot3 Project Template" +run/main_scene="res://tests/test-2d.tscn" +boot_splash/fullsize=false +config/icon="res://icon.png" + +[display] + +window/stretch/shrink="1" + +[rendering] + +environment/default_environment="res://default_env.tres" diff --git a/game/tests/test-2d.gd b/game/tests/test-2d.gd new file mode 100644 index 0000000..ba79e26 --- /dev/null +++ b/game/tests/test-2d.gd @@ -0,0 +1,19 @@ +extends Node + +# class member variables go here, for example: +# var a = 2 +# var b = "textvar" + +func _ready(): + # Called every time the node is added to the scene. + # Initialization here + pass + +#func _process(delta): +# # Called every frame. Delta is time since last frame. +# # Update game logic here. +# pass + + +func _on_exit_pressed(): + get_tree().quit() diff --git a/game/tests/test-2d.tscn b/game/tests/test-2d.tscn new file mode 100644 index 0000000..3a39273 --- /dev/null +++ b/game/tests/test-2d.tscn @@ -0,0 +1,76 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://tests/test-2d.gd" type="Script" id=1] +[ext_resource path="res://icon.png" type="Texture" id=2] + +[sub_resource type="Gradient" id=1] + +offsets = PoolRealArray( 0, 1 ) +colors = PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 ) + +[sub_resource type="GradientTexture" id=2] + +flags = 4 +gradient = SubResource( 1 ) +width = 1024 +_sections_unfolded = [ "Resource" ] + +[node name="test-2d" type="Node" index="0"] + +script = ExtResource( 1 ) + +[node name="CenterContainer" type="CenterContainer" parent="." index="0"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = 485.0 +margin_top = 276.0 +margin_right = 591.0 +margin_bottom = 346.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +use_top_left = false +_sections_unfolded = [ "Anchor", "Theme" ] + +[node name="exit" type="Button" parent="CenterContainer" index="0"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_right = 106.0 +margin_bottom = 70.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +focus_mode = 2 +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +toggle_mode = false +enabled_focus_mode = 2 +shortcut = null +group = null +text = "Quit" +icon = ExtResource( 2 ) +flat = false +align = 1 + +[node name="background" type="Sprite" parent="." index="1"] + +z_index = -1 +texture = SubResource( 2 ) +centered = false +region_enabled = true +region_rect = Rect2( 0, 0, 1024, 600 ) +_sections_unfolded = [ "Region", "Z Index" ] + +[connection signal="pressed" from="CenterContainer/exit" to="." method="_on_exit_pressed"] + +