diff --git a/splunk/addons/godotsteam/godotsteam.gdextension b/splunk/addons/godotsteam/godotsteam.gdextension new file mode 100644 index 0000000..5917bed --- /dev/null +++ b/splunk/addons/godotsteam/godotsteam.gdextension @@ -0,0 +1,22 @@ +[configuration] +entry_symbol = "godotsteam_init" +compatibility_minimum = "4.4" + +[libraries] +macos.debug = "res://addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework" +macos.release = "res://addons/godotsteam/osx/libgodotsteam.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll" +windows.debug.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll" +windows.release.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll" +windows.release.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll" +linux.debug.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so" +linux.debug.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so" +linux.release.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so" +linux.release.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so" + +[dependencies] +macos.universal = { "res://addons/godotsteam/osx/libsteam_api.dylib": "" } +windows.x86_64 = { "res://addons/godotsteam/win64/steam_api64.dll": "" } +windows.x86_32 = { "res://addons/godotsteam/win32/steam_api.dll": "" } +linux.x86_64 = { "res://addons/godotsteam/linux64/libsteam_api.so": "" } +linux.x86_32 = { "res://addons/godotsteam/linux32/libsteam_api.so": "" } diff --git a/splunk/addons/godotsteam/godotsteam.gdextension.uid b/splunk/addons/godotsteam/godotsteam.gdextension.uid new file mode 100644 index 0000000..4a2ed87 --- /dev/null +++ b/splunk/addons/godotsteam/godotsteam.gdextension.uid @@ -0,0 +1 @@ +uid://b3p0yh6q3ajpd diff --git a/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so b/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so new file mode 100644 index 0000000..00be7c5 Binary files /dev/null and b/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so differ diff --git a/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so b/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so new file mode 100644 index 0000000..658694b Binary files /dev/null and b/splunk/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so differ diff --git a/splunk/addons/godotsteam/linux32/libsteam_api.so b/splunk/addons/godotsteam/linux32/libsteam_api.so new file mode 100644 index 0000000..2d9e8a7 Binary files /dev/null and b/splunk/addons/godotsteam/linux32/libsteam_api.so differ diff --git a/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so b/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so new file mode 100644 index 0000000..045b00d Binary files /dev/null and b/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so differ diff --git a/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so b/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so new file mode 100644 index 0000000..b273ec7 Binary files /dev/null and b/splunk/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so differ diff --git a/splunk/addons/godotsteam/linux64/libsteam_api.so b/splunk/addons/godotsteam/linux64/libsteam_api.so new file mode 100644 index 0000000..8783570 Binary files /dev/null and b/splunk/addons/godotsteam/linux64/libsteam_api.so differ diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist new file mode 100644 index 0000000..68caf2b --- /dev/null +++ b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgodotsteam.debug + CFBundleIdentifier + org.godotsteam.godotsteam + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgodotsteam.debug + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.15 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 4.15 + LSMinimumSystemVersion + 10.12 + + \ No newline at end of file diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug new file mode 100644 index 0000000..8a8b2b7 Binary files /dev/null and b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug differ diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib new file mode 100644 index 0000000..c493b2b Binary files /dev/null and b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib differ diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist new file mode 100644 index 0000000..e3e8dac --- /dev/null +++ b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgodotsteam + CFBundleIdentifier + org.godotsteam.godotsteam + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgodotsteam + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.15 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 4.15 + LSMinimumSystemVersion + 10.12 + + \ No newline at end of file diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release new file mode 100644 index 0000000..ce91b3e Binary files /dev/null and b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release differ diff --git a/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib new file mode 100644 index 0000000..c493b2b Binary files /dev/null and b/splunk/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib differ diff --git a/splunk/addons/godotsteam/osx/libsteam_api.dylib b/splunk/addons/godotsteam/osx/libsteam_api.dylib new file mode 100644 index 0000000..c493b2b Binary files /dev/null and b/splunk/addons/godotsteam/osx/libsteam_api.dylib differ diff --git a/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll b/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll new file mode 100644 index 0000000..cebcc9b Binary files /dev/null and b/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll differ diff --git a/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll b/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll new file mode 100644 index 0000000..21c3a1e Binary files /dev/null and b/splunk/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll differ diff --git a/splunk/addons/godotsteam/win32/steam_api.dll b/splunk/addons/godotsteam/win32/steam_api.dll new file mode 100644 index 0000000..2372ab1 Binary files /dev/null and b/splunk/addons/godotsteam/win32/steam_api.dll differ diff --git a/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll b/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll new file mode 100644 index 0000000..3d02848 Binary files /dev/null and b/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll differ diff --git a/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll b/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll new file mode 100644 index 0000000..6bb49b3 Binary files /dev/null and b/splunk/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll differ diff --git a/splunk/addons/godotsteam/win64/steam_api64.dll b/splunk/addons/godotsteam/win64/steam_api64.dll new file mode 100644 index 0000000..6d11825 Binary files /dev/null and b/splunk/addons/godotsteam/win64/steam_api64.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/.gitignore b/splunk/addons/steam-multiplayer-peer/.gitignore new file mode 100644 index 0000000..9581441 --- /dev/null +++ b/splunk/addons/steam-multiplayer-peer/.gitignore @@ -0,0 +1 @@ +~*.dll \ No newline at end of file diff --git a/splunk/addons/steam-multiplayer-peer/LICENSE b/splunk/addons/steam-multiplayer-peer/LICENSE new file mode 100644 index 0000000..0cefe81 --- /dev/null +++ b/splunk/addons/steam-multiplayer-peer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Expresso Bits + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/splunk/addons/steam-multiplayer-peer/README.md b/splunk/addons/steam-multiplayer-peer/README.md new file mode 100644 index 0000000..cbaf359 --- /dev/null +++ b/splunk/addons/steam-multiplayer-peer/README.md @@ -0,0 +1,87 @@ +# β€œicon” Welcome to Expresso Steam Multiplayer Peer πŸ‘‹ +![Version](https://img.shields.io/badge/version-0.2.0-blue.svg?cacheSeconds=2592000) +[![Documentation](https://img.shields.io/badge/documentation-no-red.svg)](todo-doc) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](MIT) + +See demos in: +Github: [Branch demos](https://github.com/expressobits/steam-multiplayer-peer/tree/demos) +Godot Asset Lib: https://godotengine.org/asset-library/asset/2258 + +## Tutorial and Learnings (How to use) + +See post of Michael Macha +https://michaelmacha.wordpress.com/2024/04/08/godotsteam-and-steammultiplayerpeer/ + +See too on youtube videos +https://www.youtube.com/playlist?list=PLg_8mgEWE2p8ZA-AqUUJ3CYEtrRVFhl_v + +Thank you Michael! + +## Features + +βœ”οΈ Change easy Enet peer to Steam Peer + +βœ”οΈ Use Steam Sockets (Low level like enet). + +βœ”οΈ GDExtension (Easy to add your project) + +βœ”οΈ No dependency with GodotSteam, but demo use GodotSteam to handle connections with lobbies (See lobbies tutorial in Godot Steam [here](https://godotsteam.com/tutorials/lobbies/)). + + +## GodotSteam SteamMultiplayerPeer Differences + +| Differences | This SteamMultiplayerPeer | GodotSteam SteamMultiplayerPeer | +|---|---|---| +| Lib Type | GDExtension, add on your project libs to use easy. | C++ module, you need to use the precompiled
ones from godotsteam or compile it yourself | +| Steam Connection | Steam Sockets [Steam Docs](https://partner.steamgames.com/doc/api/ISteamNetworkingSockets)
Steam's lowest connection level,
manages a connection
(It's very close to Enet,
that's why I chose this approach for the plugin) | Steam Messages [Steam Docs](https://partner.steamgames.com/doc/api/ISteamNetworkingMessages)
Without a connection idea,
the connection is managed by the lobby,
Need Steam lobbies. | +| TODO | | | + +## Known issues + +⚠️ Features No channel support currently +At some point I intend to integrate channels to be used in rpcs commands, but currently it is only necessary to use channel 0 or the default rpcs. + +## In Progress + +πŸ”¨ Bugs fixes + +## Planneds + +πŸ“… No planned features. + + + +## Authors + +πŸ‘€ **Rafael Correa** +* Twitter: [@ScriptsEngineer](https://twitter.com/ScriptsEngineer) +* Github: [@scriptsengineer](https://github.com/scriptsengineer) + +πŸ‘€ **Zennyth** +* Github: [@Zennyth](https://github.com/Zennyth) + +πŸ‘€ **greenfox1505** +* Github: [@greenfox1505](https://github.com/greenfox1505) + +πŸ‘€ **MichaelMacha** +* Github: [@MichaelMacha](https://github.com/MichaelMacha) + + +## 🀝 Contributing + +Contributions, issues and feature requests are welcome! + +Feel free to check [issues page](https://github.com/ExpressoBits/steam-multiplayer-peer/issues). + +To suggest or discuss some project structure, feel free here [discussions page](https://github.com/expressobits/steam-multiplayer-peer/discussions) + + +## Show your support + +Give a ⭐️ if this project helped you! + + +## πŸ“ License + +This project is [MIT](MIT) licensed. \ No newline at end of file diff --git a/splunk/addons/steam-multiplayer-peer/linux/.gitkeep b/splunk/addons/steam-multiplayer-peer/linux/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.double.x86_64.so b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.double.x86_64.so new file mode 100644 index 0000000..da289c8 Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.double.x86_64.so differ diff --git a/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.x86_64.so b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.x86_64.so new file mode 100644 index 0000000..012353e Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_debug.x86_64.so differ diff --git a/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.double.x86_64.so b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.double.x86_64.so new file mode 100644 index 0000000..93b1bd4 Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.double.x86_64.so differ diff --git a/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.x86_64.so b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.x86_64.so new file mode 100644 index 0000000..6fc790b Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/linux/libsteam-multiplayer-peer.linux.template_release.x86_64.so differ diff --git a/splunk/addons/steam-multiplayer-peer/linux/libsteam_api.so b/splunk/addons/steam-multiplayer-peer/linux/libsteam_api.so new file mode 100644 index 0000000..4a1260c Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/linux/libsteam_api.so differ diff --git a/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.double.universal.dylib b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.double.universal.dylib new file mode 100644 index 0000000..d148725 Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.double.universal.dylib differ diff --git a/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.universal.dylib b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.universal.dylib new file mode 100644 index 0000000..1f3971e Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_debug.universal.dylib differ diff --git a/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.double.universal.dylib b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.double.universal.dylib new file mode 100644 index 0000000..121f03d Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.double.universal.dylib differ diff --git a/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.universal.dylib b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.universal.dylib new file mode 100644 index 0000000..f5ad15d Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/macos/libsteam-multiplayer-peer.macos.template_release.universal.dylib differ diff --git a/splunk/addons/steam-multiplayer-peer/macos/libsteam_api.dylib b/splunk/addons/steam-multiplayer-peer/macos/libsteam_api.dylib new file mode 100644 index 0000000..1897bef Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/macos/libsteam_api.dylib differ diff --git a/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension b/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension new file mode 100644 index 0000000..c877cf5 --- /dev/null +++ b/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension @@ -0,0 +1,25 @@ +[configuration] +entry_symbol = "steam_multiplayer_peer_init" +compatibility_minimum = 4.2 + +[libraries] +linux.debug.x86_64 = "./linux/libsteam-multiplayer-peer.linux.template_debug.x86_64.so" +linux.release.x86_64 = "./linux/libsteam-multiplayer-peer.linux.template_release.x86_64.so" +linux.debug.arm64 = "./linux/libsteam-multiplayer-peer.linux.template_debug.arm64.so" +linux.release.arm64 = "./linux/libsteam-multiplayer-peer.linux.template_release.arm64.so" +linux.debug.rv64 = "./linux/libsteam-multiplayer-peer.linux.template_debug.rv64.so" +linux.release.rv64 = "./linux/libsteam-multiplayer-peer.linux.template_release.rv64.so" +macos.debug = "./macos/libsteam-multiplayer-peer.macos.template_debug.universal.dylib" +macos.release = "./macos/libsteam-multiplayer-peer.macos.template_release.universal.dylib" +windows.debug.x86_32 = "./windows/steam-multiplayer-peer.windows.template_debug.x86_32.dll" +windows.release.x86_32 = "./windows/steam-multiplayer-peer.windows.template_release.x86_32.dll" +windows.debug.x86_64 = "./windows/steam-multiplayer-peer.windows.template_debug.x86_64.dll" +windows.release.x86_64 = "./windows/steam-multiplayer-peer.windows.template_release.x86_64.dll" + +[dependencies] +linux.x86_64 = { "linux/libsteam_api.so": "" } +linux.arm64 = { "linux/libsteam_api.so": "" } +linux.rv64 = { "linux/libsteam_api.so": "" } +macos.universal = { "macos/libsteam_api.dylib": "" } +windows.x86_64 = { "windows/steam_api64.dll": "" } +windows.x86_32 = { "windows/steam_api.dll": "" } \ No newline at end of file diff --git a/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension.uid b/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension.uid new file mode 100644 index 0000000..c21355f --- /dev/null +++ b/splunk/addons/steam-multiplayer-peer/steam-multiplayer-peer.gdextension.uid @@ -0,0 +1 @@ +uid://bift3vevfew3v diff --git a/splunk/addons/steam-multiplayer-peer/windows/.gitkeep b/splunk/addons/steam-multiplayer-peer/windows/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.double.x86_64.dll b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.double.x86_64.dll new file mode 100644 index 0000000..7d0753e Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.double.x86_64.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.x86_64.dll b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.x86_64.dll new file mode 100644 index 0000000..ad04aea Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_debug.x86_64.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.double.x86_64.dll b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.double.x86_64.dll new file mode 100644 index 0000000..b2c55eb Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.double.x86_64.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.x86_64.dll b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.x86_64.dll new file mode 100644 index 0000000..93d223c Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam-multiplayer-peer.windows.template_release.x86_64.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam_api.dll b/splunk/addons/steam-multiplayer-peer/windows/steam_api.dll new file mode 100644 index 0000000..0bcfde3 Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam_api.dll differ diff --git a/splunk/addons/steam-multiplayer-peer/windows/steam_api64.dll b/splunk/addons/steam-multiplayer-peer/windows/steam_api64.dll new file mode 100644 index 0000000..6594c50 Binary files /dev/null and b/splunk/addons/steam-multiplayer-peer/windows/steam_api64.dll differ diff --git a/splunk/networking/steam-manager.gd b/splunk/networking/steam-manager.gd new file mode 100644 index 0000000..3e980ce --- /dev/null +++ b/splunk/networking/steam-manager.gd @@ -0,0 +1,39 @@ +extends Node + +var is_owned: bool = false +var steam_app_id: int = 480 +var steam_id: int = 0 +var steam_username: String = "" + +var lobby_id = 0 +var lobby_max_members = 4 + + +func _init() -> void: + OS.set_environment("SteamAppId", str(steam_app_id)) + OS.set_environment("SteamGameId", str(steam_app_id)) + int_steam() + + +func _process(delta): + Steam.run_callbacks() + + +func int_steam(): + var response: Dictionary = Steam.steamInitEx() + print("Steam init response: %s " % response) + + if response['status'] > 0: + print("Failed to init steam! Shutting down... Code: %s " % response) + get_tree().quit() + + is_owned = Steam.isSubscribed() + steam_id = Steam.getSteamID() + steam_username = Steam.getPersonaName() + + print("Steam ID: %s " % steam_id) + + if !is_owned: + print("Yo, you don't own this on steam") + get_tree().quit() + diff --git a/splunk/networking/steam-manager.gd.uid b/splunk/networking/steam-manager.gd.uid new file mode 100644 index 0000000..e8d4368 --- /dev/null +++ b/splunk/networking/steam-manager.gd.uid @@ -0,0 +1 @@ +uid://bhsxbic5qkkmg diff --git a/splunk/player/Player.tscn b/splunk/player/Player.tscn index 5e10955..df1ce5f 100644 --- a/splunk/player/Player.tscn +++ b/splunk/player/Player.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=7 format=3 uid="uid://csmfxg011xisf"] +[gd_scene load_steps=8 format=3 uid="uid://csmfxg011xisf"] -[ext_resource type="Script" path="res://player/player.gd" id="1_ulp21"] +[ext_resource type="Script" uid="uid://dopyfulbw2mx5" path="res://player/player.gd" id="1_ulp21"] +[ext_resource type="PackedScene" uid="uid://8phs2e161db1" path="res://ui/multiplayer-debug-ui/multiplayer-debug-ui.tscn" id="2_3c3w1"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ehsmr"] @@ -20,6 +21,9 @@ properties/0/replication_mode = 2 properties/1/path = NodePath(".:rotation") properties/1/spawn = true properties/1/replication_mode = 2 +properties/2/path = NodePath("Label3D:text") +properties/2/spawn = true +properties/2/replication_mode = 1 [node name="Player" type="CharacterBody3D"] collision_layer = 2 @@ -68,3 +72,7 @@ replication_config = SubResource("SceneReplicationConfig_ulp21") transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.887858, 0) billboard = 1 text = "Username" + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="Multiplayer-debug-ui" parent="CanvasLayer" instance=ExtResource("2_3c3w1")] diff --git a/splunk/player/player.gd b/splunk/player/player.gd index e93fa19..4c561a4 100644 --- a/splunk/player/player.gd +++ b/splunk/player/player.gd @@ -11,6 +11,8 @@ func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) camera_node = $Camera3D # Assuming Camera3D is a direct child + $Label3D.text = SteamManager.steam_username + func _physics_process(delta): # Apply gravity if not is_on_floor(): @@ -53,3 +55,6 @@ func _input(event): Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) else: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + + if event.is_action_pressed("toggle_watch"): + $"CanvasLayer/Multiplayer-debug-ui".visible = !$"CanvasLayer/Multiplayer-debug-ui".visible diff --git a/splunk/project.godot b/splunk/project.godot index a67522d..aa31ded 100644 --- a/splunk/project.godot +++ b/splunk/project.godot @@ -15,6 +15,10 @@ run/main_scene="uid://bj52j4ew2lfr6" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" +[autoload] + +SteamManager="*res://networking/steam-manager.gd" + [editor_plugins] enabled=PackedStringArray("res://addons/freecam_3D/plugin.cfg") @@ -24,6 +28,7 @@ enabled=PackedStringArray("res://addons/freecam_3D/plugin.cfg") folder_colors={ "res://items/": "yellow", "res://levels/": "green", +"res://networking/": "teal", "res://player/": "purple", "res://tools/": "gray", "res://ui/": "red" @@ -56,6 +61,41 @@ jump={ "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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) ] } +toggle_watch={ +"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":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +interact={ +"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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) +] +} +toggle_bag={ +"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":66,"key_label":0,"unicode":98,"location":0,"echo":false,"script":null) +] +} +inv_slot_1={ +"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":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null) +] +} +inv_slot_2={ +"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":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null) +] +} +inv_slot_3={ +"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":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null) +] +} +inv_slot_4={ +"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":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null) +] +} [layer_names]