### Start Local Development Server with Yarn Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/README.md Starts a local development server for live preview. Changes are reflected without server restart. Run this command in the project root. ```bash $ yarn start ``` -------------------------------- ### Setup and Basic Usage of High Level EOS in Godot Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md Demonstrates how to set up High Level EOS by configuring credentials and initializing the platform. It also shows how to connect to login signals and retrieve leaderboard records. Ensure you replace placeholder IDs with your actual EOS credentials. ```GDScript # In main script extends Node func _ready() -> void: # Setup HEOS Logs HLog.log_level = HLog.LogLevel.INFO var credentials = HCredentials.new() credentials.product_name = "PRODUCT_NAME_NAME" credentials.product_version = "PRODUCT_VERSION_HERE" credentials.product_id = "PRODUCT_ID_HERE" credentials.sandbox_id = "SANDBOX_ID_HERE" credentials.deployment_id = "DEPLOYMENT_ID_HERE" credentials.client_id = "CLIENT_ID_HERE" credentials.client_secret = "CLIENT_SECRET_HERE" # optional #credentials.encryption_key = "ENCRYPTION_KEY_HERE" var setup_success := await HPlatform.setup_eos_async(credentials) if not setup_success: printerr("Failed to setup EOS. See logs for more details") return # Setup Logs from EOS HPlatform.log_msg.connect(_on_eos_log_msg) var log_res := HPlatform.set_eos_log_level(EOS.Logging.LogCategory.AllCategories, EOS.Logging.LogLevel.Info) if not EOS.is_success(log_res): printerr("Failed to set logging level") return HAuth.logged_in.connect(_on_logged_in) # During development use the devauth tool to login HAuth.login_devtool_async("localhost:4545", "CREDENTIAL_NAME_HERE") # Or login without any credentials # await HAuth.login_anonymous_async() func _on_logged_in(): print("Logged in successfully: product_user_id=%s" % HAuth.product_user_id) # Example: Get top records for a leaderboard var records := await HLeaderboards.get_leaderboard_records_async("LEADERBOARD_ID_HERE") print(records) func _on_eos_log_msg(msg: EOS.Logging.LogMessage) -> void: print("SDK %s | %s" % [msg.category, msg.message]) ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/README.md Installs project dependencies using Yarn. Run this command in the project root. ```bash $ yarn ``` -------------------------------- ### Initialize EOS SDK and Platform Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/docs/topics/initialization.md Use this script at the start of your game to initialize the EOS SDK and create the platform instance. Ensure all required IDs and secrets from the EOS Developer Portal are correctly configured. This snippet also includes logic for enabling the Social Overlay on Windows. ```gdscript extends Node func _ready() -> void: # This will control which logs you get from EOSG HLog.log_level = HLog.LogLevel.INFO var init_opts = EOS.Platform.InitializeOptions.new() init_opts.product_name = "PRODUCT_NAME_HERE" # Change this init_opts.product_version = "PRODUCT_VERSION_HERE" # Change this var create_opts = EOS.Platform.CreateOptions.new() create_opts.product_id = "PRODUCT_ID_HERE" # Change this create_opts.sandbox_id = "SANDBOX_ID_HERE" # Change this create_opts.deployment_id = "DEPLOYMENT_ID_HERE" # Change this create_opts.client_id = "CLIENT_ID_HERE" # Change this create_opts.client_secret = "CLIENT_SECRET_HERE" # Change this create_opts.encryption_key = "ENCRYPTION_KEY_HERE" # Change this # Enable Social Overlay on Windows if OS.get_name() == "Windows": HAuth.auth_login_flags = EOS.Auth.LoginFlags.None create_opts.flags = EOS.Platform.PlatformFlags.WindowsEnableOverlayOpengl # Initialize the SDK var init_res := await HPlatform.initialize_async(init_opts) if not EOS.is_success(init_res): printerr("Failed to initialize EOS SDK: ", EOS.result_str(init_res)) return # Create platform var create_success := await HPlatform.create_platform_async(create_opts) if not create_success: printerr("Failed to create EOS Platform") return # Setup Logs from EOS HPlatform.log_msg.connect(_on_eos_log_msg) # This will control which logs you get from EOS SDK var log_res := HPlatform.set_eos_log_level(EOS.Logging.LogCategory.AllCategories, EOS.Logging.LogLevel.Info) if not EOS.is_success(log_res): printerr("Failed to set logging level") return HAuth.logged_in.connect(_on_logged_in) # During development use the devauth tool to login HAuth.login_devtool_async("localhost:4545", "CREDENTIAL_NAME_HERE") # Only on mobile device (Login without any credentials) # await HAuth.login_anonymous_async() func _on_logged_in(): print("Logged in successfully: product_user_id=%s" % HAuth.product_user_id) # This method is called when we get a log message from EOS SDK func _on_eos_log_msg(msg: EOS.Logging.LogMessage) -> void: print("SDK %s | %s" % [msg.category, msg.message]) ``` -------------------------------- ### Initialize Submodules Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md Ensures that all Git submodules, including the EOS C SDK, are downloaded and initialized. ```bash git submodule update --init --recursive ``` -------------------------------- ### Deploy Website using Yarn (SSH) Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/README.md Builds the website and deploys it using SSH. Ensure SSH is configured for your deployment target. Run this command in the project root. ```bash $ USE_SSH=true yarn deploy ``` -------------------------------- ### Build Static Website with Yarn Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/README.md Generates static website content into the 'build' directory. This content can be hosted anywhere. Run this command in the project root. ```bash $ yarn build ``` -------------------------------- ### Deploy Website using Yarn (No SSH) Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/README.md Builds the website and deploys it without using SSH. Replace '' with your actual GitHub username. Run this command in the project root. ```bash $ GIT_USER= yarn deploy ``` -------------------------------- ### Build GDExtension Plugin (Release) Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md Compiles the GDExtension plugin in release mode for optimized performance. Replace `` with your target OS (e.g., windows, macos, linux). ```bash # In root folder scons platform= target=template_release ``` -------------------------------- ### Sample Godot Editor Configuration Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md This .ini file configuration is used to bootstrap the Godot Editor executable for testing the Account Portal login with Epic Online Services during game development. ```ini ApplicationPath=Godot_v4.2.0-stable_win64.exe WorkingDirectory= WaitForExit=0 NoOperation=0 ``` -------------------------------- ### Initialize EOS SDK in GodotGame.java Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/docs/topics/initialization.md Update the `GodotGame.java` file to include the EOS SDK initialization. This involves adding imports, loading the library, and calling the `EOSSDK.init()` method. ```java import com.epicgames.mobile.eossdk.EOSSDK; import org.godotengine.godot.GodotActivity; import android.os.Bundle; public class GodotApp extends GodotActivity { static { System.loadLibrary("EOSSDK"); } @Override public void onCreate(Bundle savedInstanceState) { EOSSDK.init(getActivity()); setTheme(R.style.GodotAppMainTheme); super.onCreate(savedInstanceState); } } ``` -------------------------------- ### Build GDExtension Plugin (Debug) Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md Compiles the GDExtension plugin with debug symbols for development and debugging purposes. Replace `` with your target OS (e.g., windows, macos, linux). ```bash # In root folder scons platform= target=template_debug dev_build=yes Eg. scons platform=windows target=template_debug dev_build=yes ``` -------------------------------- ### Enable Debugging on macOS Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/README.md Resolves 'Not allowed to attach to process' errors when debugging GDExtension on macOS by signing the Godot executable with specific entitlements. ```bash codesign --entitlements debug-entitlements.plist -f -s - /Applications/Godot.app/Contents/MacOS/Godot ``` -------------------------------- ### Configure EOS Client ID in build.gradle Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/docs/topics/initialization.md Add this string resource to the `defaultConfig` section of your `res://android/build/build.gradle` file. Replace `PUT YOUR EOS CLIENT_ID HERE` with your actual EOS Client ID. ```gradle String ClientId = "PUT YOUR EOS CLIENT_ID HERE" resValue("string", "eos_login_protocol_scheme", "eos." + ClientId.toLowerCase()) ``` -------------------------------- ### Add EOS SDK Dependencies to build.gradle Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/docs/topics/initialization.md Include these lines in the dependencies section of your `res://android/build/build.gradle` file to add the EOS SDK and its required libraries. ```gradle implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.security:security-crypto:1.0.0' implementation 'androidx.browser:browser:1.4.0' // Update the path so that it points to eossdk-StaticSTDC-release.aar provided in addons/epic-online-services-godot/bin/android/ implementation files('../../addons/epic-online-services-godot/bin/android/eossdk-StaticSTDC-release.aar') ``` -------------------------------- ### Update minSdkVersion in config.gradle Source: https://github.com/3ddelano/epic-online-services-godot/blob/main/docs/docs/topics/initialization.md Modify the `minSdk` value in `res://android/build/config.gradle` to `23` to meet the EOS Android SDK's minimum requirements. ```gradle minSdk : 23, ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.