experiments

This commit is contained in:
Taevas 2025-02-21 21:47:35 +01:00
parent 4aba8bf0ae
commit 25664e36f5
23 changed files with 346 additions and 17 deletions

20
elements/platform.tscn Normal file
View file

@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://gis4s061n422"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_llioc"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hgmxv"]
[node name="Platform" type="RigidBody3D"]
axis_lock_linear_x = true
axis_lock_linear_y = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
physics_material_override = SubResource("PhysicsMaterial_llioc")
gravity_scale = 0.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_hgmxv")
[node name="CSGBox3D" type="CSGBox3D" parent="."]

4
elements/platform2.tscn Normal file
View file

@ -0,0 +1,4 @@
[gd_scene format=3 uid="uid://b13nd5ibr7xvn"]
[node name="Platform2" type="CSGBox3D"]
use_collision = true

8
elements/platform3.tscn Normal file
View file

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://bgtoke5v8cbwu"]
[sub_resource type="BoxShape3D" id="BoxShape3D_gkjw1"]
[node name="Platform3" type="RigidBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_gkjw1")

17
elements/sphere.tscn Normal file
View file

@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://df5m716pd6mej"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_vumbr"]
bounce = 0.8
[sub_resource type="SphereShape3D" id="SphereShape3D_xfgrm"]
[node name="Sphere" type="RigidBody3D"]
axis_lock_linear_z = true
physics_material_override = SubResource("PhysicsMaterial_vumbr")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_xfgrm")
[node name="CSGSphere3D" type="CSGSphere3D" parent="."]
radial_segments = 20
rings = 10

11
idea.txt Normal file
View file

@ -0,0 +1,11 @@
Theme: Gravity
3D, but played in 2D (think New Super Mario Bros)
1 control: With the mouse, change a slider to affect how much gravity is applied
1 objective: Bring the ball to the opposite end of the level
Music should be proportional to either the gravity or the ball's speed, or maybe how close to the objective it is, probably not that
Each 2 levels should introduce a new mechanic like wind, moving platforms, bouncy walls...
Maybe an apple from a tree, to fall on Newton's head? Not that it'd have an apple's physics, though...
Have score be Sonic-like, there's a timer and it's converted into score, also add to score if ball collects certain stuff

View file

@ -1,18 +1,50 @@
[gd_scene format=3 uid="uid://ccgnnif026wb4"]
[gd_scene load_steps=2 format=3 uid="uid://ccgnnif026wb4"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[sub_resource type="GDScript" id="GDScript_oxyvh"]
script/source = "extends Node
[node name="RichTextLabel" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "Hello world! I'm waiting for the gamejam to get started!"
func makeAudioStreamPlayers(music_name: String) -> Array[AudioStreamPlayer]:
var path: String = \"res://music/\" + music_name
var dir: DirAccess = DirAccess.open(path)
var file_paths: Array[String] = []
assert(dir, path + \" is not a valid path!\")
if dir:
dir.list_dir_begin()
var file_name = dir.get_next()
while file_name != \"\":
if !dir.current_is_dir():
if file_name.ends_with(\".ogg\"):
file_paths.push_back(path + \"/\" + file_name)
file_name = dir.get_next()
assert(len(file_paths), path + \" had no .ogg files!\")
var players: Array[AudioStreamPlayer] = []
for file_path in file_paths:
var stream: AudioStreamOggVorbis = AudioStreamOggVorbis.load_from_file(file_path)
stream.loop = true
stream.bpm = 124
var player: AudioStreamPlayer = AudioStreamPlayer.new()
player.stream = stream
player.volume_db = -50
players.push_back(player)
return players
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var players = makeAudioStreamPlayers(\"base\")
for player in players:
add_child(player)
#player.volume_db = 0
for player in players:
player.play()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
"
[node name="World" type="Node"]
script = SubResource("GDScript_oxyvh")

BIN
music/base.mmpz Normal file

Binary file not shown.

BIN
music/base/hihat-closed.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://b46a7y6vdqd4n"
path="res://.godot/imported/hihat-closed.ogg-634dc0c568a8092078932f08dc65fc8f.oggvorbisstr"
[deps]
source_file="res://music/base/hihat-closed.ogg"
dest_files=["res://.godot/imported/hihat-closed.ogg-634dc0c568a8092078932f08dc65fc8f.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/base/hihat-open.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://buag3j2s22jpo"
path="res://.godot/imported/hihat-open.ogg-1aa0c33db5be0d76efd9dd318d5705d8.oggvorbisstr"
[deps]
source_file="res://music/base/hihat-open.ogg"
dest_files=["res://.godot/imported/hihat-open.ogg-1aa0c33db5be0d76efd9dd318d5705d8.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/base/kick.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dma7btls87mg4"
path="res://.godot/imported/kick.ogg-8bc4c6e0b9f2124e3c3e6f52c093e841.oggvorbisstr"
[deps]
source_file="res://music/base/kick.ogg"
dest_files=["res://.godot/imported/kick.ogg-8bc4c6e0b9f2124e3c3e6f52c093e841.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/base/kick2.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://djmbrvp7k263k"
path="res://.godot/imported/kick2.ogg-5477221d7a46d2bcc9595d2f229c37a8.oggvorbisstr"
[deps]
source_file="res://music/base/kick2.ogg"
dest_files=["res://.godot/imported/kick2.ogg-5477221d7a46d2bcc9595d2f229c37a8.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/base/sequencer.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dqeupvkvaoypg"
path="res://.godot/imported/sequencer.ogg-aa983a1c0920b312ad60781850c5dbf7.oggvorbisstr"
[deps]
source_file="res://music/base/sequencer.ogg"
dest_files=["res://.godot/imported/sequencer.ogg-aa983a1c0920b312ad60781850c5dbf7.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/base/synth.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dq88q86etj27v"
path="res://.godot/imported/synth.ogg-bb57dd708920d475d52e82c18cfac921.oggvorbisstr"
[deps]
source_file="res://music/base/synth.ogg"
dest_files=["res://.godot/imported/synth.ogg-bb57dd708920d475d52e82c18cfac921.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

9
music/bus_layout.tres Normal file
View file

@ -0,0 +1,9 @@
[gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://cjtkmxlrxd2g0"]
[sub_resource type="AudioEffectDistortion" id="AudioEffectDistortion_8wtc0"]
resource_name = "Distortion"
drive = 0.25
[resource]
bus/0/effect/0/effect = SubResource("AudioEffectDistortion_8wtc0")
bus/0/effect/0/enabled = true

View file

@ -14,11 +14,15 @@ config/name="AlakajamEntry"
config/description="I'm Taevas, and this is my entry for the 21st edition of \"Alakajam!\", a gamejam that lasts for 48 hours that starts on 2025-02-21 19:00UTC
https://alakajam.com/21st-alakajam"
config/version="20250221.0"
run/main_scene="res://index.tscn"
run/main_scene="res://test_level.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
boot_splash/show_image=false
config/icon="res://icon.svg"
[audio]
buses/default_bus_layout=""
[rendering]
renderer/rendering_method="gl_compatibility"

51
test.tscn Normal file
View file

@ -0,0 +1,51 @@
[gd_scene load_steps=6 format=3 uid="uid://dadwk81skcmby"]
[ext_resource type="PackedScene" uid="uid://gis4s061n422" path="res://elements/platform.tscn" id="1_gkiic"]
[ext_resource type="PackedScene" uid="uid://df5m716pd6mej" path="res://elements/sphere.tscn" id="2_71dxp"]
[ext_resource type="PackedScene" uid="uid://b13nd5ibr7xvn" path="res://elements/platform2.tscn" id="3_g25lt"]
[sub_resource type="GDScript" id="GDScript_eib6h"]
script/source = "extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
print($Sphere.position)
pass
"
[sub_resource type="BoxShape3D" id="BoxShape3D_4eek5"]
size = Vector3(1, 4, 1)
[node name="Test" type="Node3D"]
script = SubResource("GDScript_eib6h")
[node name="Platform" parent="." instance=ExtResource("1_gkiic")]
transform = Transform3D(0.14385, -0.58711, 0.796624, 0.988674, 0.120067, -0.0900406, -0.0427843, 0.800554, 0.597732, 3.00454, -1.58701, 0)
[node name="CollisionShape3D" parent="Platform" index="0"]
transform = Transform3D(1.00001, -1.03377e-07, 3.35276e-07, 2.14204e-07, 1, -7.45058e-07, -4.47035e-08, -5.96046e-08, 1.00001, 0, 0, 0)
shape = SubResource("BoxShape3D_4eek5")
[node name="CSGBox3D" parent="Platform" index="1"]
transform = Transform3D(1.00001, -1.03377e-07, 3.35276e-07, 2.32831e-07, 1, -7.7486e-07, -4.47035e-08, -5.96046e-08, 1.00001, 0, 0, 0)
size = Vector3(1, 4, 1)
[node name="Sphere" parent="." instance=ExtResource("2_71dxp")]
[node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -0.0889117, 0.99604, 0, -0.99604, -0.0889117, 0, 0.904974, 0)
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5.58526)
[node name="Platform2" parent="." instance=ExtResource("3_g25lt")]
transform = Transform3D(0.895688, 0.444682, 0, -0.444682, 0.895688, 0, 0, 0, 1, 0.113522, -0.705501, 0)
size = Vector3(2.45691, 1, 1)
[editable path="Platform"]

59
test_level.tscn Normal file
View file

@ -0,0 +1,59 @@
[gd_scene load_steps=8 format=3 uid="uid://dujoplhd35kqg"]
[ext_resource type="PackedScene" uid="uid://df5m716pd6mej" path="res://elements/sphere.tscn" id="1_8mffa"]
[ext_resource type="PackedScene" uid="uid://gis4s061n422" path="res://elements/platform.tscn" id="2_bei4m"]
[sub_resource type="GDScript" id="GDScript_hbi5e"]
script/source = "extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
print($Sphere.position)
pass
"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_6pkua"]
sky_top_color = Color(0.693381, 0.747001, 0.821796, 1)
ground_bottom_color = Color(0.172348, 0.451084, 0.511099, 1)
ground_curve = 0.25992
[sub_resource type="Sky" id="Sky_4du2k"]
sky_material = SubResource("ProceduralSkyMaterial_6pkua")
[sub_resource type="Environment" id="Environment_jfl74"]
background_mode = 2
sky = SubResource("Sky_4du2k")
ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_s5ay6"]
size = Vector3(180, 1, 1)
[node name="TestLevel" type="Node3D"]
script = SubResource("GDScript_hbi5e")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_jfl74")
[node name="Sphere" parent="." instance=ExtResource("1_8mffa")]
[node name="Platform" parent="." instance=ExtResource("2_bei4m")]
transform = Transform3D(0.985642, 0.168851, 0, -0.145861, 0.851441, -0.503759, -0.08506, 0.496526, 0.863844, 0, -1.49811, 0)
[node name="CollisionShape3D" parent="Platform" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0270482, 0)
shape = SubResource("BoxShape3D_s5ay6")
[node name="CSGBox3D" parent="Platform" index="1"]
size = Vector3(180, 1, 1)
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 15.1993)
[editable path="Platform"]