Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Merge patch-atomic-gamejam-background-update-02-20-2025-1740104245 into dev #4045

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dob5nb16tjgrc"
path="res://.godot/imported/object1.png-e7931f33dec8ff0e2092905c364429fe.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/kbve/png/universe/object1.png"
dest_files=["res://.godot/imported/object1.png-e7931f33dec8ff0e2092905c364429fe.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dv8b0ewt6a6bm"
path="res://.godot/imported/object2.png-e11b749b26fe9a1c8ed8eba7241e54af.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/kbve/png/universe/object2.png"
dest_files=["res://.godot/imported/object2.png-e11b749b26fe9a1c8ed8eba7241e54af.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cslhjsonhatit"
path="res://.godot/imported/object3.png-50a036f8b3f63f5ef2eb4a7b274a74db.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/kbve/png/universe/object3.png"
dest_files=["res://.godot/imported/object3.png-50a036f8b3f63f5ef2eb4a7b274a74db.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
1 change: 1 addition & 0 deletions apps/gamejam/brackeys/13/scripts/global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ signal notification_received(message_id: String, message: String, type: String)

var environment_data := {
"asteroids": 10,
"universe_objects":15,
"asteroid_speed": 200,
"asteroid_belt": false
}
Expand Down
2 changes: 1 addition & 1 deletion apps/gamejam/brackeys/13/scripts/shop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ func update_categories() -> void:
cate_selected = categories[n]
categories_label.text = cate_selected

#endregion
#endregion
72 changes: 66 additions & 6 deletions apps/gamejam/brackeys/13/scripts/universe_layer.gd
Original file line number Diff line number Diff line change
@@ -1,11 +1,71 @@
extends Parallax2D


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@export var pool_size: int = 2
@export var scroll_speed: float = 10.0

# Screen bounds
var screen_width: float
var screen_height: float

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
# Sprite pools
var active_sprites: Array[Sprite2D] = []
var inactive_sprites: Array[Sprite2D] = []

const BASE_PATH: String = "res://assets/kbve/png/universe/object"

func _ready():
var viewport = get_viewport()
screen_width = viewport.get_visible_rect().size.x
screen_height = viewport.get_visible_rect().size.y
ignore_camera_scroll = true
repeat_size = Vector2(screen_width * 2, screen_height * 2)
scroll_scale = Vector2(1.0, 1.0)
_initialize_pool()
_spawn_initial_sprites()

func _initialize_pool():
for i in range(1, pool_size + 1):
var sprite = Sprite2D.new()
var texture_path = BASE_PATH + str(i) + ".png"
if ResourceLoader.exists(texture_path):
sprite.texture = load(texture_path) as Texture2D
else:
print("Warning: Texture not found at ", texture_path)
continue

var scale = randf_range(0.5, 1.5)
sprite.scale = Vector2(scale, scale)
var notifier = VisibleOnScreenNotifier2D.new()
notifier.rect = Rect2(-sprite.get_rect().size * scale / 2, sprite.get_rect().size * scale)
sprite.add_child(notifier)
notifier.connect("screen_exited", Callable(self, "_return_to_pool").bind(sprite))
inactive_sprites.append(sprite)
add_child(sprite)
sprite.hide()

func _spawn_initial_sprites():
var spawn_area_width = screen_width * 2
for i in range(pool_size):
_spawn_sprite(Vector2(randf_range(0, spawn_area_width), randf_range(0, screen_height)))

func _spawn_sprite(position: Vector2):
if inactive_sprites.size() == 0:
return

var sprite = inactive_sprites.pop_back()
sprite.position = position
sprite.scale = Vector2(randf_range(0.5, 1.5), randf_range(0.5, 1.5))
sprite.show()
active_sprites.append(sprite)

func _return_to_pool(sprite: Sprite2D):
if sprite in active_sprites:
active_sprites.erase(sprite)
inactive_sprites.append(sprite)
sprite.hide()
var spawn_x = screen_width + scroll_offset.x + randf_range(0, screen_width)
_spawn_sprite(Vector2(spawn_x, randf_range(0, screen_height)))

func _process(delta: float):
scroll_offset.x -= scroll_speed * delta
2 changes: 1 addition & 1 deletion apps/gamejam/brackeys/13/theme/Theme.tres
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource type="Texture2D" uid="uid://c73g314v1aohm" path="res://assets/audioknobs-ui/audioknobs/slider.png" id="1_4ho6j"]
[ext_resource type="Texture2D" uid="uid://wwlxthw1p5px" path="res://assets/audioknobs-ui/audioknobs/button-toggle-off.png" id="1_467wl"]
[ext_resource type="Texture2D" uid="uid://bwhtv183g5vma" path="res://assets/audioknobs-ui/audioknobs/button-toggle-on.png" id="2_dcdwy"]
[ext_resource type="StyleBox" uid="uid://i2i5a12n6yo3" path="res://theme/empty.stylebox" id="2_ma0tk"]
[ext_resource type="StyleBox" path="res://theme/empty.stylebox" id="2_ma0tk"]
[ext_resource type="Texture2D" uid="uid://7h4qiorvtq3q" path="res://assets/audioknobs-ui/audioknobs/metalbackground1.png" id="2_wr8kl"]
[ext_resource type="Texture2D" uid="uid://byxtqi4hn1crh" path="res://assets/audioknobs-ui/audioknobs/v-slider-small.png" id="3_j3fil"]
[ext_resource type="Texture2D" uid="uid://bt4me1jtt6j6a" path="res://assets/audioknobs-ui/audioknobs/slider-bg.png" id="4_4s0nj"]
Expand Down
6 changes: 5 additions & 1 deletion apps/kbve/kbve.com/src/content/docs/project/brackeys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,14 @@ The spaceship asset pack that we will be using is from [Kenny Space Shooter Redu
There are two folders, `_space-shooter-redux` and `space-shooter-redux`, all of the assets from the pack are under the `_space-shooter-redux` and objects that we will use will be copied over to `space-shooter-redux`.
Without having to dump a bunch of assets, I will try to use as many as needed and then going to delete the `_space-shooter-redux` folder.

### auidioknobs
#### auidioknobs
This asset will be used as UI panel that players will interact with in the world. [auidioknobs](https://opengameart.org/node/7969), released as CC-BY-3.0.
Credited to [email protected]

#### Galaxy Pixel Art

The first three objects for the universe layer were made by Iftikhar Alam from Vecteezy / IftiStock.com.

### Layers

These are the layers that I am thinking we will be operating in:
Expand Down
6 changes: 3 additions & 3 deletions apps/kbve/kbve.com/src/content/journal/02-20.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: 'February: 20'
category: Daily
date: 2024-02-20 12:00:00
date: 2025-02-20 12:00:00
client: Self
unsplash: 1561478908-1ceb3bcc74b6
img: https://images.unsplash.com/photo-1561478908-1ceb3bcc74b6?crop=entropy&cs=srgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODE3NDg2ODY&ixlib=rb-4.0.3&q=85
unsplash: 1537963447914-dbc04b81de27
img: https://images.unsplash.com/photo-1537963447914-dbc04b81de27?crop=entropy&cs=srgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODE3NDg2ODY&ixlib=rb-4.0.3&q=85
description: Daily Log for February 20th for each year!
tags:
- daily
Expand Down