Initial; Added: notes, part.tscn, *.gd glue scripts

This commit is contained in:
2026-03-15 15:51:10 +00:00
commit c3178cc1e2
25 changed files with 315 additions and 0 deletions

4
.editorconfig Normal file
View File

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

2
.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
.gitignore vendored Normal file
View File

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

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "addons/lua-gdextension"]
path = addons/lua-gdextension
url = https://github.com/gilzoide/lua-gdextension

13
assembly.gd Normal file
View File

@@ -0,0 +1,13 @@
# A rigid body
class_name ConAssembly extends Node
@export var root: 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:
pass

1
assembly.gd.uid Normal file
View File

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

22
construct/Part.tscn Normal file
View File

@@ -0,0 +1,22 @@
[gd_scene format=3 uid="uid://8hxdrpjep2v0"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ic8ju"]
size = Vector3(0.4, 0.2, 0.8)
[sub_resource type="BoxMesh" id="BoxMesh_1pepr"]
size = Vector3(0.4, 0.2, 0.8)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_imbph"]
albedo_color = Color(0.41981313, 0.41981313, 0.4198131, 1)
stencil_flags = 2
stencil_outline_thickness = 0.005
[node name="Part" type="RigidBody3D" unique_id=1269041573]
[node name="Collider" type="CollisionShape3D" parent="." unique_id=1104384078]
transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
shape = SubResource("BoxShape3D_ic8ju")
[node name="Mesh" type="MeshInstance3D" parent="." unique_id=1713002208]
mesh = SubResource("BoxMesh_1pepr")
surface_material_override/0 = SubResource("StandardMaterial3D_imbph")

64
construct/main.tscn Normal file
View File

@@ -0,0 +1,64 @@
[gd_scene format=3 uid="uid://xn8b5tekt44y"]
[ext_resource type="Script" uid="uid://bloy37vgtwo5p" path="res://construct/scripts/game.gd" id="1_wgmnp"]
[ext_resource type="Script" uid="uid://ltg0gj54grd0" path="res://construct/scripts/world.gd" id="2_piwts"]
[ext_resource type="Script" uid="uid://bdhw85x3sfbr8" path="res://construct/scripts/storage.gd" id="3_4rhie"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_d51dm"]
sky_top_color = Color(0.32156864, 0.45490196, 0.64705884, 1)
sky_horizon_color = Color(0.5617817, 0.6774191, 0.71705645, 1)
sky_curve = 0.10606603
sky_energy_multiplier = 1.2
ground_bottom_color = Color(0.2239944, 0.33232817, 0.4919958, 1)
ground_horizon_color = Color(0.56078434, 0.6784314, 0.7176471, 1)
ground_curve = 0.10928374
ground_energy_multiplier = 1.2
sun_angle_max = 43.07
sun_curve = 0.19118495
[sub_resource type="Sky" id="Sky_vwgih"]
sky_material = SubResource("ProceduralSkyMaterial_d51dm")
[sub_resource type="Environment" id="Environment_nnel6"]
background_mode = 2
sky = SubResource("Sky_vwgih")
glow_enabled = true
fog_sun_scatter = 0.2
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_koolx"]
[sub_resource type="GDScript" id="GDScript_koolx"]
script/source = "extends Node
# Responsible for executing connected scripts in the game.
class_name ConExecutor
# 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:
pass
func register_script(script: ConScript) -> void:
pass
"
[node name="Game" type="Node3D" unique_id=571143091]
script = ExtResource("1_wgmnp")
[node name="Workspace" type="Node3D" parent="." unique_id=520106173]
script = ExtResource("2_piwts")
[node name="Environment" type="WorldEnvironment" parent="Workspace" unique_id=1958594174]
environment = SubResource("Environment_nnel6")
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="Workspace" unique_id=1628909564]
replication_config = SubResource("SceneReplicationConfig_koolx")
[node name="Storage" type="Node3D" parent="." unique_id=1587339715]
script = ExtResource("3_4rhie")
[node name="Executor" type="Node" parent="." unique_id=202334534]
script = SubResource("GDScript_koolx")

View File

@@ -0,0 +1,54 @@
# Responsible for executing connected scripts in the game.
class_name ConExecutor extends Node
class Event:
# List of functions that are waiting on this event to be called
var listening: Array[LuaFunction]
# List of coroutines that are waiting on this event to be resumed
var waiting: Array[LuaCoroutine]
func _init() -> void:
listening = []
waiting = []
func unlisten(callback: LuaFunction) -> void:
listening.remove_at(listening.find(callback))
func listen(callback: LuaFunction) -> void:
func fire() -> void:
for i in range(listening.size()):
var item = listening[i]
for i in range(waiting.size()):
var item = waiting[i]
var lua: LuaState
func setup() -> void:
lua = LuaState.new()
# Open only the necessary set of libraries
lua.open_libraries(
LuaState.Library.LUA_BASE |
LuaState.Library.LUA_BIT32 |
LuaState.Library.LUA_COROUTINE |
LuaState.Library.LUA_MATH |
LuaState.Library.LUA_STRING |
LuaState.Library.LUA_UTF8 |
LuaState.Library.LUA_TABLE
)
lua.globals.add_user_signal()
func register_script(script: ConScript) -> void:
lua.do_string(script.source)
func callback_loop() -> void:
pass
func _ready() -> void:
setup()
func _process(delta: float) -> void:
callback_loop()

View File

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

10
construct/scripts/game.gd Normal file
View File

@@ -0,0 +1,10 @@
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:
pass

View File

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

View File

@@ -0,0 +1,10 @@
class_name ConInstance extends Node
# 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:
pass

View File

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

View File

@@ -0,0 +1,7 @@
class_name ConScript extends Node
@export var executor: ConExecutor;
@export var source: String;
func _ready() -> void:
executor.register_script(self)

View File

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

View File

@@ -0,0 +1,11 @@
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:
pass

View File

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

View File

@@ -0,0 +1,10 @@
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:
pass

View File

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

1
icon.svg Normal file
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

43
icon.svg.import Normal file
View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3xxykeq0m65c"
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

21
notes.txt Normal file
View File

@@ -0,0 +1,21 @@
Thoughts on the API:
It needs to satisfy the following:
- Being mostly backwards compatible with the old roblox code, maybe using an _ to translate? Also very automatic in nature, networking should just work.
- Being 'forwards' compatible with a potential bevy implementation. so all 'objects' need to be fully abstracted. anyways. Being kind to a nellie style implementation. So lots of OOP and abstraction as above.
- Allowing access to a lot of weird stuff we didn't have before. (consider the mesh systems) which also means we will need access to some 'services' (that we can expose again through _G so it swings both ways...)
Maybe it would make more sense to have a sort of ID or name for every single type of thing in the
api, or 'scene'. That is quite weird, though it would mean that vehicle objects and their
properties could also be encoded. Maybe if each vehicle object was a sort of 'package' idk.
Although the game code does trace through objects.
Part(){
}
Accessory Ideas!:
- Different body types: floating limbs
- Dunce hat
- Wizard outfit
- Long coat outfit
- Combinable faces

29
project.godot Normal file
View File

@@ -0,0 +1,29 @@
; 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="construct"
config/features=PackedStringArray("4.6", "GL Compatibility")
config/icon="res://icon.svg"
[editor_plugins]
enabled=PackedStringArray("res://addons/lua-gdextension/plugin.cfg")
[physics]
3d/physics_engine="Jolt Physics"
[rendering]
rendering_device/driver.windows="d3d12"
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"