Created
July 14, 2024 05:21
-
-
Save BrastenXBL/d64698990fbcc940e22193aee5a83cfc to your computer and use it in GitHub Desktop.
An example of setting up a Godot scene for a Pixel game with higher resolution GUI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gd_scene load_steps=5 format=3] | |
[sub_resource type="Gradient" id="Gradient_8q6eo"] | |
offsets = PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1) | |
colors = PackedColorArray(0, 0, 0, 1, 1, 0, 0, 1, 1, 0.6, 0, 1, 0.8, 1, 0, 1, 0.2, 1, 0, 1, 0, 1, 0.4, 1, 0, 1, 1, 1, 0, 0.4, 1, 1, 0.2, 0, 1, 1, 1, 0, 0.6, 1, 1, 0, 0.0166664, 1) | |
metadata/_snap_enabled = true | |
[sub_resource type="GradientTexture2D" id="GradientTexture2D_qsl38"] | |
gradient = SubResource("Gradient_8q6eo") | |
width = 160 | |
height = 120 | |
[sub_resource type="FastNoiseLite" id="FastNoiseLite_nbipe"] | |
noise_type = 0 | |
frequency = 0.5 | |
fractal_type = 0 | |
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_uwwov"] | |
width = 24 | |
height = 24 | |
generate_mipmaps = false | |
seamless_blend_skirt = 0.0 | |
as_normal_map = true | |
bump_strength = 32.0 | |
noise = SubResource("FastNoiseLite_nbipe") | |
[node name="PixelGameWithGuiHD" type="Control"] | |
layout_mode = 3 | |
anchors_preset = 15 | |
anchor_right = 1.0 | |
anchor_bottom = 1.0 | |
grow_horizontal = 2 | |
grow_vertical = 2 | |
[node name="GameLayer" type="CanvasLayer" parent="."] | |
[node name="AspectRatioContainer_4_3" type="AspectRatioContainer" parent="GameLayer"] | |
anchors_preset = 15 | |
anchor_right = 1.0 | |
anchor_bottom = 1.0 | |
grow_horizontal = 2 | |
grow_vertical = 2 | |
ratio = 1.3333 | |
[node name="SubViewportContainer" type="SubViewportContainer" parent="GameLayer/AspectRatioContainer_4_3"] | |
layout_mode = 2 | |
[node name="SubViewport_160_120" type="SubViewport" parent="GameLayer/AspectRatioContainer_4_3/SubViewportContainer"] | |
handle_input_locally = false | |
size = Vector2i(1439, 1080) | |
size_2d_override = Vector2i(160, 120) | |
size_2d_override_stretch = true | |
render_target_update_mode = 4 | |
[node name="SampleLevel" type="Node2D" parent="GameLayer/AspectRatioContainer_4_3/SubViewportContainer/SubViewport_160_120"] | |
texture_filter = 1 | |
[node name="Background" type="Sprite2D" parent="GameLayer/AspectRatioContainer_4_3/SubViewportContainer/SubViewport_160_120/SampleLevel"] | |
texture = SubResource("GradientTexture2D_qsl38") | |
[node name="Character" type="Sprite2D" parent="GameLayer/AspectRatioContainer_4_3/SubViewportContainer/SubViewport_160_120/SampleLevel"] | |
texture = SubResource("NoiseTexture2D_uwwov") | |
[node name="Camera2D" type="Camera2D" parent="GameLayer/AspectRatioContainer_4_3/SubViewportContainer/SubViewport_160_120/SampleLevel/Character"] | |
[node name="GuiHD" type="CanvasLayer" parent="."] | |
layer = 2 | |
[node name="Control" type="Control" parent="GuiHD"] | |
layout_mode = 3 | |
anchors_preset = 15 | |
anchor_right = 1.0 | |
anchor_bottom = 1.0 | |
grow_horizontal = 2 | |
grow_vertical = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment