├── net-pong ├── godot │ ├── screenshots │ │ ├── .gdignore │ │ └── pong_multiplayer.png │ ├── rust.gdextension.uid │ ├── .gitignore │ ├── ball.png │ ├── icon.webp │ ├── paddle.png │ ├── godot-rust.png │ ├── separator.png │ ├── ball.tscn │ ├── README.md │ ├── rust.gdextension │ ├── paddle.tscn │ ├── project.godot │ ├── pong.tscn │ └── lobby.tscn ├── rust │ ├── .gitignore │ ├── src │ │ ├── lib.rs │ │ ├── paddle.rs │ │ ├── pong.rs │ │ ├── ball.rs │ │ └── lobby.rs │ └── Cargo.toml ├── LICENSE └── README.md ├── squash-the-creeps ├── rust │ ├── .gitignore │ ├── src │ │ ├── lib.rs │ │ ├── scorelabel.rs │ │ ├── mob.rs │ │ ├── main_scene.rs │ │ └── player.rs │ ├── Cargo.toml │ ├── .cargo │ │ └── cargo.toml │ └── build-wasm.sh └── godot │ ├── rust.gdextension.uid │ ├── .godot │ └── extension_list.cfg │ ├── default_bus_layout.tres │ ├── icon.png │ ├── art │ ├── mob.glb │ ├── player.glb │ ├── body.material │ ├── eye.material │ ├── mob_eye.material │ ├── pupil.material │ ├── mob_body.material │ └── House In a Forest Loop.ogg │ ├── fonts │ ├── Montserrat-Medium.ttf │ └── LICENSE.txt │ ├── default_env.tres │ ├── music_player.tscn │ ├── rust.gdextension │ ├── mob.tscn │ ├── player.tscn │ ├── project.godot │ └── main.tscn ├── hot-reload ├── godot │ ├── rust.gdextension.uid │ ├── .godot │ │ └── extension_list.cfg │ ├── MainScene.tscn │ ├── project.godot │ └── rust.gdextension └── rust │ ├── Cargo.toml │ └── src │ └── lib.rs ├── dodge-the-creeps ├── godot │ ├── rust.gdextension.uid │ ├── .godot │ │ └── extension_list.cfg │ ├── icon.png │ ├── art │ │ ├── gameover.wav │ │ ├── enemySwimming_1.png │ │ ├── enemySwimming_2.png │ │ ├── enemyWalking_1.png │ │ ├── enemyWalking_2.png │ │ ├── playerGrey_up1.png │ │ ├── playerGrey_up2.png │ │ ├── enemyFlyingAlt_1.png │ │ ├── enemyFlyingAlt_2.png │ │ ├── playerGrey_walk1.png │ │ ├── playerGrey_walk2.png │ │ └── House In a Forest Loop.ogg │ ├── fonts │ │ ├── Xolonium-Regular.ttf │ │ ├── LICENSE.txt │ │ └── FONTLOG.txt │ ├── rust.gdextension │ ├── LICENSE │ ├── export_presets.cfg │ ├── README.md │ ├── Main.tscn │ ├── Hud.tscn │ ├── Mob.tscn │ ├── Player.tscn │ └── project.godot └── rust │ ├── Cargo.toml │ ├── src │ ├── lib.rs │ ├── mob.rs │ ├── hud.rs │ ├── player.rs │ └── main_scene.rs │ ├── .cargo │ └── config.toml │ └── build-wasm.sh ├── .gitignore ├── Cargo.toml ├── .github ├── FUNDING.yml ├── other │ ├── retry.sh │ ├── patch-prebuilt.sh │ ├── licenserc.yml │ ├── check-example.sh │ └── deny.toml ├── composite │ ├── godot-install │ │ └── action.yml │ ├── llvm │ │ └── action.yml │ ├── rust │ │ └── action.yml │ └── godot-itest │ │ └── action.yml └── workflows │ └── ci.yml ├── ReadMe.md └── License.txt /net-pong/godot/screenshots/.gdignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /net-pong/rust/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /squash-the-creeps/rust/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /emsdk -------------------------------------------------------------------------------- /hot-reload/godot/rust.gdextension.uid: -------------------------------------------------------------------------------- 1 | uid://dej805dvfs007 2 | -------------------------------------------------------------------------------- /net-pong/godot/rust.gdextension.uid: -------------------------------------------------------------------------------- 1 | uid://dsxaqyvttsnfo 2 | -------------------------------------------------------------------------------- /dodge-the-creeps/godot/rust.gdextension.uid: -------------------------------------------------------------------------------- 1 | uid://dj8rknhq4uvv 2 | -------------------------------------------------------------------------------- /squash-the-creeps/godot/rust.gdextension.uid: -------------------------------------------------------------------------------- 1 | uid://btqaumkweydgr 2 | -------------------------------------------------------------------------------- /hot-reload/godot/.godot/extension_list.cfg: -------------------------------------------------------------------------------- 1 | res://rust.gdextension 2 | -------------------------------------------------------------------------------- /dodge-the-creeps/godot/.godot/extension_list.cfg: -------------------------------------------------------------------------------- 1 | res://rust.gdextension 2 | -------------------------------------------------------------------------------- /squash-the-creeps/godot/.godot/extension_list.cfg: -------------------------------------------------------------------------------- 1 | res://rust.gdextension 2 | -------------------------------------------------------------------------------- /net-pong/godot/.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | /android/ 4 | -------------------------------------------------------------------------------- /net-pong/godot/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/ball.png -------------------------------------------------------------------------------- /net-pong/godot/icon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/icon.webp -------------------------------------------------------------------------------- /net-pong/godot/paddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/paddle.png -------------------------------------------------------------------------------- /net-pong/godot/godot-rust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/godot-rust.png -------------------------------------------------------------------------------- /net-pong/godot/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/separator.png -------------------------------------------------------------------------------- /squash-the-creeps/godot/default_bus_layout.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="AudioBusLayout" format=2] 2 | 3 | [resource] 4 | -------------------------------------------------------------------------------- /dodge-the-creeps/godot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/icon.png -------------------------------------------------------------------------------- /squash-the-creeps/godot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/icon.png -------------------------------------------------------------------------------- /hot-reload/godot/MainScene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://da7eiv1notj7j"] 2 | 3 | [node name="Reloadable" type="Reloadable"] 4 | -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/mob.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/mob.glb -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/gameover.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/gameover.wav -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/player.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/player.glb -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/body.material: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/body.material -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/eye.material: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/eye.material -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/mob_eye.material: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/mob_eye.material -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/pupil.material: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/pupil.material -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemySwimming_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemySwimming_1.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemySwimming_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemySwimming_2.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemyWalking_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemyWalking_1.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemyWalking_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemyWalking_2.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/playerGrey_up1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/playerGrey_up1.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/playerGrey_up2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/playerGrey_up2.png -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/mob_body.material: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/mob_body.material -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemyFlyingAlt_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemyFlyingAlt_1.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/enemyFlyingAlt_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/enemyFlyingAlt_2.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/playerGrey_walk1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/playerGrey_walk1.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/playerGrey_walk2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/playerGrey_walk2.png -------------------------------------------------------------------------------- /dodge-the-creeps/godot/fonts/Xolonium-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/fonts/Xolonium-Regular.ttf -------------------------------------------------------------------------------- /net-pong/godot/screenshots/pong_multiplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/net-pong/godot/screenshots/pong_multiplayer.png -------------------------------------------------------------------------------- /squash-the-creeps/godot/fonts/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/fonts/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /dodge-the-creeps/godot/art/House In a Forest Loop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/dodge-the-creeps/godot/art/House In a Forest Loop.ogg -------------------------------------------------------------------------------- /squash-the-creeps/godot/art/House In a Forest Loop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godot-rust/demo-projects/HEAD/squash-the-creeps/godot/art/House In a Forest Loop.ogg -------------------------------------------------------------------------------- /squash-the-creeps/godot/default_env.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Environment" format=2] 2 | 3 | [resource] 4 | ambient_light_color = Color( 0.341176, 0.341176, 0.466667, 1 ) 5 | -------------------------------------------------------------------------------- /net-pong/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | use godot::prelude::*; 2 | 3 | struct RustExtension; 4 | 5 | #[gdextension] 6 | unsafe impl ExtensionLibrary for RustExtension {} 7 | 8 | mod ball; 9 | mod lobby; 10 | mod paddle; 11 | mod pong; 12 | -------------------------------------------------------------------------------- /squash-the-creeps/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod main_scene; 2 | mod mob; 3 | mod player; 4 | mod scorelabel; 5 | use godot::prelude::*; 6 | 7 | struct SquashTheCreeps; 8 | 9 | #[gdextension] 10 | unsafe impl ExtensionLibrary for SquashTheCreeps {} 11 | -------------------------------------------------------------------------------- /squash-the-creeps/godot/music_player.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bjvmnxjbg7sfm"] 2 | 3 | [ext_resource type="AudioStream" uid="uid://de3ihy6kdsw2x" path="res://art/House In a Forest Loop.ogg" id="1_fvyft"] 4 | 5 | [node name="MusicPlayer" type="AudioStreamPlayer"] 6 | stream = ExtResource("1_fvyft") 7 | autoplay = true 8 | -------------------------------------------------------------------------------- /net-pong/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "net-pong" 3 | version = "1.0.0" 4 | edition = "2024" 5 | rust-version = "1.90" 6 | license = "MPL-2.0" 7 | publish = false 8 | 9 | [dependencies] 10 | godot = {git = "https://github.com/godot-rust/gdext.git", features = ["register-docs"]} 11 | 12 | [lib] 13 | crate-type = ["cdylib"] # Compile this crate to a dynamic C library. 14 | -------------------------------------------------------------------------------- /hot-reload/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hot-reload" 3 | version = "0.1.0" 4 | edition = "2021" 5 | rust-version = "1.90" 6 | license = "MPL-2.0" 7 | publish = false 8 | 9 | [lib] 10 | crate-type = ["cdylib"] 11 | 12 | [dependencies.godot] 13 | git = "https://github.com/godot-rust/gdext.git" 14 | features = ["register-docs"] # Registers RustDoc comments, so they appear in editor docs. 15 | -------------------------------------------------------------------------------- /net-pong/godot/ball.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://bjmldn1x3lpa"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://i1imfdcn7ui" path="res://ball.png" id="2"] 4 | 5 | [sub_resource type="CircleShape2D" id="1"] 6 | radius = 5.11969 7 | 8 | [node name="Ball" type="Ball"] 9 | 10 | [node name="Sprite2D" type="Sprite2D" parent="."] 11 | texture = ExtResource("2") 12 | 13 | [node name="Shape3D" type="CollisionShape2D" parent="."] 14 | shape = SubResource("1") 15 | -------------------------------------------------------------------------------- /dodge-the-creeps/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dodge-the-creeps" 3 | version = "0.1.0" 4 | edition = "2021" 5 | rust-version = "1.90" 6 | license = "MPL-2.0" 7 | publish = false 8 | 9 | [lib] 10 | crate-type = ["cdylib"] 11 | 12 | [dependencies] 13 | rand = "0.8" 14 | godot = { git = "https://github.com/godot-rust/gdext.git", features = ["register-docs"]} 15 | # For Wasm, feature "experimental-wasm" can be added, but this is already done in build-wasm.sh script. 16 | 17 | -------------------------------------------------------------------------------- /hot-reload/godot/project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=5 10 | 11 | [application] 12 | 13 | config/name="hot-reload" 14 | run/main_scene="uid://da7eiv1notj7j" 15 | config/features=PackedStringArray("4.5", "Forward Plus") 16 | -------------------------------------------------------------------------------- /squash-the-creeps/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "squash-the-creeps" 3 | version = "0.1.0" 4 | edition = "2021" 5 | rust-version = "1.90" 6 | license = "MPL-2.0" 7 | publish = false 8 | 9 | [lib] 10 | crate-type = ["cdylib"] 11 | 12 | [dependencies] 13 | rand = "0.9.0" 14 | godot = { git = "https://github.com/godot-rust/gdext.git", branch = "master", features = ["register-docs"]} 15 | # For Wasm, feature "experimental-wasm" can be added, but this is already done in build-wasm.sh script. 16 | -------------------------------------------------------------------------------- /dodge-the-creeps/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) godot-rust; Bromeon and contributors. 3 | * This Source Code Form is subject to the terms of the Mozilla Public 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this 5 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 6 | */ 7 | 8 | use godot::prelude::*; 9 | 10 | mod hud; 11 | mod main_scene; 12 | mod mob; 13 | mod player; 14 | 15 | struct DodgeTheCreeps; 16 | 17 | #[gdextension] 18 | unsafe impl ExtensionLibrary for DodgeTheCreeps {} 19 | -------------------------------------------------------------------------------- /squash-the-creeps/rust/src/scorelabel.rs: -------------------------------------------------------------------------------- 1 | use godot::classes::{Control, Label}; 2 | use godot::prelude::*; 3 | 4 | #[derive(GodotClass)] 5 | #[class(init, base=Control)] 6 | pub struct UserInterface { 7 | score: u32, 8 | base: Base, 9 | } 10 | 11 | #[godot_api] 12 | impl UserInterface { 13 | #[func] 14 | pub fn on_mob_squashed(&mut self) { 15 | self.score += 1; 16 | 17 | let mut label = self.base().get_node_as::