Conversation
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
…on, improve README example Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
|
@copilot remove the mark_allocated, this is only for the Go GSDK and requires special handling on the backend. Make sure the Godot public SDK surface is the same as the non-experimental GSDKs. |
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
Removed |
|
@copilot can you add a note in the main README that experimental GSDKs are not officially supported by PlayFab, just with a best effort support on GitHub/MSFT Game Dev Discord? |
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
Added an "Experimental GSDKs" section to the main README noting they are not officially supported by PlayFab and are provided on a best-effort basis, with links to GitHub Issues and MSFT Game Dev Discord for help. See commit 719cf25. |
|
@copilot can you make sure that the Godot code follows any established Godot coding guidelines? |
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
|
@copilot can you also add unit tests? |
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
Reviewed all GDScript files against the official GDScript style guide and applied the following fixes in ba666c9 and 9f03c5f:
Files already correct: tab indentation, snake_case functions/variables, PascalCase class names, CONSTANT_CASE constants/enum members, two blank lines between functions, trailing commas in multi-line collections, double quotes for strings, return type annotations on all functions. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: dgkanatsios <8256138+dgkanatsios@users.noreply.github.com>
Added 40 unit tests in 3 test files using the GUT (Godot Unit Testing) framework in
Tests require Godot runtime to execute (same as the Go SDK tests requiring Go runtime). README updated with GUT setup and run instructions. See commit 040ea02. |
What this PR does / why we need it:
Adds an experimental PlayFab GSDK for Godot Engine 4.x using GDScript, placed in
experimental/godot/. Follows the same architecture as the existing Go experimental SDK and production C#/Java SDKs.Structure (
experimental/godot/addons/playfab_gsdk/):types.gd—PlayFabGsdkTypesclass: GameState/GameOperation enums, config key constants, serialization helpersinternal_gsdk.gd— Heartbeat loop (1s Timer + HTTPRequest), state machine, config loading fromGSDK_CONFIG_FILEgsdk.gd— Public API autoload singletongsdk_logger.gd— Dual output logger (console + file)plugin.cfg/playfab_gsdk_plugin.gd— Godot editor plugin, auto-registersPlayFabGSDKautoloadAPI surface matches the non-experimental GSDKs (C#, Java):
start(),ready_for_players()(async viaawait),register_health_callback(),register_shutdown_callback(),register_maintenance_callback(),update_connected_players(),log_message(),get_game_server_connection_info(),get_logs_directory(),get_shared_content_directory(),get_initial_players(),get_config_settings().Main README update: Added an "Experimental GSDKs" section to the root
README.mdnoting that experimental GSDKs are not officially supported by PlayFab and are provided on a best-effort basis, with links to GitHub Issues and MSFT Game Dev Discord for help.GDScript style guide compliance: All code follows the official GDScript style guide:
extends→## doc comment→ signals → variables → methodstransitioned_to_active){ "key": value }):=inference and explicit type annotations on all functionsUnit tests (
experimental/godot/tests/): 40 tests across 3 files using the GUT (Godot Unit Testing) framework:test_types.gd(13 tests) — Enum serialization for allGameState/GameOperationvalues, unknown/empty string handling, config key constant verificationtest_internal_gsdk.gd(20 tests) — Config map creation (all fields, missing fields, non-dict inputs), state machine transitions (Continue/Active/Terminateoperations), signal emission, shutdown callback invocation, session config processing, initial players, metadata, maintenance callback deduplication, idempotent starttest_gsdk_logger.gd(7 tests) — Directory/file creation, log level formatting (INFO/WARN/ERROR/DEBUG), graceful handling without initializationTests require Godot runtime to execute (consistent with the Go SDK's approach). README includes GUT setup and run instructions.
Special notes for your reviewer:
awaitreplace Go channels/goroutines for blockingready_for_players()transitioned_to_activesignal to unblockready_for_players()(mirrors Go'sclose(channel)behavior)mark_allocated()is intentionally excluded — it is Go GSDK-specific and requires special backend handlingIf applicable:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.