1 year ago

particle stars

(generated with an especially-made Godot project)


#ArtPicture made in Godot v4.2.stable.official [46dc27791] for Art Weeklies. themes used:

  • ⭕ Scene: Night View

  • ❌ Fanart: Games based around Space (No Man's Sky, Starfield, Outer Wilds...)

  • ❌ Random: Explorer


the picture is from a Desktop app that uses Godot's particle system (the CPUParticles2D variant) to generate stars.

the trick is that all particle movement is disabled and the speed_scale is set to 0, so the particles don't move and disappear.


the app is licensed under MIT License. you only need to save these 2 text files in a new folder (recommended name particle-stars) to get the Godot project :

project.godot

		
			; 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=5

[application]

config/name="particle stars"
config/tags=PackedStringArray("free_libre", "mit_license", "toy")
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility")
config/icon="res://stars.webp"

[display]

window/size/viewport_width=360
window/size/viewport_height=360
window/size/window_width_override=720
window/size/window_height_override=720
window/energy_saving/keep_screen_on=false
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
window/handheld/orientation=6

[filesystem]

import/blender/enabled=false
import/fbx/enabled=false

[gui]

theme/default_font_multichannel_signed_distance_field=true

[input]

help={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194332,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
hide={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":72,"key_label":0,"unicode":104,"echo":false,"script":null)
]
}
fullscreen={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194342,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
reload={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"echo":false,"script":null)
]
}
photograph={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
open_folder={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"echo":false,"script":null)
]
}
quit={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}

[input_devices]

pointing/emulate_mouse_from_touch=false

[rendering]

renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
environment/defaults/default_clear_color=Color(0.0117647, 0.0196078, 0.0392157, 1)

		
	

main.tscn

		
			[gd_scene load_steps=7 format=3 uid="uid://c3umnq4fyl4it"]

[sub_resource type="Gradient" id="Gradient_057wi"]
offsets = PackedFloat32Array(0, 0.69, 0.7)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_c07i2"]
gradient = SubResource("Gradient_057wi")
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1, 1)

[sub_resource type="Gradient" id="Gradient_5n0pf"]
colors = PackedColorArray(0.0117647, 0.0196078, 0.0392157, 1, 0.941, 1, 1, 1)

[sub_resource type="GDScript" id="GDScript_x0qky"]
script/source = "# this script is licensed under MIT License:
# 	https://codeberg.org/sosasees/mit-license/raw/branch/no-year/LICENSE
# source:
# 	https://gamejolt.com/p/particle-stars-vp4gmvwf
extends CPUParticles2D


func _ready() -> void:
	set_emitting(true)
	await RenderingServer.frame_post_draw
	set_speed_scale(0)


func reload() -> void:
	set_speed_scale(4096)
	await RenderingServer.frame_post_draw
	await RenderingServer.frame_post_draw
	set_speed_scale(1)
	await RenderingServer.frame_post_draw
	await RenderingServer.frame_post_draw
	set_emitting(true)
	await RenderingServer.frame_post_draw
	await RenderingServer.frame_post_draw
	set_speed_scale(0)
"

[sub_resource type="GDScript" id="GDScript_syjdu"]
script/source = "# this script is licensed under MIT License:
# 	https://codeberg.org/sosasees/mit-license/raw/branch/no-year/LICENSE
# source:
# 	https://gamejolt.com/p/particle-stars-vp4gmvwf
extends Control


signal reload_button_pressed


func _ready() -> void:
	hide()
	await RenderingServer.frame_post_draw
	show()


func _input(event: InputEvent) -> void:
	if event.is_action_pressed('help'):
		show()
	if event.is_action_pressed('hide'):
		set_visible(not is_visible())
	if event.is_action_pressed('fullscreen'):
		var window: Window = get_tree().get_root()
		if not window.get_mode() == Window.Mode.MODE_FULLSCREEN:
			window.set_mode(Window.MODE_FULLSCREEN)
		else:
			window.set_mode(Window.MODE_WINDOWED)
	if event.is_action_pressed('reload'):
		reload_button_pressed.emit()
	if event.is_action_pressed('photograph'):
		if is_visible():
			hide()
			await RenderingServer.frame_post_draw
			get_tree().get_root().get_texture().get_image().save_webp(
				'res://stars.webp', true
			)
			show()
		else:
			get_tree().get_root().get_texture().get_image().save_webp(
				'res://stars.webp', true
			)
	if event.is_action_pressed('open_folder'):
		get_tree().get_root().set_mode(Window.MODE_WINDOWED)
		OS.shell_show_in_file_manager(
			ProjectSettings.globalize_path('res://stars.webp'), false
		)
	if event.is_action_pressed('quit'):
		get_tree().quit()
"

[sub_resource type="LabelSettings" id="LabelSettings_k5ihk"]
font_size = 14
font_color = Color(0.941, 1, 1, 1)
outline_size = 2
outline_color = Color(0.0117647, 0.0196078, 0.0392157, 1)

[node name="Main" type="Node"]

[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
position = Vector2(640, 640)
emitting = false
amount = 511
lifetime = 0.2
one_shot = true
explosiveness = 1.0
randomness = 1.0
fract_delta = false
local_coords = true
texture = SubResource("GradientTexture2D_c07i2")
emission_shape = 3
emission_rect_extents = Vector2(640, 640)
direction = Vector2(0, 0)
gravity = Vector2(0, 0)
scale_amount_min = 0.02
scale_amount_max = 0.06
color_initial_ramp = SubResource("Gradient_5n0pf")
hue_variation_min = -1.0
hue_variation_max = 1.0
script = SubResource("GDScript_x0qky")

[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = SubResource("GDScript_syjdu")

[node name="ControlsText" type="Label" parent="Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = -4.0
offset_bottom = -4.0
grow_horizontal = 2
grow_vertical = 2
text = "[H] show/hide this text
[f11] fullscreen
[R] reload
[enter] photograph (overrides res://stars.webp)
[F] open folder (res://)"
label_settings = SubResource("LabelSettings_k5ihk")
vertical_alignment = 2

[connection signal="reload_button_pressed" from="Control" to="CPUParticles2D" method="reload"]

		
	

(yes, you don't need to download the icon. it gets generated when you press photograph in the app )



1 comment

Loading...

Next up

new avatar 2024-11-12

i made a new avatar 2 days ago but i made it circle‑şaped because i forgot þat many websites still use square‑şaped avatars: https://gamejolt.com/p/new-avatar-and-header-2024-11-10-xznvipyc

new avatar and header 2024-11-10

special offer: twelve eleven simple drawings (like this)

Create your own Arcane art to be featured in an official Opera GX Arcane Mod + GET a chance to win prizes and bragging rights.

The best part? No AI is allowed in the contest.

Enter the contest here: https://bit.ly/forgeyourlegacy

Learn more deets 🔽

10 000 Likes

missing Game Jolt trophy

Our 2024 Advent Calendar has opened! Day 19: @SnowHexArt is a great Creator who creates pixel art including animations, assets, and more! Accept the quest and give them a follow to get Coins and a seasonal sticker!

2024-11-13 new community header and channel backgrounds for poppy ribbon's corner

new avatar 2024-12-11

my previous avatar had my 2 mascots in them but i want to make more mascots, so they wouldn't all fit in one avatar, so i made an avatar with just my arcade player name written

Landscape for a ttrpg

þey #Dream‍'d abt a #Ghost dreß'd as þem #Startling þem

————————————

#Joltober2024 day 30: #Costume

————————————

#Mimic #CreepyDoll

#SpyMaterialDesign #Simple #ArtPicture