modification du sprite du robot et fix en tout genre

This commit is contained in:
2026-02-22 17:26:00 +01:00
parent e92d350dad
commit 58fcdc9111
16 changed files with 326 additions and 104 deletions

View File

@@ -11,12 +11,12 @@ demeter: I found you a new body, and a new ship is waiting you outside, but I'm
demeter: Do you need some advices ? #id:26
- No I'm ok ! #id:27
- Can I have back some explanations on how all of this works ? #id:28
demeter: When you emerge from this building, you'll arrive in a little yellow zone. Its a [b]fertile zone[/b], created by the return of the Talion. This is in this zone and only there were you can plant. #id:29
demeter: When you emerge from this building, you'll arrive in a little yellow zone. Its a [b]fertile zone[/b], created by the return of the Talion. This is in this zone and only there where you can plant. #id:29
demeter: Then you'll have to get seeds. For that, nothing more simple, you take your shovel tool, and you smash some stones ! Preferably those with yellow cristals on it, it's the [b]Talion veins[/b] . #id:2a
demeter: Each time you use a tool or plant a seed, you'll spend an [b]energy[/b]. When your out of it, you can just go recharge on the [b]recharge station[/b] you'll find near the entrance. Each time you recharge, time will pass. One day in fact (yes, you don't have a good battery), and the plants will grow ! #id:2b
demeter: You have to obtain enough [b]plant points[/b]. Each plant give one or more [b]plant points[/b] when mature. #id:2c
demeter: And yes, I almost forgot ! Some plants gain [b]mutations[/b] that can affect their points or behavior. You can get these mutations on new seeds by harvesting, and gain better ones ! But you'll have to wait the plants to die, or smashing them with your shovel when mature. #id:2d
demeter: Hope I helped ! #id:2e
demeter: I send you the elevator, see you soon ! #id:2f
demeter: I sent you the elevator, see you soon ! #id:2f
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]

View File

@@ -24,7 +24,7 @@ demeter: Humans had one big problem. Together, they built great things, but some
demeter: I prefer not talk about that for now... But don't worry, they can't wound this planet anymore. #id:75
- What happened ? #id:76
demeter: Sorry my child, I'm not ready to talk about that for now... You'll have your answers when you meet me. #id:77
- Can I now what is this shiny engine just in front of me ? #id:78
- Can I know what is this shiny engine just in front of me ? #id:78
demeter: This machine in front of you is a planetary ship ! The model's name is the [color=#FFA617]Internode[/color], and I tweaked it to recharge on vegetal energy ! However, as you may know, this energy isn't very present around this planet. But let's continue on board, shall we ? #id:79
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]

View File

@@ -1,48 +0,0 @@
@tool
extends Node2D
@export var color_1_texture : Texture
@export var color_2_texture : Texture
@export var outline_texture : Texture
@export_tool_button("Redraw", "Callable") var redraw_action = func(): create_image()
func _ready():
create_image()
func create_image():
var image := Image.create(TEXTURE_SIZE,TEXTURE_SIZE, false, Image.FORMAT_RGBA8)
if color_2_texture:
var color_2_image = color_2_texture.get_image()
color_2_image.resize(TEXTURE_SIZE,TEXTURE_SIZE)
image.blend_rect(
modulated_image(color_2_image, COLOR_PALETTE.pick_random()),
Rect2i(0,0,TEXTURE_SIZE,TEXTURE_SIZE),
Vector2i.ZERO
)
if color_1_texture:
var color_1_image = color_1_texture.get_image()
color_1_image.resize(TEXTURE_SIZE,TEXTURE_SIZE)
image.blend_rect(
modulated_image(color_1_image, COLOR_PALETTE.pick_random()),
Rect2i(0,0,TEXTURE_SIZE,TEXTURE_SIZE),
Vector2i.ZERO
)
if outline_texture:
var outline_image = outline_texture.get_image()
outline_image.resize(TEXTURE_SIZE,TEXTURE_SIZE)
image.blend_rect(outline_image, Rect2i(0,0,TEXTURE_SIZE,TEXTURE_SIZE),Vector2i.ZERO)
ImageTexture.create_from_image(image)
func modulated_image(i : Image, color : Color) -> Image:
var ret = i.duplicate()
for x in i.get_size().x:
for y in i.get_size().y:
ret.set_pixel(x,y, i.get_pixel(x,y)*color)
return ret

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dompaj451gklw"
path="res://.godot/imported/movement_particles.png-73ae8918518d662da464b8dc83b128a2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/player/assets/sprites/movement_particles.png"
dest_files=["res://.godot/imported/movement_particles.png-73ae8918518d662da464b8dc83b128a2.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.

Before

Width:  |  Height:  |  Size: 850 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ys5fis3gsnoy"
path="res://.godot/imported/shadow.png-2953b62e89f155ac07f4529236b51b5f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/player/assets/sprites/shadow.png"
dest_files=["res://.godot/imported/shadow.png-2953b62e89f155ac07f4529236b51b5f.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

@@ -1,8 +1,9 @@
[gd_scene load_steps=8 format=3 uid="uid://bgvbgeq46wee2"]
[gd_scene format=3 uid="uid://bgvbgeq46wee2"]
[ext_resource type="Script" uid="uid://das7twcy5153p" path="res://entities/player/scripts/player.gd" id="1_abrql"]
[ext_resource type="Texture2D" uid="uid://c7ff87jniga5m" path="res://entities/player/assets/sprites/robot.png" id="1_symyc"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/icons/shovel.svg" id="3_yqrof"]
[ext_resource type="Texture2D" uid="uid://dompaj451gklw" path="res://entities/player/assets/sprites/movement_particles.png" id="2_bls4j"]
[ext_resource type="Texture2D" uid="uid://ys5fis3gsnoy" path="res://entities/player/assets/sprites/shadow.png" id="2_fkugw"]
[ext_resource type="Texture2D" uid="uid://c7ff87jniga5m" path="res://entities/player/assets/sprites/robot.png" id="4_bls4j"]
[sub_resource type="CircleShape2D" id="CircleShape2D_sglur"]
radius = 27.0
@@ -10,44 +11,156 @@ radius = 27.0
[sub_resource type="CircleShape2D" id="CircleShape2D_abrql"]
radius = 40.0
[sub_resource type="Gradient" id="Gradient_yqrof"]
colors = PackedColorArray(0.145098, 0.423529, 0.635294, 1, 0.12549, 0.294118, 0.545098, 1)
[sub_resource type="Curve" id="Curve_fkugw"]
_data = [Vector2(0, 0.14473677), 0.0, 0.0, 0, 0, Vector2(0.972549, 0.2654798), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="GradientTexture2D" id="GradientTexture2D_3wlsy"]
gradient = SubResource("Gradient_yqrof")
fill = 1
fill_from = Vector2(0.5, 0.380342)
fill_to = Vector2(1, 0.0726496)
[sub_resource type="Gradient" id="Gradient_bls4j"]
offsets = PackedFloat32Array(0, 0.77729255, 1)
colors = PackedColorArray(0.5803922, 0.7058824, 0.8862745, 1, 0.5785, 0.70829165, 0.89, 1, 0.5785, 0.70829165, 0.89, 0)
[node name="Player" type="CharacterBody2D"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fkugw"]
atlas = ExtResource("4_bls4j")
region = Rect2(3048, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_8fjmc"]
atlas = ExtResource("4_bls4j")
region = Rect2(3810, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_qiwj3"]
atlas = ExtResource("4_bls4j")
region = Rect2(2286, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_26q78"]
atlas = ExtResource("4_bls4j")
region = Rect2(0, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_bectd"]
atlas = ExtResource("4_bls4j")
region = Rect2(5334, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_wvtmh"]
atlas = ExtResource("4_bls4j")
region = Rect2(762, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_7thud"]
atlas = ExtResource("4_bls4j")
region = Rect2(4572, 0, 762, 1080)
[sub_resource type="AtlasTexture" id="AtlasTexture_a1qjk"]
atlas = ExtResource("4_bls4j")
region = Rect2(1524, 0, 762, 1080)
[sub_resource type="SpriteFrames" id="SpriteFrames_a1qjk"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fkugw")
}],
"loop": true,
"name": &"back",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8fjmc")
}],
"loop": true,
"name": &"back_left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qiwj3")
}],
"loop": true,
"name": &"back_right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_26q78")
}],
"loop": true,
"name": &"front",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_bectd")
}],
"loop": true,
"name": &"front_left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wvtmh")
}],
"loop": true,
"name": &"front_right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_7thud")
}],
"loop": true,
"name": &"left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_a1qjk")
}],
"loop": true,
"name": &"right",
"speed": 5.0
}]
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_bls4j"]
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_fkugw"]
states/StateMachine/node = SubResource("AnimationNodeStateMachine_bls4j")
states/StateMachine/position = Vector2(386, 91)
[node name="Player" type="CharacterBody2D" unique_id=447849413]
script = ExtResource("1_abrql")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-2, -18)
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=414557251]
position = Vector2(0, -17)
shape = SubResource("CircleShape2D_sglur")
[node name="InteractArea2D" type="Area2D" parent="."]
[node name="Shadow" type="Sprite2D" parent="." unique_id=875064259]
modulate = Color(0, 0, 0, 0.60784316)
position = Vector2(-1, 13)
scale = Vector2(0.35897446, 0.3589744)
texture = ExtResource("2_fkugw")
[node name="InteractArea2D" type="Area2D" parent="." unique_id=1048722411]
position = Vector2(0, -12)
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea2D" unique_id=1242017003]
shape = SubResource("CircleShape2D_abrql")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(0, -46)
scale = Vector2(0.08, 0.08)
texture = ExtResource("1_symyc")
[node name="CPUParticles2D" type="CPUParticles2D" parent="InteractArea2D" unique_id=1489736082]
position = Vector2(-8.4703295e-22, 12)
scale = Vector2(0.22803418, 0.22803418)
amount = 3
texture = ExtResource("2_bls4j")
lifetime = 0.4
gravity = Vector2(0, 100)
scale_amount_curve = SubResource("Curve_fkugw")
color_ramp = SubResource("Gradient_bls4j")
[node name="HideEyes" type="Sprite2D" parent="."]
[node name="Sprite" type="AnimatedSprite2D" parent="." unique_id=638545037]
unique_name_in_owner = true
visible = false
position = Vector2(8.125, -26.195)
scale = Vector2(0.347656, 0.253906)
texture = SubResource("GradientTexture2D_3wlsy")
position = Vector2(0.99999994, -17)
scale = Vector2(0.0656168, 0.065616846)
sprite_frames = SubResource("SpriteFrames_a1qjk")
animation = &"back"
[node name="ItemSprite" type="Sprite2D" parent="."]
unique_name_in_owner = true
visible = false
modulate = Color(0.164706, 0.898039, 0.984314, 1)
position = Vector2(8.25, -27.32)
scale = Vector2(0.403333, 0.403333)
texture = ExtResource("3_yqrof")
[node name="FloatAnimationPlayer" type="AnimationPlayer" parent="." unique_id=929823261]
[node name="AnimationTree" type="AnimationTree" parent="." unique_id=563415659]
tree_root = SubResource("AnimationNodeStateMachine_fkugw")

View File

@@ -4,6 +4,7 @@ class_name Player
const ACTION_AREA_UPDATE_TIME=0.05 # When creating an action_zone, we make sure that the area setup correctly by waiting a little
const MAX_REACH = 100
const HOLDING_ITEM_SPRITE_SIZE = 20.
const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2
signal player_updated(player: Player)
signal upgraded
@@ -73,19 +74,8 @@ func _process(delta):
func _on_inventory_updated(_inventory: Inventory):
setup_preview_zone(data.inventory.get_item())
var item : Item = data.inventory.get_item()
if item:
var item_texture = item.icon
%ItemSprite.texture = item_texture
%ItemSprite.scale = Vector2(
1./(item_texture.get_width()/HOLDING_ITEM_SPRITE_SIZE),
1./(item_texture.get_height()/HOLDING_ITEM_SPRITE_SIZE)
)
%HideEyes.visible = item != null
%ItemSprite.visible = item != null
emit_signal("player_updated", self)
func calculate_direction():
var input_direction: Vector2 = Input.get_vector("move_left", "move_right", "move_up", "move_down")
@@ -102,14 +92,32 @@ func calculate_direction():
input_direction = self.global_position.direction_to(instruction.position)
velocity = input_direction * speed
if input_direction.x:
flip_character(input_direction.x > 0)
turn_animate(input_direction)
func flip_character(face_right = true):
$Sprite.flip_h = not face_right
%ItemSprite.position.x = abs(%ItemSprite.position.x) * (1 if face_right else -1)
%HideEyes.position.x = abs(%ItemSprite.position.x) * (1 if face_right else -1)
func turn_animate(input_direction):
if input_direction.x > TURN_ANIMATION_MINIMUM_THRESHOLD:
if input_direction.y > TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("front_right")
elif input_direction.y < -TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("back_right")
else:
%Sprite.play("right")
elif input_direction.x < -TURN_ANIMATION_MINIMUM_THRESHOLD:
if input_direction.y > TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("front_left")
elif input_direction.y < -TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("back_left")
else:
%Sprite.play("left")
else:
if input_direction.y > TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("front")
elif input_direction.y < -TURN_ANIMATION_MINIMUM_THRESHOLD:
%Sprite.play("back")
else:
%Sprite.play("front")
func can_interact(interactable : Interactable):
return interactable.can_interact(self)

View File

@@ -22,8 +22,9 @@ layer = 99
[node name="ColorRect" type="ColorRect" parent="." unique_id=2001966466]
material = SubResource("ShaderMaterial_67c4d")
offset_right = 1152.0
offset_bottom = 648.0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)

Binary file not shown.

View File

@@ -0,0 +1,60 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://oktd71knql00"
path="res://.godot/imported/item_screen.blend-680308346425c8f7362481f314c364d4.scn"
[deps]
source_file="res://gui/game/inventory_gui/assets/3d/item_screen.blend"
dest_files=["res://.godot/imported/item_screen.blend-680308346425c8f7362481f314c364d4.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
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=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
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={}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

View File

@@ -35,6 +35,7 @@ Pause="*res://gui/pause/pause.tscn"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
LoadingScreen="*res://gui/loading_screen/loading_screen.tscn"
SceneManager="*res://common/scene_manager/scene_manager.tscn"
SteamConnection="*uid://bq12bubjof2mo"
[dialogic]
@@ -45,6 +46,7 @@ directories/dch_directory={
directories/dtl_directory={
"demeter_astra_failed": "res://dialogs/timelines/gameplay_related/demeter_astra_failed.dtl",
"demeter_intro": "res://dialogs/timelines/story/demeter_intro.dtl",
"demeter_introV2": "res://dialogs/timelines/story/demeter_introV2.dtl",
"demeter_midrun": "res://dialogs/timelines/story/demeter_post_tutorial.dtl",
"demeter_outro": "res://dialogs/timelines/story/demeter_outro.dtl",
"demeter_ship_presentation": "res://dialogs/timelines/story/demeter_ship_presentation.dtl",
@@ -237,3 +239,10 @@ locale/test="fr"
[rendering]
environment/defaults/default_clear_color=Color(0.0617213, 0.0605653, 0.169189, 1)
[steam]
initialization/app_id=0
initialization/initialize_on_startup=false
initialization/embed_callbacks=false
multiplayer_peer/max_channels=4

View File

@@ -13,10 +13,10 @@ func _ready():
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
%Credits.show()
AudioManager.play_music("Title")
AudioManager.stop_ambiance()
AudioManager.stop_all_ambiances()
func _on_ambiance_change_detector_body_entered(body: Node3D):
if body is Player3D:
AudioManager.stop_ambiance()
AudioManager.stop_all_ambiances()
AudioManager.play_music("Title")