50 Commits

Author SHA1 Message Date
1dc1501b80 (wip) Food spawning on prey death 2026-02-07 17:42:57 +01:00
9c625edef4 (wip) Fix: Main menu now disappears 2026-02-07 17:42:46 +01:00
49d9489ede (wip) Rehauled main menu / game loading logic 2026-02-07 17:26:17 +01:00
bef1e9cb53 (wip) Food now moves with a world flow (which is updated using a manual timer in the GameManager 2026-02-07 16:24:37 +01:00
d5b33d66b8 Merge remote-tracking branch 'refs/remotes/origin/stage/molecular' into stage/molecular 2026-02-07 15:42:37 +01:00
2211130fd3 ft: extracted mirrorSprite to custom node 2026-02-07 15:42:24 +01:00
ceb0d90c20 (wip) Made food smaller 2026-02-07 15:38:41 +01:00
57c611a46d (wip) Food for other entities 2026-02-07 15:35:45 +01:00
232184afba (wip) Player food 2026-02-07 15:31:43 +01:00
2352a3aa07 fx: hopefully fixed error 2026-02-07 14:16:56 +01:00
098348b329 (wip) First food commit 2026-02-07 13:23:54 +01:00
22ffa3dac1 (wip) updated comment, starting to implement food 2026-02-07 12:48:16 +01:00
59c4818216 fx: variable loading prey script 2026-02-07 12:07:36 +01:00
8ee70854ea ft: predator mostly done 2026-02-06 12:43:37 +01:00
5f9a2fffb9 (wip) I guess this file also counts as part of the abstract food class 2026-02-03 21:11:17 +01:00
6094980d00 Added abstract food class 2026-02-03 21:10:39 +01:00
66233d8fad Added food assets 2026-02-03 21:10:14 +01:00
5751f25732 ft (wip): hammerhead predator 2026-02-02 01:41:01 +01:00
b21bf52938 Merge remote-tracking branch 'refs/remotes/origin/stage/molecular' into stage/molecular 2026-02-01 13:09:41 +01:00
85d1ef44a9 Fix: Mirrored sprites now play the same animation always 2026-02-01 13:09:37 +01:00
b56d0cb777 fx: adjusted prey speed 2026-02-01 13:08:52 +01:00
07f3c13fd2 fx: rotation wrapping interaction bug 2026-02-01 12:57:45 +01:00
6432b709ef Fix: Added call_deferred on _spawn_minimum 2026-02-01 09:36:14 +01:00
69776a6973 ft: prey sprite update 2026-01-29 10:31:24 +01:00
7207626315 ft: prey player detection 2026-01-27 19:54:16 +01:00
c9880d9b35 fx: player rotation 2026-01-27 19:23:37 +01:00
487062e25c Merge branch 'stage/molecular' of ssh://git.djairo.dev:2222/djairoh/notSpore into stage/molecular 2026-01-26 23:54:20 +01:00
adf1438bc8 ft: nucleotide prey FSM 2026-01-26 23:54:15 +01:00
f957b90be6 ft: removed addons from git (and added to gitignore) 2026-01-23 14:08:55 +01:00
c11afd9ddd ft (Wip): FSM behaviour prey 2026-01-23 10:48:14 +01:00
0b9b1e75d4 fx: attacking sprite/logic mismatch 2026-01-17 14:56:25 +01:00
c0f5dd4628 ft (placeholder): player attacking anim 2026-01-17 14:47:16 +01:00
03117b77fb fx: mirroring nucleotide prey state 2026-01-17 14:32:16 +01:00
18ce1716e4 ft: player attacking logic 2026-01-17 14:20:54 +01:00
5811658c64 Merge branch 'stage/molecular' of ssh://git.djairo.dev:2222/djairoh/notSpore into stage/molecular 2026-01-17 13:01:57 +01:00
e4b3919b81 ft: improved npc spawning logic 2026-01-17 13:00:54 +01:00
8de3ee2c9a Prey is now reflected to be smooth across periodic boundary too 2026-01-02 22:03:29 +01:00
4160361145 Periodic boundary now applies to prey too 2026-01-02 13:17:55 +01:00
3262a8899c Added simple periodic boundary 2025-12-21 15:14:51 +01:00
6662dc0c80 Implemented proper backgrund tilemap / tilestep 2025-12-21 14:24:45 +01:00
1a532a5afb ft: prey collision 2025-12-20 00:03:13 +01:00
a5055a523f ft (very very wip): prey impl 2025-12-19 20:07:53 +01:00
551482e209 ft (wip): molecular stage prey 2025-12-15 13:05:11 +01:00
263011b460 Added simple UI 2025-11-24 22:59:08 +01:00
9de9d18632 Basic camera setup with temp. sprites 2025-11-24 22:54:13 +01:00
a4d062ea04 Updated README.md with C++ instructions 2025-11-23 00:03:25 +01:00
52ae094087 Added c++ test; now works 2025-11-22 23:55:25 +01:00
e77fe832f0 (wip) Added c++ test file 2025-11-22 23:36:14 +01:00
f4fd083a1a (wip) trying to setup c++ extension 2025-11-22 23:23:35 +01:00
cdcc23c50a Initial setup w. basic scene(s) 2025-11-22 22:57:26 +01:00
150 changed files with 339946 additions and 566 deletions

1
.gitignore vendored
View File

@@ -49,3 +49,4 @@ export_presets.cfg
data_*/
mono_crash.*.json
addons/

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "evolve-die-repeat/thirdparty/godot-cpp"]
path = evolve-die-repeat/thirdparty/godot-cpp
url = https://github.com/godotengine/godot-cpp.git
branch = 4.5

View File

@@ -1,2 +0,0 @@
.import
logs/

View File

@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://c5qpnfga41t4p"
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"
[deps]
source_file="res://art/House In a Forest Loop.ogg"
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"]
[params]
loop=true
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@@ -1,12 +0,0 @@
[gd_resource type="SpatialMaterial" format=2]
[resource]
resource_name = "body"
params_cull_mode = 2
albedo_color = Color( 0.906332, 0.353653, 0, 1 )
roughness = 0.5
emission_enabled = true
emission = Color( 0, 0, 0, 1 )
emission_energy = 1.0
emission_operator = 0
emission_on_uv2 = false

View File

@@ -1,14 +0,0 @@
[gd_resource type="SpatialMaterial" format=2]
[resource]
resource_name = "eye"
params_cull_mode = 2
albedo_color = Color( 0.858824, 0.858824, 0.858824, 1 )
metallic = 0.05
metallic_specular = 1.0
roughness = 0.1
emission_enabled = true
emission = Color( 0.254902, 0.254902, 0.27451, 1 )
emission_energy = 1.0
emission_operator = 0
emission_on_uv2 = false

View File

@@ -1,42 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bicorb7we351t"
path="res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn"
[deps]
source_file="res://art/mob.glb"
dest_files=["res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn"]
[params]
nodes/root_type="Spatial"
nodes/root_name="Scene Root"
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=15
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1

View File

@@ -1,7 +0,0 @@
[gd_resource type="SpatialMaterial" format=2]
[resource]
resource_name = "mob_body"
params_cull_mode = 2
albedo_color = Color( 0.0588235, 0.266667, 0.490196, 1 )
roughness = 0.43

View File

@@ -1,14 +0,0 @@
[gd_resource type="SpatialMaterial" format=2]
[resource]
resource_name = "mob_eye"
params_cull_mode = 2
albedo_color = Color( 0.760784, 0.113725, 0.188235, 1 )
metallic = 0.48
metallic_specular = 1.0
roughness = 0.25
emission_enabled = true
emission = Color( 0.74902, 0.0784314, 0.0784314, 1 )
emission_energy = 1.0
emission_operator = 0
emission_on_uv2 = false

View File

@@ -1,42 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://d0ypm0v45pwdv"
path="res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn"
[deps]
source_file="res://art/player.glb"
dest_files=["res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn"]
[params]
nodes/root_type="Spatial"
nodes/root_name="Scene Root"
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=false
meshes/create_shadow_meshes=true
meshes/light_baking=0
meshes/lightmap_texel_size=0.1
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=15
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1

View File

@@ -1,16 +0,0 @@
[gd_resource type="SpatialMaterial" format=2]
[resource]
resource_name = "pupil"
params_cull_mode = 2
albedo_color = Color( 0, 0, 0, 1 )
metallic_specular = 1.0
roughness = 0.3
emission_enabled = true
emission = Color( 0, 0, 0, 1 )
emission_energy = 1.0
emission_operator = 0
emission_on_uv2 = false
rim_enabled = true
rim = 1.0
rim_tint = 0.5

View File

@@ -1,43 +0,0 @@
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
—————————————————————————————-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
—————————————————————————————-
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
“Reserved Font Name” refers to any names specified as such after the copyright statement(s).
“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s).
“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -1,36 +0,0 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://cyxhh7ddkn62q"
path="res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata"
[deps]
source_file="res://fonts/Montserrat-Medium.ttf"
dest_files=["res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=1
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,15 +0,0 @@
extends Node
@export var mob_scene: PackedScene
func _on_mob_timer_timeout() -> void:
var mob = mob_scene.instantiate()
var mob_spawn_location = get_node("SpawnPath/SpawnLocation")
mob_spawn_location.progress_ratio = randf()
var player_position = $Player.position
mob.initialize(mob_spawn_location.position, player_position)
add_child(mob)

View File

@@ -1 +0,0 @@
uid://cfb7xo35cn5fo

View File

@@ -1,83 +0,0 @@
[gd_scene load_steps=9 format=3 uid="uid://2wap0283yk0r"]
[ext_resource type="Script" uid="uid://cfb7xo35cn5fo" path="res://main.gd" id="1_0xm2m"]
[ext_resource type="PackedScene" uid="uid://ceuu150fmggvr" path="res://player.tscn" id="1_ig7tw"]
[ext_resource type="PackedScene" uid="uid://defdm2qdva75q" path="res://mob.tscn" id="2_h2yge"]
[sub_resource type="BoxShape3D" id="BoxShape3D_7dm0k"]
size = Vector3(60, 2, 60)
[sub_resource type="BoxMesh" id="BoxMesh_ig7tw"]
size = Vector3(60, 2, 60)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ig7tw"]
albedo_color = Color(0.48985153, 0.33837724, 0.8704828, 1)
[sub_resource type="CylinderMesh" id="CylinderMesh_ig7tw"]
material = SubResource("StandardMaterial3D_ig7tw")
[sub_resource type="Curve3D" id="Curve3D_ig7tw"]
closed = true
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -13.082657, 0, 14.897789, 0, 0, 0, 0, 0, 0, 14.178589, 0, 15.103276, 0, 0, 0, 0, 0, 0, 14.178589, 0, -15.240269, 0, 0, 0, 0, 0, 0, -13.01416, 0, -15.171773),
"tilts": PackedFloat32Array(0, 0, 0, 0)
}
point_count = 4
[node name="Main" type="Node"]
script = ExtResource("1_0xm2m")
mob_scene = ExtResource("2_h2yge")
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
collision_layer = 4
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
shape = SubResource("BoxShape3D_7dm0k")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
mesh = SubResource("BoxMesh_ig7tw")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.8660254, 0.5, 0, -0.5, 0.8660254, 0, 15, 5)
shadow_enabled = true
[node name="Player" parent="." instance=ExtResource("1_ig7tw")]
[node name="CameraPivot" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.70710677, 0.70710677, 0, -0.70710677, 0.70710677, 0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="CameraPivot"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 19)
projection = 1
size = 19.0
[node name="Cyllinders" type="Node3D" parent="."]
[node name="MeshInstance3D" type="MeshInstance3D" parent="Cyllinders"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13, 0, -15)
mesh = SubResource("CylinderMesh_ig7tw")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Cyllinders"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13, 0, 15)
mesh = SubResource("CylinderMesh_ig7tw")
[node name="MeshInstance3D3" type="MeshInstance3D" parent="Cyllinders"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, -15)
mesh = SubResource("CylinderMesh_ig7tw")
[node name="MeshInstance3D4" type="MeshInstance3D" parent="Cyllinders"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 15)
mesh = SubResource("CylinderMesh_ig7tw")
[node name="SpawnPath" type="Path3D" parent="."]
curve = SubResource("Curve3D_ig7tw")
[node name="SpawnLocation" type="PathFollow3D" parent="SpawnPath"]
transform = Transform3D(-0.007537449, 0, -0.9999705, 0, 1, 0, 0.9999705, 0, -0.007537449, -13.082657, 0, 14.897789)
[node name="MobTimer" type="Timer" parent="."]
autostart = true
[connection signal="timeout" from="MobTimer" to="." method="_on_mob_timer_timeout"]

View File

@@ -1,40 +0,0 @@
extends CharacterBody3D
signal squashed
@export var min_speed = 10
@export var max_speed = 18
# In code timer for brownian motion
var T: float = 0.5
var Tinit: float = 1.0
var dt: float = 0.05
var t: float = 0.0
func _physics_process(_delta):
if t > T and Tinit < 0:
t = 0
set_new_velocity()
t += dt
Tinit -= dt
move_and_slide()
func initialize(start_position, player_position):
look_at_from_position(start_position, player_position, Vector3.UP)
set_new_velocity()
func set_new_velocity() -> void:
rotate_y(randf_range(-PI / 4, PI / 4))
var random_speed = randi_range(min_speed, max_speed)
velocity = Vector3.FORWARD * random_speed
velocity = velocity.rotated(Vector3.UP, rotation.y)
func _on_visible_on_screen_notifier_3d_screen_exited() -> void:
queue_free()
func squash():
squashed.emit()
queue_free()

View File

@@ -1 +0,0 @@
uid://c5wp01kn08qxe

View File

@@ -1,27 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://defdm2qdva75q"]
[ext_resource type="PackedScene" uid="uid://bicorb7we351t" path="res://art/mob.glb" id="1_dy6sc"]
[ext_resource type="Script" uid="uid://c5wp01kn08qxe" path="res://mob.gd" id="1_nokgg"]
[sub_resource type="BoxShape3D" id="BoxShape3D_nokgg"]
size = Vector3(1.9155884, 0.7798462, 1.6226807)
[node name="Mob" type="CharacterBody3D" groups=["mob"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.22412324, 0)
collision_layer = 2
collision_mask = 0
script = ExtResource("1_nokgg")
[node name="Pivot" type="Node3D" parent="."]
[node name="Character" parent="Pivot" instance=ExtResource("1_dy6sc")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.020843506, 0.4449278, 0.06854248)
shape = SubResource("BoxShape3D_nokgg")
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.007541895, 0.34551716, 0.3237151)
aabb = AABB(-1.1488216, -0.65816104, -1.7166415, 2.2976432, 1.2323378, 3.433283)
[connection signal="screen_exited" from="VisibleOnScreenNotifier3D" to="." method="_on_visible_on_screen_notifier_3d_screen_exited"]

View File

@@ -1,57 +0,0 @@
extends CharacterBody3D
@export var speed = 14
@export var fall_acc = 75
@export var jump_impulse = 50
@export var bounce_impulse = 40
var target_vel = Vector3.ZERO
func _physics_process(delta: float) -> void:
# Move
var dir = Vector3.ZERO
if Input.is_action_pressed("move_left"):
dir.x -= 1
if Input.is_action_pressed("move_right"):
dir.x += 1
if Input.is_action_pressed("move_forward"):
dir.z -= 1
if Input.is_action_pressed("move_back"):
dir.z += 1
if dir != Vector3.ZERO:
dir = dir.normalized()
$Pivot.basis = Basis.looking_at(dir)
# Ground vel. (overwrite y later)
target_vel = dir * speed
# vert. vel.
target_vel.y = 0
if not is_on_floor():
target_vel.y -= fall_acc * delta
# Jump
if is_on_floor() and Input.is_action_just_pressed("jump"):
target_vel.y = jump_impulse
# Iterate through all collisions that occurred this frame
for index in range(get_slide_collision_count()):
var collision = get_slide_collision(index)
# Avoid calling collision again after deleting
if collision.get_collider() == null:
continue
if collision.get_collider().is_in_group("mob"):
var mob = collision.get_collider()
# hitting it from above.
if Vector3.UP.dot(collision.get_normal()) > 0.1:
mob.squash()
if !is_on_floor(): # TODO: This does not seem to work here
target_vel.y = bounce_impulse
break
velocity = target_vel
move_and_slide()

View File

@@ -1 +0,0 @@
uid://cnd3r3qyfy5so

View File

@@ -1,21 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://ceuu150fmggvr"]
[ext_resource type="PackedScene" uid="uid://d0ypm0v45pwdv" path="res://art/player.glb" id="1_4flbx"]
[ext_resource type="Script" uid="uid://cnd3r3qyfy5so" path="res://player.gd" id="1_onrkg"]
[sub_resource type="SphereShape3D" id="SphereShape3D_4flbx"]
radius = 1.0
[node name="Player" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3503281, 0)
collision_mask = 6
script = ExtResource("1_onrkg")
[node name="Pivot" type="Node3D" parent="."]
[node name="Character" parent="Pivot" instance=ExtResource("1_4flbx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("SphereShape3D_4flbx")

View File

@@ -1,68 +0,0 @@
; 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="Squash the Creeps (3D)"
config/description="In this game, your goal is to chase and kick out the creeps!"
run/main_scene="uid://2wap0283yk0r"
config/features=PackedStringArray("4.5")
config/icon="res://icon.webp"
[display]
window/size/viewport_width=720
window/size/viewport_height=540
[filesystem]
import/blender/enabled=false
[input]
move_left={
"deadzone": 0.2,
"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.2,
"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_forward={
"deadzone": 0.2,
"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_back={
"deadzone": 0.2,
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
jump={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[layer_names]
3d_physics/layer_1="players"
3d_physics/layer_2="enemies"
3d_physics/layer_3="world"
[rendering]
anti_aliasing/quality/msaa_3d=2

View File

@@ -1,2 +1,25 @@
# notSpore
# Evolve Die Repeat TODO: The name is a work in progress
This is currently quite empty.
## C++ setup
From anywhere in proejct:
```bash
git submodule update --init --recursive
```
In `thirdparty`:
```bash
godot --headless --dump-extension-api
```
To compile the cpp extension, run this from `thirdparty/godot-cpp`:
```bash
scons platform=linux target=template_debug generate_bindings=yes custom_api_file=../extension_api.json -j8
```
Finally, to compile and extern local `.cpp` files, run this from `thirdparty`:
```bash
scons platform=linux target=template_debug -j8
```

View File

@@ -0,0 +1,4 @@
root = true
[*]
charset = utf-8

2
evolve-die-repeat/.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
evolve-die-repeat/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

View File

@@ -0,0 +1,15 @@
extends Label
#var counter := Test.new() # C++ class
func _ready() -> void:
#text += str(counter.get_counter())
pass
func _process(delta: float) -> void:
pass
#if Input.is_action_just_pressed("ui_accept"):
#counter.increment()
#var baseText := text
#baseText = baseText.left(baseText.length() - str(counter.get_counter()).length())
#text = baseText + str(counter.get_counter())

View File

@@ -0,0 +1 @@
uid://ceut2lrvkns75

View File

@@ -0,0 +1,78 @@
extends Node
var screen_size = Vector2(1920.0, 1080.0) # Default screen size (this is a float for some reason)
var viewport_size
@onready var extent: Rect2 = get_viewport().get_visible_rect()
# Main menu & game spawning
@onready
var mainMenuScene = preload("res://main_menu.tscn").instantiate()
@onready
var gameScene = preload("res://molecular/molecular_stage.tscn").instantiate()
# utils.
var rng = RandomNumberGenerator.new()
var eps: float = 1e-4
# managers
@onready
var foodManager = gameScene.get_node("FoodManager")
# A world "current"
# polar
var flow_dir: float # [0, 2pi)
var flow_mag: float # [0, 1]
# cartesian
var flow_x: float
var flow_y: float
# Swap period
var flowT: float = 10
# A game timer
var t: float = 0.0
func _ready() -> void:
# Create viewport
viewport_size = get_viewport().get_visible_rect().size
# Create game (main menu)
add_child(mainMenuScene)
# initial world current
get_new_flow()
func _physics_process(delta: float) -> void:
t += delta
# Flow current change
if abs(fmod(t, flowT)) < eps:
get_new_flow()
func start_game() -> void:
add_child(gameScene)
# TODO: This needs to be called from a script inheriting a CharacterBody2D (e.g. the player)
# Alternative would be to pass the player reference to this script (which might be better?)
func init_screen_size(x:float, y:float) -> void:
screen_size.x = x
screen_size.y = y
# This can take a vector of any size (but should be 2d, other components are unused)
func get_boundaried_position(position):
## clamp
#return position.clamp(Vector2.ZERO, screen_size)
## periodic
position.x = wrapf(position.x, 0, screen_size.x)
position.y = wrapf(position.y, 0, screen_size.y)
return position
func get_new_flow():
flow_dir = rng.randf()*2*PI
flow_mag = rng.randf()
flow_x = flow_mag * cos(flow_dir)
flow_y = flow_mag * sin(flow_dir)

View File

@@ -0,0 +1 @@
uid://vsbibc5fanou

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 995 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uqy71st3rbdr"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,7 @@
extends Control
func _on_play_button_pressed() -> void:
print("Starting game by pressing button...")
GameManager.start_game()
self.queue_free()

View File

@@ -0,0 +1 @@
uid://dxc66bci2ivrj

View File

@@ -0,0 +1,36 @@
[gd_scene format=3 uid="uid://drgv154ei1vrl"]
[ext_resource type="Script" uid="uid://dxc66bci2ivrj" path="res://main_menu.gd" id="1_06t4h"]
[sub_resource type="LabelSettings" id="LabelSettings_rhts7"]
font_size = 64
[node name="MainMenu" type="Control" unique_id=369570860]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_06t4h")
[node name="PlayButton" type="Button" parent="." unique_id=1831335357]
layout_mode = 0
offset_left = 448.0
offset_top = 256.0
offset_right = 768.0
offset_bottom = 314.0
text = "Play"
[node name="MainMenuText" type="Label" parent="." unique_id=1324657553]
layout_mode = 0
offset_left = 320.0
offset_top = 32.0
offset_right = 904.0
offset_bottom = 151.0
text = "The Main Menu"
label_settings = SubResource("LabelSettings_rhts7")
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="pressed" from="PlayButton" to="." method="_on_play_button_pressed"]

View File

@@ -0,0 +1,6 @@
[gd_scene format=3 uid="uid://b8gt8os2m28lv"]
[ext_resource type="Script" uid="uid://vsbibc5fanou" path="res://game_manager.gd" id="1_0f027"]
[node name="MainScene" type="Node" unique_id=1897047571]
script = ExtResource("1_0f027")

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnlrq8gxiix6"
path="res://.godot/imported/bg-far-placeholder.jpg-01304d9c071eca65de57b4adc0479e81.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/background/bg-far-placeholder.jpg"
dest_files=["res://.godot/imported/bg-far-placeholder.jpg-01304d9c071eca65de57b4adc0479e81.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c3cuhrmulyy1s"
path="res://.godot/imported/bg-near.png-00577ad303726b65cb5579d462bbdf09.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/background/bg-near.png"
dest_files=["res://.godot/imported/bg-near.png-00577ad303726b65cb5579d462bbdf09.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://nev7b6ohgeo"
path="res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"
uid="uid://bto1pnycvianp"
path="res://.godot/imported/bg.png-84a173f3a1de937d0ba2884af46d549b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.webp"
dest_files=["res://.godot/imported/icon.webp-e94f9a68b0f625a567a797079e4d325f.ctex"]
source_file="res://molecular/assets/background/bg.png"
dest_files=["res://.godot/imported/bg.png-84a173f3a1de937d0ba2884af46d549b.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://xaqiha5lh1vt"
path="res://.godot/imported/food-left-bolt.png-a2624c23f9c063886727de28bb8d45db.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/food/food-left-bolt.png"
dest_files=["res://.godot/imported/food-left-bolt.png-a2624c23f9c063886727de28bb8d45db.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dj4lyyloj1ke1"
path="res://.godot/imported/food-left-bottom-bolt.png-29b52334cce2caefb211e507cb88e1c1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/food/food-left-bottom-bolt.png"
dest_files=["res://.godot/imported/food-left-bottom-bolt.png-29b52334cce2caefb211e507cb88e1c1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcedkos6vgv51"
path="res://.godot/imported/food-normal.png-b719473d7bef8a09701e78ab0f73d15b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/food/food-normal.png"
dest_files=["res://.godot/imported/food-normal.png-b719473d7bef8a09701e78ab0f73d15b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cbynycukppmup"
path="res://.godot/imported/food-right-bottom-bolt.png-8eb8a35372e35c8de0cc432876ae5af5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/food/food-right-bottom-bolt.png"
dest_files=["res://.godot/imported/food-right-bottom-bolt.png-8eb8a35372e35c8de0cc432876ae5af5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cend5h3nmvq5l"
path="res://.godot/imported/food-right-up-bolt.png-c49edf3849bcaa575384d233173c9498.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/food/food-right-up-bolt.png"
dest_files=["res://.godot/imported/food-right-up-bolt.png-c49edf3849bcaa575384d233173c9498.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://boknmstvkc0a2"
path="res://.godot/imported/player-sprite-placeholder-attacking-crop.png-7a6a3f2b68f208c74f7cac8cb16cfc5e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/player-sprite-placeholder-attacking-crop.png"
dest_files=["res://.godot/imported/player-sprite-placeholder-attacking-crop.png-7a6a3f2b68f208c74f7cac8cb16cfc5e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxwvga07sm3yl"
path="res://.godot/imported/player-sprite-placeholder-crop.png-f29c3ab24e261ab3d11fb066419e0b90.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/player-sprite-placeholder-crop.png"
dest_files=["res://.godot/imported/player-sprite-placeholder-crop.png-f29c3ab24e261ab3d11fb066419e0b90.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnqwe065lmv0h"
path="res://.godot/imported/player-sprite-placeholder.png-6805db1633c9b4853860db48d10b2af1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/player-sprite-placeholder.png"
dest_files=["res://.godot/imported/player-sprite-placeholder.png-6805db1633c9b4853860db48d10b2af1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://30uwkdbnuu3h"
path="res://.godot/imported/hammerheadRibozyme-hunting.png-9b9929a81db6474a29fbff93ee4f1cef.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/predator/hammerheadRibozyme-hunting.png"
dest_files=["res://.godot/imported/hammerheadRibozyme-hunting.png-9b9929a81db6474a29fbff93ee4f1cef.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://jyuf4lgjo64"
path="res://.godot/imported/hammerheadRibozyme-hurt.png-6a7eeaef121ff058edf73e3d18dfd77e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/predator/hammerheadRibozyme-hurt.png"
dest_files=["res://.godot/imported/hammerheadRibozyme-hurt.png-6a7eeaef121ff058edf73e3d18dfd77e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ch5rddsumyyhm"
path="res://.godot/imported/predator-healthy.png-4df87d98e435e1fb3d3b0c12615f1c9b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/predator/predator-healthy.png"
dest_files=["res://.godot/imported/predator-healthy.png-4df87d98e435e1fb3d3b0c12615f1c9b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bhcb5g7g7um8"
path="res://.godot/imported/prey-dying-frame0.png-3dfc6299514225b1b5ecd511feec558a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-dying-frame0.png"
dest_files=["res://.godot/imported/prey-dying-frame0.png-3dfc6299514225b1b5ecd511feec558a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxn11avw7dykl"
path="res://.godot/imported/prey-dying-frame1.png-8e3f40908415d07a432ca919106bfe5f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-dying-frame1.png"
dest_files=["res://.godot/imported/prey-dying-frame1.png-8e3f40908415d07a432ca919106bfe5f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctkehsavw6ghx"
path="res://.godot/imported/prey-healthy-frame0.png-fdee965b6537e072b2ba52ebaa00234a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-healthy-frame0.png"
dest_files=["res://.godot/imported/prey-healthy-frame0.png-fdee965b6537e072b2ba52ebaa00234a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uy28y3mkk6nt"
path="res://.godot/imported/prey-healthy-frame1.png-d0ef89a578931d076b5469c218505713.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-healthy-frame1.png"
dest_files=["res://.godot/imported/prey-healthy-frame1.png-d0ef89a578931d076b5469c218505713.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://btnyajci8ptb2"
path="res://.godot/imported/prey-injured-frame0.png-de2d8ee9861665f890cb3ef99d676bc3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-injured-frame0.png"
dest_files=["res://.godot/imported/prey-injured-frame0.png-de2d8ee9861665f890cb3ef99d676bc3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bqll8ge4cr2uf"
path="res://.godot/imported/prey-injured-frame1.png-6fdfb22e05a71b519337c6ac43b474b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://molecular/assets/prey/prey-injured-frame1.png"
dest_files=["res://.godot/imported/prey-injured-frame1.png-6fdfb22e05a71b519337c6ac43b474b1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

View File

@@ -0,0 +1,23 @@
@abstract
class_name AbstractFood
extends Area2D
@export var val: int = 1
@export var food_name: String = "Food"
@export var flow_carry_speed: float = 10.0
signal consumed
func _ready() -> void:
pass
func _physics_process(delta: float) -> void:
var dpos = Vector2(GameManager.flow_x, GameManager.flow_y) * delta * flow_carry_speed
position += dpos
func _on_body_entered(body: Node2D) -> void:
pass
func eat(consumer: Node2D) -> void:
pass

View File

@@ -0,0 +1 @@
uid://crujkjpjehrvv

View File

@@ -0,0 +1,49 @@
extends Node
class_name FoodManager2D
var minCount: int = 20
var _currentCount: int = 0
var rng = RandomNumberGenerator.new()
@export var foodTypes: Array[PackedScene] = []
## The probabilities have to add up to 1.0
@export var foodProbs: Array[float] = []
@export var spawnRange: Rect2 = Rect2(0, 0, 0, 0)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
spawnRange = GameManager.extent
call_deferred("_spawn_minimum")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _spawn_minimum() -> void:
while _currentCount < minCount:
_spawn_random()
func _random_pos() -> Vector2:
return Vector2(randf_range(spawnRange.position[0], spawnRange.size[0]), randf_range(spawnRange.position[1], spawnRange.size[1]))
func _spawn_random() -> void:
var pos = _random_pos()
_spawn_food(pos)
_currentCount += 1
func _spawn_food(position: Vector2) -> void:
var instance = foodTypes[rng.rand_weighted(foodProbs)].instantiate()
instance.position = position
add_child(instance)
if instance.has_signal("consumed"):
instance.consumed.connect(_on_entity_consumed)
func _on_entity_consumed() -> void:
_currentCount = max(0, _currentCount-1)
call_deferred("_spawn_minimum")

View File

@@ -0,0 +1 @@
uid://7ua0qgyhphao

View File

@@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://cuqw17010qgob"]
[ext_resource type="Script" uid="uid://7ua0qgyhphao" path="res://molecular/food/food_manager.gd" id="1_7iais"]
[node name="FoodManager" type="Node2D" unique_id=858744014]
script = ExtResource("1_7iais")
metadata/_custom_type_script = "uid://7ua0qgyhphao"

View File

@@ -0,0 +1,19 @@
extends AbstractFood
class_name FoodMolecular
func _on_body_entered(body: Node2D) -> void:
eat(body)
func eat(consumer: Node2D) -> void:
print(consumer.name + " ate: ", food_name)
consumed.emit()
apply_effect(consumer)
queue_free()
func apply_effect(consumer: Node2D) -> void:
if consumer.has_method("collect_resource"): # TODO: Define a "consumer" group instead?
consumer.collect_resource(val) # val is from parent (default 1), override if required
# TODO: *Some cool effect here*

View File

@@ -0,0 +1 @@
uid://cayxffay17o0u

View File

@@ -0,0 +1,21 @@
[gd_scene format=3 uid="uid://dmvmu218pc0pe"]
[ext_resource type="Script" uid="uid://cayxffay17o0u" path="res://molecular/food/food_mol.gd" id="1_0vfbj"]
[ext_resource type="Texture2D" uid="uid://dcedkos6vgv51" path="res://molecular/assets/food/food-normal.png" id="2_68e2u"]
[sub_resource type="CircleShape2D" id="CircleShape2D_0vfbj"]
radius = 2.0
[node name="FoodMol" type="Area2D" unique_id=595352294]
collision_layer = 8
collision_mask = 7
script = ExtResource("1_0vfbj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=762721134]
shape = SubResource("CircleShape2D_0vfbj")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=98693723]
scale = Vector2(0.385, 0.385)
texture = ExtResource("2_68e2u")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

Some files were not shown because too many files have changed in this diff Show More